Drosophila behavioural flexibility towards food (3)

on Saturday, February 11th, 2017 10:21 | by

This time I tried to induce a kind of Garcia effect (eating something, feeling sick and then avoiding eating that again) in Drosophila. As one can see in the video below, Drosophila show inhibited proboscis extension response (PER) right after the onset of the US (intestinal discomfort).


However, the conditioned response is extinguished after several hours. I tried to use groups of 20 starved flies on yeast+water for 2h, food + 0.1% hydrogen peroxyde for 1h, starving with nothing for 1h (always inside vials), and then testing with conditioned food against another food for 2h (inside Petri dishes). It didn’t work: in the end they show the same preference as controls (without hydrogen peroxyde). I tried to condition sucrose, glycine, pineapple juice (and then test against apple juice) and nothing, the flies avoid at first but once the swelling goes away, they forget or don’t associate anything bad or sufficiently bad with that food anymore, and continue to prefer it.

I also confirmed the PER suppression following conditioning with quinine reported in [C. Keene A, Masek P. Optogenetic Induction of Aversive Taste Memory. Neuroscience. 2012;222:173-180]. However, it is also extinguished minutes (~30) after the conditioning, as their results also show (in my case, I used sucrose instead of fructose):

(my results:)

(their results:)

Print Friendly, PDF & Email

Drosophila behavioural flexibility towards food (2)

on Thursday, February 2nd, 2017 9:49 | by

This time I tested how the behaviour changes with the proportion between the positive stimulus (sucrose) and the negative stimulus (quinine) and how it changes with the presence of a positive odour (vinegar) or a negative odour (benzaldehyde).

Print Friendly, PDF & Email

Drosophila behavioural flexibility towards food

on Saturday, January 28th, 2017 12:05 | by

Why does one choose a burger over a carrot? How much is it possible to change that choice? What can Drosophila tell us about it?

I wanted to study Drosophila spontaneous behaviour regarding their food preferences and how malleable it is, so I can then try to condition it – and one should notice that those are “preferences” and therefore not neutral CS to begin with, as usual.
For that I used wild type Drosophila starved for 24 hours.
Drosophila likes the sweetness and the nutritional value of sucrose and does not like the bitter taste of quinine. Vinegar is a well-known attractant and benzaldehyde a well-known repellent.
To test the food preferences I simply add different food colouring to the food, test the flies in Petri dishes with alternated 10µL food drops and then, after 2h at 25°C and without light, I freeze them and count the number of flies based on the colour of their abdomen:


Here I present my first results:

(n = number of trials, each using 40 flies.)



As an illustration, here I have a short video showing a few flies during their initial food exposure:

And here the results with food in the presence of odours:

(The odours were placed in a small piece of filter paper inside the Petri dish.)


Next I would like to see if I can change their preferences (using these foods or sucrose vs fructose, etc.) through conditioning (as in the Garcia effect). Suggestions are welcomed.

Print Friendly, PDF & Email

Cumulative bins, starting at zero and normalizing

on Monday, April 4th, 2016 3:04 | by

In the last meeting Björn proposed to do correlations of cumulative increasing bins. He said to do that taking the zeroth point (last library point where prediction is still not done) and use it for having a potential 1 of correlation coefficient at the beginning. I could not do that because I didnt save the zeroth points, and this will be a bit tedious and confusing considering that many flies were tested and probably the order is not 100% known. Thus, I just did the bins skipping this zeroth point. After all, we should see something similar with this one. First two graphs: c105;;c232>TNT (first and second prediction point), second: WTBxTNT, third: WTBxc105;;c232.

c105>TNTcumbinsfirst predCorrelationbothneigh

c105>TNTcumbinssec predCorrelationbothneigh

WTBxTNTTNTxWTBcumbinsfirst predCorrelationbothneighTNTxWTBcumbinssec predCorrelationbothneigh

WTBxc105;;c232.WTBxc105first predCorrelationbothneighWTBxc105sec predCorrelationbothneigh


Examples of how each of the flies look like. So they are basically cumulative bins with each single fly (each in different colour). Just to have a hint how does the singularity looks like.  exampleallfliesb exampleallfliescumbins exampleallfliesr   Second thing I did is normalize the to have a range from -1 to 1 all of them (I have to double check the range in the script) and also setting them at a starting point of zero. I did this because we do not want to have differences in the correlation coefficient due to a different offset of the values of the wing beat and neither because of the starting point (if the fly was already flying to the right full gas, then it could be that it has an influence in the following prediction).

c105;;c232 –> first at starting at zero without normalizing and then with normalizing. The next is just the RMSE (not so important).



Print Friendly, PDF & Email

Prediction with binnning

on Monday, March 21st, 2016 1:13 | by

To see if there is an exponential decay in the prediction of the fly traces we did correlations of bins of 40 data points. We have 4 graphs (the last one merged) which consist of predictions at two different points with two different number of neighbours used for the prediction. So we have for each group sucesively: prediction at the first prediction point with the first number of neigbours, then the same with different number of neighbours. The last two are two different numbers of neighbours for the second prediction point. In the order: c105;;c232>TNT, TNTxWTB, c105;;c232xWTBc105;;c232xTNTfirst predCorrelationfirstneighc105;;c232xTNTfirst predCorrelationsecondneighc105;;c232xTNTsec predCorrelationfirstneighc105;;c232xTNTsec predCorrelationsecondneighTNTxWTBfirst predCorrelationfirstneighTNTxWTBfirst predCorrelationsecondneighTNTxWTBsec predCorrelationfirstneighTNTxWTBsec predCorrelationsecondneighc105;;c232xWTBfirst predCorrelationbothneighc105;;c232xWTBsec predCorrelationbothneigh

Print Friendly, PDF & Email

Nonlinear signature of Drosophila in Strokelitude

on Monday, March 14th, 2016 1:48 | by





This is now the results from trying to predict the fly behavior doing ensembles of two predictions for the next 200 data points at two different points of the traces.


c105xTNT200Correlationdouble c105xTNT200RMSEdouble

WTBxTNT: tntxwtb200Correlationdouble tntxwtb200RMSEdouble

WTBxc105;;c232: wtbxc105200Correlationdouble wtbxc105200RMSEdouble

From what we see here, there is no “flattening” in the prediction of the fly when the neurons under c105 and c232 are targeted by TNT. This is  done with around 14/15 flies for each group with two predictions in each ensemble of the two starting points. That makes a total of 15flies x 3 groups x 2 starting points for prediction x 2 predictions per ensemble = 180 prediction traces. Now I´m trying to calculate it by making correlations of bins in the prediction-observed for the same fly

Print Friendly, PDF & Email

Fly behavior prediction in the platform

on Monday, February 15th, 2016 2:25 | by

This is the prediction analysis of flies in the platform under a 20min experiment under dark conditions. The number of experiments change drastically among groups because of technical problems: WTBxTNT is 4, WTBxc105;;c232 is 22, for the experimental line is 6 (c105;;c232>TNT), for the platform without flies is 10. I show the root mean squares and the correlation coefficient for each group.


This is the experimental group: c105;;c232>TNT.





The group without flies on the platform. I expect here to get a very good predictability overall:

platformnothingCorrelation platformnothingRMSE


WTBxc105;;c232 groupplatformwtbxc105Correlation platformwtbxc105RMSEWTBxUAS-TNT platformwtbxtntCorrelation platformwtbxtntRMSE


Print Friendly, PDF & Email

First tests of fly prediction under a mean of the flies on single data points

on Monday, February 8th, 2016 12:11 | by

These were done the week before last one but I could not upload it last time, so here are they. These are the results for predicting 4-5 flies of each group. Just one prediction from the middle of the time series for the 40 data points ahead in the future. First group is c105;;c232>TNT.






This is c105;;c232 x WTB

Correlation RMSE


This is UAS-TNT x WTB wtbtntCorrelation wtbtntRMSE


As I saw that the graph had so much zig-zag I told Pablo to make a bigger number of tested flies and this is what he is presenting today.


In addition I did analyze other parameters which are all saved under a PDF file below (Strokelitude). This contains some parameters with doubtfull processing which I still don´t trust so I have to find a better way for the calculation of it.


Print Friendly, PDF & Email

Data analysis of the prediction of wingstroke amplitude with 40 datapoints.

on | by

After we got the data of the behavior of the fly with strokelitude, we have made the analysis of 40 datapoints. Those datapoints were randomly picked in the middle of our dataset (10 minutes) and we made a second prediction, taking the points just before the end of the flight. For that we made a double correlation with those two predictions for each line and those are the results:

For the two control lines,

WTB x C105;;C232




And for the experimental line (UAS-TNT-E x C105;;C232)


As long as the linear regresion decreases, more impredictable is the fly so its behave like non-linear function. The two controls are suposed to be more impredictable than the control line. There is more decrease in those two lines comparing to the experimental line, although is not too remarkable.

We also made an RMSE analysis, Christian explained it in his post. “RMSE measures just the differences of the absolute points whereas correlation coefficient is rather if the direction and degree of variation correlates (covariates)”

Here we have the plots:

WTB x C105;;C232(control)


UAS-TNT-E x WTB(control)


experimental line (UAS-TNT-E x C105;;C232)


As long as the linear regresion increases, the absolute points differ from the prediction and the normal trace.



Print Friendly, PDF & Email

platform resonance frequency and Gaussian downsampling

on Monday, February 1st, 2016 2:16 | by

clamptouchingplatform sd0.0012 sd0.0016


Print Friendly, PDF & Email