bahanonu / ciatah

CIAtah (pronounced cheetah): a software package for calcium imaging analysis of one- and two-photon imaging datasets. Documentation: https://git.io/ciatah_docs. Formerly known as calciumImagingAnalysis (ciapkg).
https://git.io/ciatah_docs
MIT License
80 stars 20 forks source link
animal-tracking calcium-imaging matlab miniscope-imaging motion-correction signal-extraction

CIAtah

Maintenance GitHub release (latest by date) GitHub top language GitHub license GitHub code size in bytes visitors


CIAtah (pronounced cheetah; formerly calciumImagingAnalysis [ciapkg]) is a software package for analyzing one- and two-photon calcium imaging datasets. It can also be used to process other imaging datasets (e.g. from non-calcium indicators and dyes).

ciatah_logo

CIAtah currently requires MATLAB and runs on all major operating systems (Windows, Linux [e.g. Ubuntu], and macOS).

Full documentation at https://bahanonu.github.io/ciatah/.

Below are recordings and additional documents for users who want to learn more about calcium imaging analysis/experiments and the CIAtah pipeline.

Book chapter — We have a book chapter that goes over all steps of miniscope imaging: viral injections, GRIN lens probe implant, pain experimental design, data processing and neural/behavioral analysis, and more.

Webinar — This webinar gives an overview of calcium imaging analysis (with a focus on CIAtah) along with tips for improving experiments and analysis: https://info.inscopix.com/inscopix-inspire-view-webinarbiafra-ahanonu-signal-in-the-noise-distinguishing-relevant-neural-activity-in-calcium-imaging.

Workshop tutorial — This recording gives an overview of setting up and using CIAtah: https://www.youtube.com/watch?v=I6abW3uuJJw.

Imaging analysis tools My table with many current imaging analysis tools: https://github.com/bahanonu/imaging_tools.

GRINjector — A surgical device to help with implanting gradient-refractive index (GRIN) lens probes into the brain or other regions: https://github.com/bahanonu/GRINjector.

Upcoming motion correction methods — Methods for motion correction of spinal imaging data using feature identification (e.g. with DeepLabCut), control point registration, and other methods. Additional updates on integration into CIAtah in the future.

Contents

Contact: Biafra Ahanonu, PhD (github [at] bahanonu [dot] com).

Made in USA.

USA

CIAtah features

CIAtah example features

Support for entire calcium imaging pipeline.

ciapkgMovie

Movie processing, cell extraction, and analysis validation.

• Press play if auto-play disabled.

ciapkgMovie

Cell sorting GUI.

• Press play if auto-play disabled.

ciapkgMovie

Stable cell alignment across imaging sessions.

• Press play if auto-play disabled.

m121_matchedCells


Quick start guide

Below are steps needed to quickly get started using the CIAtah software package in MATLAB.

Download and install CIAtah

Check required toolboxes are installed

CIAtah depends on several MATLAB toolboxes to run properly. Run the below command to have CIAtah check whether dependencies have been installed properly. If not, use the Add-Ons (https://www.mathworks.com/help/matlab/matlab_env/get-add-ons.html) explorer to install each toolbox.

ciapkg.io.matlabToolboxCheck();

Setup CIAtah

ciapkg.io.loadDependencies;
% Loads the class into an object for use in this session
obj = ciatah();

% Runs routines to check dependencies and help user get setup.
obj.setup();

% Open the class menu (always type `obj` then enter load the class/modules menu)
obj % then hit enter, no semicolon!

Visualize movies quickly using read from disk

Users can quickly visualize movies in any of the supported formats (HDF5, NWB, AVI, TIFF, ISXD, etc.) using the playMovie function. This will read directly from disk, allowing users to scroll through frames to visually check movies before or after processing.

Users can run via the command-line:

% Use the absolute path to the movie file or a valid relative path.
ciapkg.api.playMovie('ABSOLUTE\PATH\TO\MOVIE');

When using HDF5 files, check the dataset name containing movie with h5disp then input the full dataset name (e.g. below is for a standard NWB-formatted HDF5 file):

ciapkg.api.playMovie('ABSOLUTE\PATH\TO\MOVIE','inputDatasetName','/acquisition/TwoPhotonSeries/data');

Alternatively, using the ciatah GUI class, users can select loaded folders and change the regular expression to match the name of the files in the movie, both for the raw data and for any processed movies in the folder. See below:

ciapkgMovie

Quick start (command line or GUI-less batch analysis)

After downloading CIAtah and running the setup as above, users interested in command-line processing can open up the example M-file by running the below command. By running individual code-block cells, users are guided from pre-processing through cell-extraction to cross-session analysis.

edit ciapkg.demo.cmdLinePipeline

Users can import the CIAtah ciapkg that contains the command-line functions using the below command at the beginning of their functions. This will import all ciapkg functions into the functions workspace such that ciapkg.api.loadMovieList() (an alias for ciapkg.io.loadMovieList()) can be called as loadMovieList().

import ciapkg.api.* % import CIAtah functions in ciapkg package API.

Acknowledgments

Thanks to Jones G. Parker, PhD (https://parker-laboratory.com/) for providing extensive user feedback during the development of the CIAtah software package.

Additional thanks to Drs. Jesse Marshall, Jérôme Lecoq, Tony H. Kim, Hakan Inan, Lacey Kitch, Maggie Larkin, Elizabeth Otto Hamel, Laurie Burns, and Claudia Schmuckermair for providing feedback, specific functions, or helping develop aspects of the code used in CIAtah.

References

Please cite Corder, Ahanonu, et al. 2019 Science publication or the Ahanonu, 2018 Zenodo release if you used the software package or code from this repository to advance/help your research:

@article{corderahanonu2019amygdalar,
  title={An amygdalar neural ensemble that encodes the unpleasantness of pain},
  author={Corder, Gregory and Ahanonu, Biafra and Grewe, Benjamin F and Wang, Dong and Schnitzer, Mark J and Scherrer, Gr{\'e}gory},
  journal={Science},
  volume={363},
  number={6424},
  pages={276--281},
  year={2019},
  publisher={American Association for the Advancement of Science}
}

Please cite the Ahanonu and Corder, 2022 book chapter if you used procedures detailed therein.

@incollection{ahanonu2022recording,
  title={Recording Pain-Related Brain Activity in Behaving Animals Using Calcium Imaging and Miniature Microscopes},
  author={Ahanonu, Biafra and Corder, Gregory},
  booktitle={Contemporary Approaches to the Study of Pain},
  pages={217--276},
  year={2022},
  publisher={Springer}
}

Please cite the Ahanonu, Crowther, 2023 preprint on spinal cord imaging if you use related methods or procedures.

@article{ahanonu2023long,
  title={Long-term optical imaging of the spinal cord in awake, behaving animals},
  author={Ahanonu, Biafra and Crowther, Andrew and Kania, Artur and Casillas, Mariela Rosa and Basbaum, Allan},
  journal={bioRxiv},
  pages={2023--05},
  year={2023},
  publisher={Cold Spring Harbor Laboratory}
}

Please see https://bahanonu.github.io/ciatah/references/ for additional references depending on processing steps undertaken.

Questions?

Please email any additional questions not covered in the repository to github [at] bahanonu [dot] com or open an issue.

Users with versions of MATLAB earlier than R2019b can download CIAtah version v3 (see Releases) until pre-R2019b MATLAB support is fully integrated into v4.

License

Copyright (C) 2013-2023 Biafra Ahanonu

This project is licensed under the terms of the MIT license. See LICENSE file for details.

Repository stats

Statistics on total hits on the main repository and documentation pages. Several badges are present as certain services have gone offline or count page hits differently.