Skip to content

Commit

Permalink
Spring cleaning
Browse files Browse the repository at this point in the history
Many new additions to the GUI, including global reference data and ground truth data
  • Loading branch information
petersenpeter committed Oct 31, 2019
1 parent 1d41454 commit ca49624
Show file tree
Hide file tree
Showing 140 changed files with 27,541 additions and 1,635 deletions.
4,328 changes: 3,229 additions & 1,099 deletions CellExplorer.m

Large diffs are not rendered by default.

71 changes: 46 additions & 25 deletions CellExplorer_Preferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,32 @@

% By Peter Petersen
% petersen.peter@gmail.com
% Last edited: 07-06-2019
% Last edited: 16-08-2019

% % % % % % % % % % % % % % % % % % % % % %
% Cell Explorer Preferences
% % % % % % % % % % % % % % % % % % % % % %

% Display settings - A incomplete list:
% 'Single waveform','All waveforms','All waveforms (image)','Single raw waveform','All raw waveforms','Single ACG',
% 'All ACGs','All ACGs (image)','CCGs (image)','Sharp wave-ripple','firingRateAcrossTime','firingRateMap',
% 'firingRateMap_CoolingStates','firingRateMap_LeftRight','rippleCorrelogram','thetaPhaseResponse'
UI.settings.customCellPlotIn1 = 'Single waveform';
% Display settings - An incomplete list:
% 'Single waveform','All waveforms','All waveforms (image)','Single raw waveform','All raw waveforms','Single ACG',
% 'All ACGs','All ACGs (image)','CCGs (image)','Sharp wave-ripple'
UI.settings.customCellPlotIn1 = 'All waveforms';
UI.settings.customCellPlotIn2 = 'Single ACG';
UI.settings.customCellPlotIn3 = 'firingRateAcrossTime';
UI.settings.customCellPlotIn3 = 'responseCurves_firingRateAcrossTime';
UI.settings.customCellPlotIn4 = 'All waveforms';
UI.settings.customCellPlotIn5 = 'CCGs (image)';
UI.settings.customCellPlotIn6 = 'firingRateMap';

UI.settings.acgType = 'Normal'; % Normal (100ms), Wide (1s), Narrow (30ms)
UI.settings.acgType = 'Normal'; % Normal (100ms), Wide (1s), Narrow (30ms), Log10
UI.settings.isiNormalization = 'Rate'; % 'Rate', 'Occurance'
UI.settings.monoSynDispIn = 'Selected'; % 'All', 'Upstream', 'Downstream', 'Up & downstream', 'Selected', 'None'
UI.settings.metricsTableType = 'Cells'; % ['Metrics','Cells','None']
UI.settings.metricsTableType = 'Metrics'; % ['Metrics','Cells','None']
UI.settings.plotCountIn = 'GUI 3+3'; % ['GUI 1+3','GUI 2+3','GUI 3+3','GUI 3+4','GUI 3+5','GUI 3+6']
UI.settings.dispLegend = 0; % [0,1] Display legend for scatter plots?
UI.settings.plotWaveformMetrics = 0; % show waveform metrics on the single waveform
UI.settings.sortingMetric = 'burstIndex_Royer2012'; % metrics used for sorting image data
UI.settings.referenceData = 'None'; % ['None','Image','Points']
UI.settings.groundTruthData = 'None'; % ['None','Image','Points']

% Autosave settings
UI.settings.autoSaveFrequency = 6; % How often you want to autosave (classifications steps). Put to 0 to turn autosave off
Expand All @@ -40,29 +43,39 @@
UI.settings.cellTypes = {'Unknown','Pyramidal Cell','Narrow Interneuron','Wide Interneuron'};
UI.settings.deepSuperficial = {'Unknown','Cortical','Deep','Superficial'};
UI.settings.tags = {'Good','Bad','Mua','Noise','InverseSpike','Other'};
UI.settings.groundTruth = {'PV+','NOS1+','GAT1+','SST+'};
UI.settings.groundTruthMarkers = {'ok','db','sm','*k','+d','p'}; % Supports any Matlab marker symbols: https://www.mathworks.com/help/matlab/creating_plots/create-line-plot-with-markers.html

% Cell type classification colors
UI.settings.groundTruth = {'PV+','NOS1+','GAT1+','SST+','Axoaxonic','5HT3a'};
UI.settings.groundTruthMarkers = {'om','dg','sm','*k','+k','+p'}; % Supports any Matlab marker symbols: https://www.mathworks.com/help/matlab/creating_plots/create-line-plot-with-markers.html
UI.settings.groundTruthColors = [[.5,.5,.5];[.8,.2,.2];[.2,.2,.8];[0.2,0.8,0.8];[0.8,0.2,0.8];[.2,.8,.2]];
UI.settings.cellTypeColors = [[.5,.5,.5];[.8,.2,.2];[.2,.2,.8];[0.2,0.8,0.8];[0.8,0.2,0.8];[.2,.8,.2]];

% Fields used to define the tSNE represetation
% tSNE representation
UI.settings.tSNE_metrics = {'firingRate','thetaModulationIndex','burstIndex_Mizuseki2012','troughToPeak','ab_ratio','burstIndex_Royer2012','acg_tau_rise','acg_tau_burst','acg_h','acg_tau_decay','cv2','burstIndex_Doublets','troughtoPeakDerivative'};
UI.settings.tSNE_dDistanceMetric = 'euclidean'; % default: 'euclidean'
UI.settings.tSNE_exaggeration = 15; % default: 15
UI.settings.tSNE_standardize = false; % boolean

UI.settings.tSNE_calcWideAcg = false; % boolean
UI.settings.tSNE_calcNarrowAcg = false; % boolean
UI.settings.tSNE_calcLogAcg = false; % boolean
UI.settings.tSNE_calcLogIsi = false; % boolean
UI.settings.tSNE_calcFiltWaveform = false; % boolean
UI.settings.tSNE_calcRawWaveform = false; % boolean

% List of fields to use in the general tSNE representation
UI.settings.tSNE_metrics = {'firingRate','thetaModulationIndex','burstIndex_Mizuseki2012','troughToPeak','ab_ratio','burstIndex_Royer2012','acg_tau_rise','acg_tau_burst','acg_h','acg_tau_decay','cv2','burstIndex_Doublets','derivative_TroughtoPeak','filtWaveform_zscored','acg2_zscored'}; % 'thetaPhaseTrough','thetaEntrainment'

% Highlight excitatory / inhibitory cells
UI.settings.displayInhibitory = false; % boolean
UI.settings.displayExcitatory = false; % boolean
UI.settings.displayExcitatoryPostsynapticCells = false; % boolean
UI.settings.displayInhibitoryPostsynapticCells = false; % boolean

% Firing rate map setting
UI.settings.firingRateMap.showHeatmap = false; % boolean
UI.settings.firingRateMap.showLegend = false; % boolean
UI.settings.firingRateMap.showHeatmapColorbar = false; % boolean

% % % % % % % % % % % % % % % % % % % % % %
% Spikes plot definitions
%
% Can be loaded by pressing S in the Cell Explorer
% Can be loaded by pressing CTRL+A in the Cell Explorer
% % % % % % % % % % % % % % % % % % % % % %

plotName = 'spikes_pos_vs_phase';
Expand All @@ -75,6 +88,7 @@
spikesPlots.(plotName).filterType = 'greater than'; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 20;
spikesPlots.(plotName).event = '';
spikesPlots.(plotName).eventType = 'event'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'peak'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
Expand All @@ -95,6 +109,7 @@
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = '';
spikesPlots.(plotName).eventType = 'event'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'peak'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
Expand All @@ -115,6 +130,7 @@
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = '';
spikesPlots.(plotName).eventType = 'event'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'peak'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
Expand All @@ -135,6 +151,7 @@
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = '';
spikesPlots.(plotName).eventType = 'event'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'peak'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
Expand All @@ -152,20 +169,21 @@
spikesPlots.(plotName).y_label = 'Event';
spikesPlots.(plotName).state = '';
spikesPlots.(plotName).filter = '';
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = 'ripples';
spikesPlots.(plotName).eventAlignment = 'peak'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
spikesPlots.(plotName).eventSecAfter = 0.2; % in seconds
spikesPlots.(plotName).eventType = 'event'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'peak'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
spikesPlots.(plotName).eventSecAfter = 0.2; % in seconds
spikesPlots.(plotName).plotRaster = 1;
spikesPlots.(plotName).plotAverage = 1;
spikesPlots.(plotName).plotAmplitude = 1;
spikesPlots.(plotName).plotDuration = 1;
spikesPlots.(plotName).plotCount = 0;

plotName = 'spikes_pvLightStimulation';
plotName = 'spikes_optoStim';
spikesPlots.(plotName).x = 'times';
spikesPlots.(plotName).y = 'times';
spikesPlots.(plotName).x_label = 'Time';
Expand All @@ -174,7 +192,8 @@
spikesPlots.(plotName).filter = '';
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = 'pvLightStimulation';
spikesPlots.(plotName).event = 'optoStim';
spikesPlots.(plotName).eventType = 'manipulation'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'onset'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'time'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.1; % in seconds
Expand All @@ -195,6 +214,7 @@
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = 'stimulation';
spikesPlots.(plotName).eventType = 'manipulation'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'onset'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'amplitude'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 2; % in seconds
Expand All @@ -215,6 +235,7 @@
spikesPlots.(plotName).filterType = ''; % [none, equal to, less than, greater than]
spikesPlots.(plotName).filterValue = 0;
spikesPlots.(plotName).event = 'pulses';
spikesPlots.(plotName).eventType = 'manipulation'; % [event,manipulation,state]
spikesPlots.(plotName).eventAlignment = 'onset'; % [onset, offset, center, peak]
spikesPlots.(plotName).eventSorting = 'none'; % [none, time, amplitude, duration]
spikesPlots.(plotName).eventSecBefore = 0.2; % in seconds
Expand Down
Loading

0 comments on commit ca49624

Please sign in to comment.