flatironinstitute / CaImAn-MATLAB

Complete Matlab pipeline for large scale calcium imaging data analysis
GNU General Public License v2.0
252 stars 147 forks source link
calcium-imaging matlab roi-segmentation source-extraction spike spike-deconvolution spike-inference

CaImAn-MATLAB

A Computational toolbox for large scale Calcium Imaging data Analysis. The code implements the CNMF algorithm [1] for simultaneous source extraction and spike inference from large scale calcium imaging movies. Many more features are included (see below). The code is suitable for the analysis of somatic imaging data.

This code is no longer maintained and is left available and unsupported, for any purpose users may be able to make of it. For any concerns relating to the code, you may be able to get some extremely limited support from the current maintainers of the python software package. Please do not file issues against this package as they will likely never be addressed (or seen). This package is not looking for a new maintainer; it is most appropriate to leave it as a historical archive.

Features and methods included

2018: Renamed to CaImAn-MATLAB

We moved the code into the Flatiron Institute github account and renamed the repository to CaImAn-MATLAB to bring it more in touch with the CaImAn Python package. Everything else is the same. The old link https://github.com/epnev/ca_source_extraction redirects here.

Citation

If you use this code please cite the corresponding papers where original methods appeared (see References below), as well as:

[1] Giovannucci A., Friedrich J., Gunn P., Kalfon J., Koay S.A., Taxidis J., Najafi F., Gauthier J.L., Zhou P., Tank D.W., Chklovskii D.B., Pnevmatikakis E.A. (2018). CaImAn: An open source tool for scalable Calcium Imaging data Analysis. bioarXiv preprint. [paper]

References

The following references provide the theoretical background and original code for the included methods.

Deconvolution and demixing of calcium imaging data

[1] Pnevmatikakis, E.A., Soudry, D., Gao, Y., Machado, T., Merel, J., ... & Paninski, L. (2016). Simultaneous denoising, deconvolution, and demixing of calcium imaging data. Neuron 89(2):285-299, [paper].

[2] Pnevmatikakis, E.A., Gao, Y., Soudry, D., Pfau, D., Lacefield, C., ... & Paninski, L. (2014). A structured matrix factorization framework for large scale calcium imaging data analysis. arXiv preprint arXiv:1409.2903. [paper].

[3] Friedrich J. and Paninski L. Fast active set methods for online spike inference from calcium imaging. NIPS, 29:1984-1992, 2016. [paper], [Github repository - Python], [Github repository - MATLAB].

[4] Pnevmatikakis, E. A., Merel, J., Pakman, A., & Paninski, L. Bayesian spike inference from calcium imaging data. In Signals, Systems and Computers, 2013 Asilomar Conference on (pp. 349-353). IEEE, 2013. [paper], [Github repository - MATLAB].

Motion Correction

[5] Pnevmatikakis, E.A., and Giovannucci A. (2017). NoRMCorre: An online algorithm for piecewise rigid motion correction of calcium imaging data. Journal of Neuroscience Methods, 291:83-92 [paper], [Github repository - MATLAB].

Code description

The best way to start is by looking at the various demos.

Python

A complete analysis Python pipeline including motion correction, source extraction and activity deconvolution is performed through the package CaImAn. This package also includes methods for online processing of calcium imaging data and elements of behavioral analysis in head fixed mice.

Usage and Documentation

Check the demo scripts and the wiki to get started.

Dependencies

The following matlab toolboxes are needed for the default parameter settings:

Depending on the settings the following toolboxes may also be required

Depending on the settings the following packages may also be required

Developers

This package was mainly developed and maintained by Eftychios A. Pnevmatikakis (Flatiron Institute, Simons Foundation) with help from a lot of contributors.

Acknowledgements

Special thanks to the following people for letting us use their datasets for our various demo files:

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.