-
Notifications
You must be signed in to change notification settings - Fork 147
Complete analysis pipeline
eftychios pnevmatikakis edited this page Feb 12, 2017
·
4 revisions
Details about the script run_pipeline.m
that demonstrates how to perform the full analysis pipeline (motion correction, source extraction, activity deconvolution):
- The user specifies a folder where all the datasets are located and the extension of the files.
- The datasets are first motion corrected using the NoRMCorre. Every registered file gets saved at the same folder in an hdf5 format, and the corresponding shifts as a mat file. The flag
non_rigid
specifies whether the algorithm should correct for rigid (faster) or for non-rigid (more accurate but slower) motion. - Downsampling and memory mapping: The hdf5 files are read sequentially, downsampled in time by a factor
tsub
and the downsampled data is saved as a single memory mapped file namedds_data.mat
. - The downsampled files is then used to determine the spatial components using the function
run_CNMF_patches
that runs the CNMF algorithm by breaking the FOV into patches ofpatch_size
with overlap in each direction and looking forK
components in each patch - The components are filtered against false positives with the function
classify_components
and can be further refined using the graphical user interfaceROI_GUI
. The selected components are kept into the variablesA_keep
andC_keep
. - The temporal components in the original resolution are then computed using the function
update_temporal_components_fast
and DF/F values are computed. - Deconvolution can then be performed on the detrended time series data.