User Tools

Site Tools


Spike analysis pipeline overview

Folder structure

Inputs Info
\Dropbox\DAG\phys\Monkey_phys_dpz\Mon_sorted_neurons.xls electrode locations, unit/site IDs,SNR/Stability/single ratings
\GitHub\Settings\spike_analysis\project project and version specific settings (keys)
Y:\Data\Monkey_phys_combined_monkeypsych_TDT raw data

Outputs in Y:\Projects\project\ephys\version:

File Info
population_monkey_session.mat spike data sorted by unit for each session
sites_monkey_session.mat LFP data sorted by site for each session
by_block_monkey_session.mat body signals sorted by block for each session
Mon_sorted_neurons.xls copies of the used sorted neurons tables from dropbox
keys_Monkey.mat copy of the keys used when running ph_initiation
tuning_table_combined.mat Anova results stored in a table
tuning_table_combined_CI.mat Anova results restructured accroding to contra/ipsi definitions
tuning_table_combined.xls simplified excel table
seed.mat a saved seed to make randomizations reproducable
Subfolder Info
spike_shapes Spike shapes, firing rates over time, and ISI plots
single_cell_examples Single cell plots
cell_counts Anova results as pie plots
scatter Anova results as scatter plots (one column versus another)
population_analysis population PSTHs
response timing tuning over time plots

General Workflow

  • ph_initiation(project,{version1,version2,…})
    1. read in general settings → project settings → version settings
    2. loop per monkey: ph_session_processing (core function)
      • read in data from Y:\Data\Monkey_phys_combined_monkeypsych_TDT
      • run monkeypsych_analyze for saccade detection etc.
      • run ph_run_state_alignment_per_trial
        • takes over relevant trial and state (event) information from monkeypsych_analyze output (TDT_states and saccade/reach initiation)
        • combines it with Sorted Neuron table information
        • !! Copies last 1 second of spikes to beginning of next trial
        • !! Cuts and appends last 1 second of streams to beginning of next trial
        • !! excludes trials without physiology data And/or NOT matching condition
      • resort data by unit/site/block
      • plot waveforms/ISI/FR_across time per unit
      • exclude units dependent on excel entries (SNR/stability/single rating)
      • plot waveforms/ISI/FR_across time per unit again for remaining units
      • run ANOVAs (ph_ANOVAS) and create tuning table
      • create single cell plots (ph_plot_unit_per_condition)
      • save files per session
    3. format tuning table (create tuning_table_combined_CI.mat and tuning_table_combined.xls)
    4. ph_get_filelist for crossreferencing with behavior
    5. ph_initiate_population_analysis also runs population analysis


  • Very important: In additi

Associated code


spike_analysis_pipeline/pipeline_overview.txt · Last modified: 2022/05/17 14:39 by lukas.schneider