Simple Drosophila food preference assay:
Use Drosophila starved for 24 hours.
Choose the composition of the foods you want to test.
For example, Drosophila likes the sweetness and the nutritional value of sucrose (as well as other sugars) and does not like the bitter taste of quinine and caffeine.
Odours could also be used in a small piece of filter paper inside the Petri dish. Vinegar is a well-known attractant and benzaldehyde a well-known repellent. Use for example 40µL of apple vinegar or the same volume of 1% benzaldehyde.
To test the food preferences simply add different food colouring (warning: the food colouring should not represent more than 1/4 of the total volume, otherwise the flies show taste biases) to the foods and test the flies in Petri dishes with alternated 10µL food drops:
Then, after 2h at 25°C and without light, freeze them and count the number of flies based on the colour of their abdomen:
Show the results in terms of a ratio index, RI = (#F1-#F2)/(#F1+#F2), and use for example a boxplot.