How to convert data with SpikeInterface

This guide shows you how to create the GUI’s input files from any recording system or spike sorter that SpikeInterface can read, such as Open Ephys.

Prerequisites

  • SpikeInterface installed in your analysis environment.

  • A SortingAnalyzer for the sorting, with the templates, spike_amplitudes and quality_metrics extensions computed.

Steps

  1. Build the SortingAnalyzer and compute the extensions the exporter needs, following the SpikeInterface documentation.

  2. Export it with export_to_ibl_gui. Pass the LF band recording as lfp_recording to also get the LF RMS and power spectrum plots:

    from spikeinterface.exporters import export_to_ibl_gui
    
    export_to_ibl_gui(
        sorting_analyzer,
        output_folder='/path/to/output',
        lfp_recording=lfp_recording,
    )
    

    The AP band RMS is computed only if the analyzer has its recording attached.

  3. Check that the output folder holds spikes.*, clusters.* and channels.* files, and the _iblqc_* files.

  4. In the session YAML, use the output folder as both the spike_sorting and the processed_ephys folder (see How to write a session YAML for one probe).

The exporter’s good_units_query sets which units are labelled good in clusters.metrics.csv, which the unit filters use (see How to show only well-isolated units).