This repository contains python codes and data analysis pipelines for 3D calcium imaging analysis on thermosensory neurons in drosophila.
- Project Overview
- Data
- Installation
- Description
- File Overview
- Input and Output File Organization
- Usage Instructions
- Example Directory Structures
- Troubleshooting
- License
- Contact
- Clone or download this repository.
- Create a python virtrual environment.
- Install dependencies:
python -m pip install --upgrade pip python -m pip install -r requirements.txt
- Test scripts usging demo data
python .\CIAanalysis_120min.py -i path/demo_analysis --merge --cell_type DOWC python .\CITbind_dynamic.py -i path/demo_cbind -n 2
These python scripts allows batch processing and analysis of calcium imaging datasets collected from Drosophila larvae or other small model systems. The pipline has three main stages:
- Fluorescence extraction using TrackMate in ImageJ
insert the user manual for the steps in Trackmate here! - Primary Analysis (CIAnalysis_120min.py)
This is the main script for the processing individual calcium imaging datasets.
It automatially: • Generates background values from background_i.xlsx
• Extracts fluorescence change
• DOCC: Uses the first timepoint fluorescence as F₀
• DOWC: Uses the minimum fluorescence in the first cooling and warming cycle as Fmin
• Merges individual neuron results into a summary CSV and plot
Supporting modules that run internally:
File Name | Description |
---|---|
Generate_background.py |
Generates background list creation. |
individual_dFoverF0_1.py |
ΔF/F0 calculation for DOCC. |
individual_dFoverF0_DOWC.py |
ΔF/Fmin calculation for DOwC. |
merge_dFoverF0_1.py |
Merges all neuron result files into a combined dataset. |
utility.py |
Shared utility functions across all modules. |
-
Temperature Binding (CITbind_dynamic.py)
After individual sample processing, this script combines temperature data and calcium imaging results and generates aligned dual-axis plots.
• Generate summarized time-synchronized combined CSVs
• Generate plots of ΔF/F₀ and temperature (two versions: default and y-range limited) -
Summary Visualization (data_summary.py)
Once all individual samples have been processed, this script:
• Computes mean ± SEM
• Outputs a stacked plot (combined_gradient_plot.png) showing:
• Top panel: Average ΔF/F₀ or ΔF/Fmin
• Bottom panel: Temperature curve