Skip to content

Commit

Permalink
also output labels .tsv file
Browse files Browse the repository at this point in the history
  • Loading branch information
Julie-Fabre committed Sep 12, 2023
1 parent fa45e67 commit 091a0b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions bc_qualityMetrics_pipeline.asv
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,17 @@ original_id_we_want_to_load = 0;
number_of_spikes_for_this_cluster = qMetric.nSpikes(qMetric.phy_clusterID == original_id_we_want_to_load);


%% get unit labels
%% example: get unit labels
% the output of `uunitType = bc_getQualityUnitType(param, qMetric);` gives
% the unitType in a number format. 1 means good units, 2 means mua units, 3
% the unitType in a number format. 1 inidicates good units, 2 inidicates mua units, 3
% indicates non-somatic units and 0 indicates noise units (see below)
%
goodUnits = unitType == 1;
muaUnits = unitType == 2;
noiseUnits = unitType == 0;
nonSomaticUnits = unitType == 3;

% example: get all good units number of spikes
all_good_units_number_of_spikes = qMetric.nSpikes(goodUnits);

% (for use with another language: output a .tsv file of labels. You can then simply load t)
12 changes: 9 additions & 3 deletions bc_qualityMetrics_pipeline.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,21 @@
number_of_spikes_for_this_cluster = qMetric.nSpikes(qMetric.phy_clusterID == original_id_we_want_to_load);


%% get unit labels
%% example: get unit labels
% the output of `uunitType = bc_getQualityUnitType(param, qMetric);` gives
% the unitType in a number format. 1 inidicates good units, 2 inidicates mua units, 3
% indicates non-somatic units and 0 indicates noise units (see below)
%

goodUnits = unitType == 1;
muaUnits = unitType == 2;
noiseUnits = unitType == 0;
nonSomaticUnits = unitType == 3;

% example: get all good units number of spikes
all_good_units_number_of_spikes = qMetric.nSpikes(goodUnits);
all_good_units_number_of_spikes = qMetric.nSpikes(goodUnits);

% (for use with another language: output a .tsv file of labels. You can then simply load this)
label_table = table(unitType);
writetable(label_table,[savePath filesep 'templates._bc_unit_labels.tsv'],'FileType', 'text','Delimiter','\t');


0 comments on commit 091a0b6

Please sign in to comment.