Calcium imaging functional analysis
The default class is a BaseFish from fishy.py. We offer a process.py for various analyses. The standard implementation runs motion correction via caiman and then source extraction via suite2p, and most of the more advanced classes assume a suite2p folder with contained sources.
We leverage a folder structure that contains all experiment items
This assumes you are using Anaconda and Python 3:
-
Install Mambaforge
-
Create a new environment and install Caiman. Note: helpful information on caiman can be found here
mamba create -n caiman -c conda-forge caiman -
Activate the envs (note: python should be 3.7x)
mamba activate caiman -
Install suite2p
python -m pip install suite2p -
Edit suite2p documentation to fit with scipy and numpy versions compatible with caiman
\Lib\site-packages\suite2p\detection\sparsedetect.py
Remove the 'keepdims' arg from line 256
-
Install more packages
python -m pip install tables nptdms pyarrow -
Optional: Download mimic_alpha into your new caiman envs - this package converts a list of RGB color that mimic a RGBA on a given background. This is useful for plotting.
core: motion correction, source extraction, calculate factors
utils: ideally things used multiple places, converts timestamps, stimuli, etc into dataframes
visualize: various visualization of response-classes, barcodes, neuron functions, etc
Issues:
sometimes processing multiple fish at a time gives permission errors: unclear reproducibility, just refresh and give it another go
