This repository contains the data and code used to generate Figure 1-15 and Figure 20 of the manuscript "Minian an Open-source Miniscope Analysis Pipeline"
data/contains raw and intermediate data.minian_snapshot/contains a copy of minian that's used for analysis.ezTrack_snapshot/contains a copy of ezTrack that's used for analysis.figs/contains all the generated figures.misc/contains some simple script to generate the dependency table used in the paper.concat_video.ipynbconcatenate behavior videos so they can be easily processed with ezTrack.cross-registration.ipynbis a modified version of minian notebook that register cells across sessions.cross-registration_shuffle.ipynbis a modified version of minian notebook that shuffle the location of cells (spatial footprints) and generated cell mappings across sessions.pipeline_paper.ipynbis a modified version of minian pipeline to facilitate taking snapshot of visualizations.place_cell.ipynb/place_cell.pyextracts place cells from neural activities based on critirias.validate.pygenerate a validation plot that is now obsolete.validate_plc.pyvalidate spatial firing pattern of place cells across original and shuffled cell mappings and generate fig 20.flow_chart.pygenerate the flow chart of the pipeline (fig 1).
conda env create -n minian_paper_data -f misc/encironment.yml
The source data are hosted on figshare. We have a convenient script to retrieve all the necessary data.
python get_data.py
python flow_chart.py
Run through pipeline_paper.ipynb and use the developer tool in the browser (preferrable google chrome) to take snapshot with a specific size.
Since all the intermediate data are retrieved with get_data.py under ./data/inter, this section can be skipped if you just want to reproduce plotting of Figure 20.
- run through
./concat_video.ipynband then./ezTrack_snapshot/LocationTracking_BatchProcess.ipynbto produce location tracking results. - for each
pipeline.ipynbunder./data/pfd2, changeminian_pathto"../../../minian_snapshot"and run through the notebook to reproduce minian results. - run through
./cross-registration.ipynband./cross-registration_shuffle.ipynbto reproduce cross registrationi results. - run through
./place_cell.ipynbto classify place cells.
python validate_plc.py