Skip to content

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):

  1. The user specifies a folder where all the datasets are located and the extension of the files.
  2. 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.
  3. 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 named ds_data.mat.
  4. 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 of patch_size with overlap in each direction and looking for K components in each patch
  5. The components are filtered against false positives with the function classify_components and can be further refined using the graphical user interface ROI_GUI. The selected components are kept into the variables A_keep and C_keep.
  6. The temporal components in the original resolution are then computed using the function update_temporal_components_fast and DF/F values are computed.
  7. Deconvolution can then be performed on the detrended time series data.