Sorting
Currently, there are 3 different sorting approaches implemented
Waveclus sorting (with potential to refine sorting in plexon)
Snippets sorting (sorting online detected spikes with plexon)
Realigned snippets sorting (re-aligning online detected spikes with plexon)
The latter two are basically identical in terms of workflow, so they are described in the same section.
For the waveclus pipeline, waveclus preprocessing to create snippets from Broadband is required.
Sorting pipeline
-
WC: Create waveclus pre-clustering files (implemented in
phys_gui)
WC: Run waveclus and sort for all channels, don’t forget to save (wave_clus3new3, MATLAB 2014+)
Create plxfiles (implemented in
phys_gui)
Check and clean PLX file and TAKE NOTES (single/SNR/stability rating)
Now we need to assess which units are the same within and across blocks (based on channel, electrode depths, spike shapes and potentially tuning, carefully check notes for this). For that purpose you might want to do the following steps in any order (potentially even going back and forth):
If you have finalized the sorting, create combined (phys+behavior) files (implemented in
phys_gui) (yes, once again, now that you have a different amount of cells)
-
-
Copy the automatic_soting entries to the final_sorting sheet of the
Excel sorting table and complete with manual entries.
Waveclus preprocessing workflow
Waveclus (pre-)sorting
How to use waveclus to sort spikes is a topic on its own, please see Waveclus for more detailed information
Plexon workflow
Plexon sorting
Sorting in plexon is - similar to waveclus - a topic on its own.
However, there are a few internal rules:
usually the biggest units are put first - this makes assigning same cells easier
better have one stable (and therefore useful) multiunit than 2 unstable single units
You can cut off in time if there is a specific section where sorting does not work
Problems with online detected snippets
All of these issues can make online snippet sorting very difficult. However, realigned snippets will have the (due to shift) missing information padded with 0's. This means that shifted snippets might appear like a different cluster. So they will potentially have to be sorted with redefined principle components for each subset.
Plexon file naming
Session_blocks_N.plx are based on online snippets
Session_realigned_blocks_N.plx are based on realigned online snippets
Session_from_BB_blocks_N.plx are based on waveclus clustering
Importantly, when you save a plx file, it never overwrites an existing file, but rather appends “-01” to the file name. If that filename already exists as well, it will append “-02” instead, and so on. That means, all files with “-NN” affixes are manually saved. Because of that, for all steps after sorting, the plx file extension (-01, -02, …) to use is defined in the plx_file_table.