A pipeline for processing light beads microscopy (LBM) datasets using the flatironinstitute/CaImAn-MATLAB pipeline.
For a python implementation, see here
To use this pipeline, the code in this repository needs to be on your MATLAB path
. You can do this easily by:
- Downloading the code via the blue
<> Code
button above, and select ->Download
- Find your matlab path by opening MATLAB and entering
userpath
- Extract this downloaded folder anywhere listed here on your MATLAB path, typically
C:/Users/<Username>/Documents/MATLAB/
- Right click on "core" and "packages" folders ->
Add to Path
->Selected Folders and Subfolders
When re-opening MATLAB, you may need to re-add the core
and package
folders to your path. You could similarly add
an addpath(genpath(fullfile(path/to/code))
to prevent this.
For more details about installation, including with git
, on different operating systems, see the installation docs.
The best way to begin with this pipeline is the demo_LBM_pipeline.m
file at the root of this project.
Modifications of this pipeline script are included in the use_cases folder.
For the last step in the pipeline, you will need 2 calibration files aquired before the experiment:
pollen_sample_calibraion_xy.mat
pollen_calibration_z_vs_N.fig
- MATLAB (Tested on 2023a, 2024a)
- Windows 10 or Ubuntu 22.04
- Toolboxes:
- Parallel Computing Toolbox
- Statistics and Machine Learning Toolbox
- Image Processing Toolbox
- Signal Processing Toolbox
The pipeline won't work with MacOS without the correct mex
binaries. If this needed, submit an issue.
The most up to date mexfiles are always kept in the releases on Github.
This pipeline is unique only in the routines to extract raw data from ScanImage BigTiff files, as is outlined below:
Once data is extracted to an intermediate .h5
filetype, registration, segmentation and deconvolution can all be performed as described in the pipelines documentation.
Follow the root demo_LBM_pipeline.m
file for an example pipeline, or the root /notebooks
folder for more in-depth exploration of individual pipeline steps.
There are several utility functions you can take advantage of in the core/utils
folder/. Learn about them in the docstrings via the api documentation.
The following algorithms perform the main computations and are included by default in the pipeline:
- CNMF segmentation and neuronal source extraction.
- NoRMCorre piecewise rigid motion correction.
- constrained-foopsi constrained deconvolution spike inference.