Confocal images and boxplots from my results in strokelitude

on Tuesday, May 15th, 2018 12:26 | by

Confocal image MAX stack of one of the brains at 20x

 

 

and at 40x

 

In this link we have a video of a 3D stainning pattern          zoomed_CC

 

In addition I add here teh boxplots from the final results of the Ping Pong ball setup with these experiments

quality test before strokelitude experiments

on Monday, January 29th, 2018 12:40 | by

Some traces from this week just so that you have an idea how do they look like. To me they are not the optimal traces I expected. But one can see some signal there. I will start the screen hoping to get enough good traces without too much work.

what do you think is the best quality control for accepting a trace for the analysis or not. I was thinking the 3D mapping gives a good hint but without quantification.

In addition I was writting to Andi Straw to solve the issue of running two cameras in the same computers, but now answer

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.

c105;;c232>TNT:

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

Measuring Wingstroke Amplitude with Strokelitude (V)

on Monday, December 14th, 2015 2:42 | by

For a further data analysis, we should have a minimum number of samples. During the last week, I have been measuring the wingstroke amplitude of the flies, to get at least 10 samples of each one(two controls and the experimental line). Here three examples of the different lines:

Males WTB x C105;;C232 (control)

TraceDownsampledExcerpt

Males UAS-TNT-E x C105;;C232

TraceDownsampledExcerpt11

Males UAS-TNT-E x WTB (control)

TraceDownsampledExcerpt

 

 

Measuring Wingstroke Amplitude with Strokelitude (IV)

on Monday, December 7th, 2015 2:56 | by

After getting good results in the measurement of the wingstroke, and solving problems with the sampling intervals (image below). I have started to measure flies for the experiments.

The time between samples was different depending on the background programs running on the background:

Figure 1

SamplingIntervals

More differences in time within samples when more programs are running at the same time as strokelitude (3nd 1/3 of the plot), when just the display of the camera is running( 1st 1/3 of the plot), and everything shut down(2nd 1/3 of the plot).

The differences among sampling intervals was bigger but with an adjustment of the data, Christian Rohrsen managed to changed. The time between two samples could arise until 1.7 seconds and with the correlation, the time is not bigger than 0.05 seconds.

The strains of flies used fore the experiments are:

UAS-TNT-E, that express the tetanus toxin in the neural cells, using GAL4 system. Being Used as a control.

c105;;c232, that contains a promotor region to express the toxin. Being used as a control.

And the cross between both to have the expression of the tetanus toxin.

Some data from the control flies (UAS-TNT-E):

TraceDownsampledTraceDownsampledTraceDownsampledExcerpt

And some data of the spikes:

TraceDownsampledExcerpt

 

 

 

 

Measuring Wingstroke Amplitude with Strokelitude (III)

on Monday, November 23rd, 2015 2:59 | by

After the measurements of this week, I get better results in the trace of the fly;

(1)

TraceDownsampled

With the corresponding trace exerpt with the spikes of the figure above (1)

(1)

TraceDownsampledExcerp1t

and two more from other flies:

TraceDownsampledExceerpt TraceDownsampledExcerpt

 

Measuring Wingstroke Amplitude with Strokelitude (II)

on Monday, November 16th, 2015 2:52 | by

After the results in tracing of the flies from last wee. This week I’ve improved detection of the wings and the care of the flies. The results seem similar to the flight of a fly. Attached we find the trace Downsampled of the best four flies I got:

TraceDownsampled TraceDownsampled TraceDownsampledTraceDownsampled

Spontaneity: Measuring Wingstroke Amplitude with Strokelitude

on Monday, November 9th, 2015 3:38 | by

Those are the results of measuring the wingstroke amplitude with Strokelitude and “The ping pong ball machine”. And analysed with R studio and the scripts written by an student.

The results are not too good, comparing them with the result obtained in other experiments.

Two pictures of the trace down-sampled of my flies:

Trace

TraceDownsampled

and in the next picture is how it should be plotted:

TraceDownsampled

Installing fview and strokelitude

on Thursday, April 2nd, 2015 1:57 | by

1. Install ubuntu, optimally the distribution precise pangolin (ubuntu 12.04 LTS) and get all relevant updates

2. Install fview

Using a terminal execute the following commands:
sudo gedit /etc/apt/sources.list
– at the end of that file, add the line deb http://debs.strawlab.org/ precise/
sudo apt-get update
sudo apt-get install camiface
sudo apt-get install python-motmot-fview
sudo apt-get install libhdf5-serial-1.8.4
sudo apt-get install hdf5-tools
sudo apt-get install python-tables=2.3.1-2ubuntu3
sudo apt-get install python-chaco
sudo apt-get install python-pylibusb
sudo apt-get install pyro
sudo apt-get install python-motmot-fastimage
sudo apt-get install python-motmot-realtimeimageanalysis
sudo apt-get install python-motmot-fviewexttrig

The installation of libhdf5-serial-1.8.4 might fail if there is already a newer library installed. Usually this should not be a problem, as long as the other commands work. To make sure, after executing all those commands you can run “sudo apt-get install -f” and see whether it shows you any conflicts. If there are no conflicts, the installation should have been successful. If there are conflicts, this command might be able to resolve them.
– test fview by executing the command fview (an error message will appear saying that no device was found. Ignore that.)
3. install strokelitude

sudo apt-get install python-strokelitude

– test fview again, now you should be able to start strokelitude under windows -> -=|strokelitude|=-

Category: | No Comments

Measuring Wingstroke Amplitude with Strokelitude

The day before the measurement:
Glue the flies on hooks, put them into the single-fly valves and give them sugar and water to survive the night. Store them at the appropriate temperature

 

The day of the measurement:

1. Put the fly in position
Select a fly and put it in the clamp. Then put the clamp in the holder and position the ping-pong ball (or generally, the measurement environment) around the fly.
2. Set up the camera
Start the computer and open fview (either by typing “fview” in a terminal or clicking the fview symbol on the launcher). Close the error message that fview produces.

FviewStart

Then initialize the camera (click “Camera” -> “Initialize Camera” and click OK in the window that pops up).

InitializeCamera1InitializeCamera2

 

If fview does not list your camera as a candidate for initialization, you may have to configure your connection to the camera. Go to the Ubuntu System Settings and select “Networks”. Here, select the connection via which the camera should be connected to your computer. Open “Options” and “IPv4 Settings” and set “Method” to “Local Only”.

In case the image you get after initialization is very small (only a tiny square in the upper left corner of the fview window), change to a different desktop and back. This should usually solve the issue.

Open the camera settings (via “Windows” -> “Camera Controls”) and put the “shutter(msec)” to 20. During the actual recording the shutter should be at 10 msec to reach a sampling rate of ~100Hz, but for the setup it is more convenient to have it at 20 or 30. Now adjust the gain until you can see something on the picture. Then use the micro-manipulator to move the camera until you have a good image of the fly.

Screenshot from 2015-04-02 11_40_32FindTheFly

Before you start strokelitude, make sure that the display update interval is set to 1. During the recording, you may want to set this higher in order to be able to use lower values of “shutter (msec)” in the camera controls (i.e. a higher sampling rate). If you use a 10msec shutter with a display update interval of 1 it may happen that the program crashes. However, when you change settings in strokelitude, you should have a display update interval of 1, since the program might crash otherwise for unknown reasons.

To set the display update interval, go to “View” -> “Set display update interval…”.

SetDisplayUpdateIntervalSetDisplayUpdateInterval2

Open strokelitude. Go to “Windows” -> “-=|strokelitude|=-“. The click “Draw Mask”.

DrawMask

This will make some green lines appear on the screen. This is the mask for recording the fly. The two small circles should be on the roots of the wings and the line linking them should be orthogonal to the fly’s body axis (i.e. the orthogonal green line should be on the fly’s body axis). Unless you are very lucky (or very precise at fly handling), you will have to adjust the mask. To do this, click “Maskdata”. Another window will open.

OpenMaskdataMaskdataSettings

Use these parameters to fit the mask to the fly. With “gamma” you can rotate the mask and with “X” and “Y” you can shift it. Use these three parameters to position the two small circles to the wig hinges. You can manipulate the distance between the circles with “wingsplit”. Then you can use “R1” and “R2” to manipulate the inner and outer radii of the measurement sectors. With “alpha” and “beta” you can adjust the anterior and posterior borders of the measurement sectors. In general, these sectors should be positioned such that the anterior end of the wingstroke always falls inside. Optimally, nothing except for the wings should be within the sectors.

SettingUpMask

 

When you have set up the mask, close the window “Mask Parameters” and click “Antennae tracking enabled” in strokelitude.

EnableAntennaTracking

 

This will make some more lines appear on the screen. Unless you are interested in tracking antenna movements, you can safely ignore those. Enabling antennae tracking is necessary, since strokelitude does not save the data otherwise.

As soon as you have enabled antennae tracking, you can set the display update interval back up, e.g. to 5. Now you can also set the “shutter (msec)” in the camera controls to the value you want to use during the recording (e.g. 10). This will change the brightness level of the video.

AdjustShutterAndGain

 

Turn on the infrared LED and put the filter in front of the camera (or adjust the lighting in whatever way is necessary for your experiment). Adjust the “gain” in the camera controls until you see a clear picture, where the wings of the fly are very bright and the background is very dark.

Go back to strokelitude and click “Processing enabled”.

EnableProcessing

This will make two new green lines appear. They originate from the two small circles and go through the measurement sectors. These lines indicate the position that strokelitude calculates for the wing. This is the data you will record (even though you are not recording yet). Make sure that these lines track the wings well. Optimally, they should always be exactly on the border of the wing.

CheckTracking

You can use “gain” to make the image brighter or darker. Also, the parameters “Mask thresh” and “Max g” (below the “Processing enabled” bottom in strokelitude) may be helpful. Raising max g may reduce the amount of error (frames in which strokelitude looses track of the wings). The mask threshold determines at which brightness level strokelitude estimates the border of he wing. As a rule of thumb, if the tracking lines jump down into the dark background area, you should raise the threshold. If the tracking lines jump up into the bright areas of the wing, you should lower the threshold.

However, pay attention to how homogeneous the wings are. Ideally, the wings should be a uniform white smear and the background should be black. If there is a bright stripe at the front of the wing and then a somewhat darker area behind it, this may lead to trouble, since strokelitude may switch between the two borders of the bright area. Sometimes it can help to put the measurement vectors further outside or further inside. Also, make sure that both wings are illuminated equally well, otherwise optimizing the settings for one wing will make you loose the other.

Once you made sure that strokelitude tracks the wings well, you can start the actual recording. Untick “Processing enabled” and select “Save to disk” (to save data in .h5 format) and “Write data to a text file” (to save data in .txt format). Then click “Processing enabled” to start the recording. If you want to record a video while you save the data, click “Start recording” in the camera controls.

SaveData

Once you have finished the recording, disable processing. Find the data files, rename them and sort them (it is best to do this after every recording, since the file names strokelitude generates are generic). You can set the output directory under “File”. If you make several recordings, make sure to close fview between the sessions. Otherwise, strokelitude will continue to write the data into the same file.

 

Category: | No Comments