A study done by a researcher Yun Zhang at the Rockefeller University revealed that good taste is not an inherent trait of worms.
The research was mainly conducted on C.elagans which is a very simple nematode. It lives in the soil and feeds on various bacteria (both harmless and pathogenic ones).It has 302 neurons totally which can be mapped to individual behaviors.
The genes responsible for the nervous system to function are very similar to that of humans.
Worms like humans make mistakes and learn from them.
Worms feed on the bacteria present in the soil but it cannot differentiate between harmless and pathogenic strains.
When they consume a lot of these pathogenic strains (Pseudomonas aeruginosa and Serratia marcescens) they propagate within the gut of C.elagans and result in fatal consequences.
The experiment consists of two sets of worms one was given a diet of E.coli (OP50, harmless). The other set was feed on the pathogenic bacteria Serratia marcescens or Pseudomonas aeruginosa in addition to E.coli OP50 bacteria.
Worms that were brought up on the pathogenic diet avoided it and preferred E.coli OP50. On the other hand those that were feed with E.coli OP50 alone did not know the pathogenic nature of the bacteria and indulged on both.
The worms depending on the taste adjusted themselves and learnt to avoid the pathogenic strains. Worms develop the dislike for pathogenic bacteria within a short time which plays an important role in the worm's choice of diet.
The scientific reason behind this change in the choice of diet is due to the secretion of the neurotransmitter, serotonin by ADF neurons.tph-1 gene is responsible for the production of serotonin.
Worms that avoided pathogenic bacteria for diet had increased serotonin levels when compared to those feed on E.coli OP50.
When tph-1 gene was removed from the worms they were unable to differentiate between harmless and pathogenic diet. When the gene was again inserted the worms learnt the ability to choose.
Hence the study concluded that worms need initially a bad taste and then serotonin to help them choose the right diet.