pip install -r exact-requirements.txt
- Convert raw movie to tiff:
cd ~/flyfood
thor2tiff .
- Draw ROI:
- Open
raw.tif
in ImageJ, analyze -> tools -> ROI manager. - Draw one ROI around the antennal lobe for each plane.
- Rename all ROIs to 'al'.
- Save ROIs as
RoiSet.zip
in theflyfood
folder.
- Open
- Run
analysis.py
, this will generate the following instimfile_dir
:merged_dff.svg
: weighted average df/f across merged ROIs; legend: 1 flyfood/1 control -> each component; 4 flyfood/4 control -> incomplete mixture from dropping 1 component; 5 flyfood/5 control -> complete mixture.x_correlation.png
: correlation calculated from maximum df/f during first 3 seconds after odor onset of each pixel in the ROI;x
can be combinations ofsmooth
thresh
andsorted
depending on your choice.single_trial_max_dffs.csv
andmulti_trial_max_dffs.csv
ifgenerate_csv == True
: maximum df/f traces during the first 3 seconds after odor onset;single
: data for individual odor components;multi
: data for complete and incomplete mixture.odor_list_unqiue.p
: odor presentation order without repeat.trial_bounding_frames.yaml
: start, odor onset, and end time frames of each odor trial
- Run
heatmap.py
. This generates the maximum pixel df/f for each plane (x-axis) and repeat (y-axis) during the first 3 seconds after odor onset for each odor trial (title). Images are stored in the new folderheatmap
instimfile_dir
. - Identify glomeruli:
- Install this.
- Draw one ROI around each glomerulus.
- Rename so that ROIs with the same glomerulus have the same name.
- Save ROIs as
RoiSet1.zip
in theflyfood
folder.
- Run
ROI.py
, this will generate the following:dff_movie.tif
inflyfood
ifwrite_dff_movie == True
: df/f movie.x_ROI.png
: correlation calculated from maximum df/f during first 3 seconds after odor onset of each pixel in the glomeruli ROIs;x
can be combinations ofsmooth
thresh
andsorted
depending on your choice.
- Run
plot_stats.ipynb
in jupyter notebook. This will plot the maximum df/f traces for each odor trial for all experiments performed on the same day.
HongLab @ Caltech Dropbox/Rotation/Elena Fall 2021/2021-11-30/3
orn_distance.py
: code for data analysis on Hallem dataset with fruit samples,HC_data_raw.csv
.control_mixture.ipynb
: select control mixture based on pmi, correlation, and water solubility; data folder: HongLab @ Caltech/Rotation/Elena Fall 2021/data