Electrophysiology analysis pipeline with SpikeInterface.
The pipeline is based on Nextflow and it includes the following steps:
- job-dispatch: generates a list of JSON files to be processed in parallel. Parallelization is performed over multiple probes and multiple shanks (e.g., for NP2-4shank probes). The steps from
preprocessing
tovisualization
are run in parallel. - preprocessing: phase_shift, highpass filter, denoising (bad channel removal + common median reference ("cmr") or highpass spatial filter - "destripe"), and motion estimation (optionally correction)
- spike sorting: several spike sorters are available:
- postprocessing: remove duplicate units, compute amplitudes, spike/unit locations, PCA, correlograms, template similarity, template metrics, and quality metrics
- curation: based on ISI violation ratio, presence ratio, and amplitude cutoff and pretrained unit classifier (UnitRefine)
- visualization: timeseries, drift maps, and sorting output in figurl
- result collection: this step collects the output of all parallel jobs and copies the output folders to the results folder
- export to NWB: creates NWB output files. Each file can contain multiple streams (e.g., probes), but only a continuous chunk of data (such as an Open Ephys experiment+recording or an NWB
ElectricalSeries
). This step includes additional sub-steps:
The documentation is available at ReadTheDocs.
At AIND, the pipeline is deployed on the Code Ocean platform. Since currently Code Ocean does not support conditional processes, pipelines running different sorters and AIND-specific options are implemented in separate branches.
This is a list of the available pipeline branches that are deployed in Code Ocean:
main
/co_kilosort4
: pipeline with Kilosort4 sorterco_kilosort25
: pipeline with Kilosort2.5 sorterco_spykingcircus2
: pipeline with Spyking Circus 2 sorterco_kilosort25_opto
: pipeline with Kilosort2.5 sorter and optogenetics artifact removalco_kilosort4_opto
: pipeline with Kilosort4 sorter and optogenetics artifact removalco_spykingcircus2_opto
: pipeline with Spyking Circus 2 sorter and optogenetics artifact removal