Skip to content

Calcium Imaging Processing Pipeline of 3D time series

Notifications You must be signed in to change notification settings

murthylab/FlyCaImAn

 
 

Repository files navigation

FlyCaImAn - Fly Calcium Imaging Analysis Pipeline

Matlab code for analysis of calcium imaging data from the Drosophila brain, including motion correction, ROI segmentation, and detection of stimulus-modulated ROIs.

Organization of data

Pipeline

To process either 3DxT or 2DxT datasets:

    1. Convert tiffs to mat files (generate image data variable 'Data', and image metadata variable 'iDat').
    1. Pull extra information from metadata files ('.bin', '_vDat.mat', or '.mat' (LEDcontroler)).
    1. Do motion correction (using NoRMCorre).
    1. Do spatial and/or temporal resampling
    • this includes re-slicing for volumetric datasets and aligment relative to stimuli delivery.
    • generates main metadata variable used for ROI segmentation (wDat).
    1. select brain pixels (generate a binary mask).
    1. i) format stacks for ROI segmentation.
    1. ii) stitch (along z axis) and format stacks for ROI segmentation.
    1. ROI segmentation (in progress)
    1. Detect stimulus-modulated ROIs (in progress)

To register image segments to local whole brain and to in vivo atlas

  • (in progress)

Dependencies

For processing of imaging data this pipeline requires the following packages:

For processing of behavior videos with fictrac this pipeline requires the following packages:

  • Fictrac, see link for installation & dependencies (for windows see fic-trac-win).
  • generate calibration-transform.dat, and update that file in /toolbox/fictrac_offline/fictrac_settings

For saving figures install:

For stitching Z-stacks:

For interfacing with a cluster and ROI-related functions:

  • download pu_cluster_interface (it requires the user defined temporary folder to save job parameters)

Usage

To use this package

  1. Copy and edit fiji_fullpathedit.m (see that file for details), and save as fiji_fullpath.m.

For examples see all the demos: FlyCaImAn_demo.m FlyCaImAn_behavior_only_demo.m FlyCaImAn_behavior_plus_stimuli_demo.m FlyCaImAn_behavior_plus_stimuli_plus_imaging_demo.m FlyCaImAn_imaging_only_demo.m FlyCaImAn_Zstack_demo.m

Acknowledgements

Special thanks to:

Citation

If you use this code please cite the following paper: Pacheco, D.A., Thiberge, S.Y., Pnevmatikakis, E. et al. Auditory activity is diverse and widespread throughout the central brain of Drosophila. Nat Neurosci (2020). https://doi.org/10.1038/s41593-020-00743-y

About

Calcium Imaging Processing Pipeline of 3D time series

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 98.4%
  • ImageJ Macro 1.4%
  • M 0.2%