123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- %% Script to review the spike amplitude using means and sds
- % This script calculates average values of the spike amplitudes for
- % different groups that were stated in the analysis. To evaluate the
- % consistency of the groups and the spike amplitude it self standard
- % deviations are reviewed. All results are displayed in the command window
- % with a clear layout.
- % -------------------------------------------------------------------------
- % Program by: Bjarne Schultze [last modified: 08.03.2022]
- % -------------------------------------------------------------------------
- % load the deanonymization file
- load("../AdditionalFiles/deanonymization.mat")
- % get the numbers of the cells in each package
- pack_1_3 = find(eq(deanonymization.package(:,1),13));
- pack_2 = find(eq(deanonymization.package(:,1),2));
- pack_4_6 = find(eq(deanonymization.package(:,1),46));
- pack_5 = find(eq(deanonymization.package(:,1),5));
- % take the assigned cell types into account
- int218 = find(eq(deanonymization.cellType(:,1),218));
- int162 = find(eq(deanonymization.cellType(:,1),162));
- int264 = find(eq(deanonymization.cellType(:,1),264));
- int212 = find(eq(deanonymization.cellType(:,1),212));
- int201203 = find(eq(deanonymization.cellType(:,1),201203));
- int159 = find(eq(deanonymization.cellType(:,1),159));
- int157 = find(eq(deanonymization.cellType(:,1),157));
- int6061 = find(eq(deanonymization.cellType(:,1),6061));
- % obtian the spike amplitudes and the standard deviations (the latter are
- % not included in the decisionData file)
- [spike_heights,spk_hghts_SD] = intSpikeHeight(1:62);
- % remove measurements for the interneurons without spikes
- spike_heights([5,10,26,36,38,40],1) = NaN;
- spk_hghts_SD([5,10,26,36,38,40],1) = NaN;
- % define the three groups for the spike amplitudes: small, medium, large
- smallSpikers = find(spike_heights < 9);
- mediumSpikers = find(spike_heights >= 9 & spike_heights < 30);
- largeSpikers = find(spike_heights >= 30);
- % display an overview of the central tendencies for the whole dataset and
- % for the three single spike amplitude groups. The sd gives the standard
- % deviation of the spike amplitude within the current group. This is an
- % estimation of how consistent the groups are regarding the spike amplitude
- spikeAmpGroups = ...
- sprintf("\nCentral tendencies of the spike amplitude \n" + ...
- "(non-spiking interneurons excluded, mean \x00B1 sd): \n" + ...
- "\tAll: %0.2f mV (mean), %0.2f mV (median) \n" + ...
- "\tSmall spikers: \t%05.2f \x00B1 %0.2f mV \n" + ...
- "\tMedium spikers: %0.2f \x00B1 %0.2f mV \n" + ...
- "\tLarge spikers: \t%0.2f \x00B1 %0.2f mV", ...
- mean(spike_heights,'omitnan'), median(spike_heights,'omitnan'), ...
- mean(spike_heights(smallSpikers),'omitnan'),...
- std(spike_heights(smallSpikers),'omitnan'), ...
- mean(spike_heights(mediumSpikers),'omitnan'), ...
- std(spike_heights(mediumSpikers),'omitnan'), ...
- mean(spike_heights(largeSpikers),'omitnan'), ...
- std(spike_heights(largeSpikers),'omitnan'));
- disp(spikeAmpGroups)
- % display an overview of the standard deviations of the spike amplitudes of
- % each single neuron. Spike amplitude deviations are averaged for the
- % stated groups and give an estimation about how constant the spike
- % amplitude was for one cell.
- sd_spikeAmpNeurons = sprintf("\nStandard deviations of the spike " + ...
- "amplitude measured for single cells and then averaged for the " + ...
- "stated groups \n(non-spiking interneurons excluded): \n" + ...
- "\tAll: \t\t\t%0.2f mV \n" + ...
- "\tSmall spikers: \t%0.2f mV\n" + ...
- "\tMedium spikers: %0.2f mV \n" + ...
- "\tLarge spikers: \t%0.2f mV \n" + ...
- "\tSmall and medium spikers: %0.2f mV", ...
- mean(spk_hghts_SD, 'omitnan'), ...
- mean(spk_hghts_SD(smallSpikers),'omitnan'), ...
- mean(spk_hghts_SD(mediumSpikers),'omitnan'), ...
- mean(spk_hghts_SD(largeSpikers),'omitnan'),...
- mean(spk_hghts_SD([smallSpikers;mediumSpikers]),'omitnan'));
- disp(sd_spikeAmpNeurons)
- % create an overview about the average spike amplitude for the single
- % interneuron cell types as they were assigned based on size and location
- % in the ganglion. Sds are within those groups
- spikeAmpNeurons = sprintf("\nAverage spike amplitudes for the " + ...
- "assigned cell types \n(non-spiking interneurons excluded, " + ...
- "mean \x00B1 sd) \n" + ...
- "\t Int 60-61: \t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 157: \t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 159: \t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 162: \t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 201-203: \t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 212: \t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t without the two large spikers: \n" + ...
- "\t\t\t\t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 218: \t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t including the two large spikers labelled as 212: \n" + ...
- "\t\t\t\t\t%05.2f \x00B1 %05.2f mV \n" + ...
- "\t Int 264: \t\t%05.2f \x00B1 %05.2f mV", ...
- mean(spike_heights(int6061),'omitnan'), ...
- std(spike_heights(int6061),'omitnan'), ...
- mean(spike_heights(int157),'omitnan'), ...
- std(spike_heights(int157),'omitnan'), ...
- mean(spike_heights(int159),'omitnan'), ...
- std(spike_heights(int159),'omitnan'), ...
- mean(spike_heights(int162),'omitnan'), ...
- std(spike_heights(int162),'omitnan'), ...
- mean(spike_heights(int201203),'omitnan'), ...
- std(spike_heights(int201203),'omitnan'), ...
- mean(spike_heights(int212),'omitnan'), ...
- std(spike_heights(int212),'omitnan'), ...
- mean(spike_heights(int212([2:5,7:11])),'omitnan'), ...
- std(spike_heights(int212([2:5,7:11])),'omitnan'), ...
- mean(spike_heights(int218),'omitnan'), ...
- std(spike_heights(int218),'omitnan'), ...
- mean(spike_heights([int218;int212([1,6])]),'omitnan'), ...
- std(spike_heights([int218;int212([1,6])]),'omitnan'), ...
- mean(spike_heights(int264),'omitnan'), ...
- std(spike_heights(int264),'omitnan'));
- disp(spikeAmpNeurons)
- %% End
- % clear workspace
- clear
|