Table of Contents

Ephys pipeline overview

monkeypsych ↔ TDT ⇒ https://github.com/dagdpz/Phys_preprocessing

Folder structure

Inputs Info
Y:\Data\TDTtanks\Monkey_phys Raw TDT data
Y:\Data\Sortcodes\Monkey_phys sorting related files
Y:\Data\Monkey behavioral data
\Dropbox\DAG\phys\Monkey_phys_dpz\Electrode_depths.mat electrode depths documentation
\Dropbox\DAG\phys\Monkey_phys_dpz\Same_cells.mat same cells across blocks assignment
Outputs Info
Y:\Data\Monkey_phys_mat_from_TDT recorded data, arranged in the same trial structure as the behavioral data
Y:\Data\Monkey_phys_combined_monkeypsych_TDT trial structures with combined behavioral and ephys data
Y:\Data\All_phys_preprocessing_log\Monkey_phys automatically created log files of all preprocessing performed
\Dropbox\DAG\phys\Monkey_phys_dpz\plx_files.xls (for multiple sortings:) used plx file documentation
\Dropbox\DAG\phys\Monkey_phys_dpz\Mon_sorted_neurons.xlsblock/run/unit electrode locations, IDs, ratings, and procedures information

General Workflow

  1. Fill in Electrode depths file (required as first step for WC pipeline)
  2. WC: Create waveclus pre-clustering files (implemented in phys_gui)
  3. WC: Run waveclus and sort for all channels, don’t forget to save (wave_clus3new3, MATLAB 2014+)
    • Preferentially separate spike shapes in difficult cases
  4. Create plxfiles (implemented in phys_gui)
  5. Check and clean PLX file and TAKE NOTES (single/SNR/stability rating)
  6. 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):
    • Create combined (phys+behavior) files (implemented in phys_gui)
    • Assign same cells across blocks in Same cells file
    • Plot single unit tuning assuming cells are unique in every block (implemented in phys_gui) - This is meant to help assessing if two “units” in the same block might actually be the same (if they have very similar tuning properties)
    • Re-sort PLX file (combining same cells sort codes of same block same channel)
  7. 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)
  8. Complete Same cells file
  9. Automatically update the automatic_sorting sheet from the Excel sorting table using phys_gui
  10. Copy the automatic_soting entries to the final_sorting sheet of the Excel sorting table and complete with manual entries.

Associated code

For loading and writing plx files we use an external toolbox located in Github External_unmodified/Matlab Offline Files SDK repository

The remaining code related to phys preprocessing (not including Waveclus and Plexon) can be found on Github Phys_preprocessing repository