From bf442ec90b13317839f10182cd251cea0d91b28c Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Thu, 2 Feb 2023 13:25:14 -0600 Subject: [PATCH 1/6] Supplemental figure 3 updated y-axis to ms --- scripts/makeSupFig2to5_responses.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/makeSupFig2to5_responses.m b/scripts/makeSupFig2to5_responses.m index 97a2475..4d6822c 100644 --- a/scripts/makeSupFig2to5_responses.m +++ b/scripts/makeSupFig2to5_responses.m @@ -94,8 +94,8 @@ out{iRow, iCol}.subjectsN1Values = subjectsN1Values; % calculate and store the r and p for the age vs variance in latency - [varlat_r, varlat_p] = corr(subjectsN1Values(~isnan(subjectsN1Values(:, 1)) & ~isnan(subjectsN1Values(:, 3)), 1), ... - subjectsN1Values(~isnan(subjectsN1Values(:, 1)) & ~isnan(subjectsN1Values(:, 3)), 3), 'Type', 'Spearman'); + [varlat_r, varlat_p] = corr(subjectsN1Values(~isnan(subjectsN1Values(:, 1)) & ~isnan(subjectsN1Values(:, 4)), 1), ... + subjectsN1Values(~isnan(subjectsN1Values(:, 1)) & ~isnan(subjectsN1Values(:, 4)), 4), 'Type', 'Spearman'); out{iRow, iCol}.varlat_r = varlat_r; out{iRow, iCol}.varlat_p = varlat_p; all_varlat_p(end + 1, :) = [iRow, iCol, varlat_p]; @@ -198,20 +198,21 @@ % age vs variance latencies subplot(size(conn_matrix, 1), size(conn_matrix, 2), outInd); hold on; - plot(subjectsN1Values(:, 1), 1000 * subjectsN1Values(:, 3), 'k.', 'MarkerSize', 10); + plot(subjectsN1Values(:, 1), subjectsN1Values(:, 4), 'k.', 'MarkerSize', 10); % determine the number of samples n = sum(~isnan(subjectsN1Values(:, 3))); % title(strrep(out{iRow, iCol}.name, '_', '\_')); - xlim([0 60]); ylim([0 1]); + xlim([0 60]); + ylim([0 (max(subjectsN1Values(:, 4)))]) if iRow == size(conn_matrix, 1), xlabel('Age (years)'); end if iCol == 1, ylabel('Varience in N1 latency (ms)'); end % - text(40, 0.9, ['\rho=', num2str(round(out{iRow, iCol}.varlat_r, 2)), ' (n=', num2str(n, 2), ')']); - text(40, 0.8, ['P_f_d_r=', num2str(round(out{iRow, iCol}.varlat_p_fdr, 2))]); + text(40, max(subjectsN1Values(:, 4)) * .9, ['\rho=', num2str(round(out{iRow, iCol}.varlat_r, 2)), ' (n=', num2str(n, 2), ')']); + text(40, max(subjectsN1Values(:, 4)) * .8, ['P_f_d_r=', num2str(round(out{iRow, iCol}.varlat_p_fdr, 2))]); hold off; end From 89c218f28fe132111519db436681f7cfbb39201b Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Thu, 2 Feb 2023 13:40:56 -0600 Subject: [PATCH 2/6] More meaningful name for output dir, plus directory check --- scripts/makeFig1A_plotMNI.m | 15 ++++++++--- scripts/makeFig1B_subjectResponses.m | 6 ++--- scripts/makeFig1Cand3A_heatmapResponsesAge.m | 6 ++--- scripts/makeFig2and3_transmissionAcrossAge.m | 11 +++++--- scripts/makeSupFig1_only8maSubs.m | 6 ++--- scripts/makeSupFig2to5_responses.m | 28 +++++++++++++++----- scripts/makeSupFig6and7_exploreSOZ.m | 12 +++++++-- scripts/makeSupFig8_volumeConduction.m | 8 +++--- 8 files changed, 64 insertions(+), 28 deletions(-) diff --git a/scripts/makeFig1A_plotMNI.m b/scripts/makeFig1A_plotMNI.m index a7b8626..285f527 100644 --- a/scripts/makeFig1A_plotMNI.m +++ b/scripts/makeFig1A_plotMNI.m @@ -1,5 +1,7 @@ % -% This script creates the images for Figure 1A that depict a MNI surface with tracts, subtracts, ROIs and electrodes +% This script produces the images for: +% - Figure 1A - that depict a MNI surface with tracts, subtracts, ROIs and electrodes +% - Supplemental Figure 9 - distribution of electrodes over different age groups % % Max van den Boom, Jaap van der Aar, Giulio Castegnaro, Dora Hermes, Dorien van Blooijs, 2022 % @@ -275,7 +277,10 @@ ieeg_viewLight(v_d(1), v_d(2)) % save the image - figureName = fullfile(myDataPath.output, 'derivatives', 'render', ['leftMNIpial_', rois(iTr).tract_name, '_', strrep(rois(iTr).sub_tract(iSubTr).name, '-', ''), '.png']); + if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); + end + figureName = fullfile(myDataPath.output, 'derivatives', 'images', ['leftMNIpial_', rois(iTr).tract_name, '_', strrep(rois(iTr).sub_tract(iSubTr).name, '-', ''), '.png']); set(gcf, 'PaperPositionMode', 'auto') set(hFig, 'Visible', 'on'); print('-dpng', '-r300', figureName) @@ -408,7 +413,11 @@ figure(hFigElec); set(hFigElec, 'renderer', 'Painters') set(hFigElec, 'PaperPositionMode', 'auto') -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS9_ElecCoverage'); + +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS9_ElecCoverage'); print('-dpng', '-r300', figureName) print('-depsc', '-r300', figureName) %close(hFigElec) diff --git a/scripts/makeFig1B_subjectResponses.m b/scripts/makeFig1B_subjectResponses.m index b586a3e..ede9e90 100644 --- a/scripts/makeFig1B_subjectResponses.m +++ b/scripts/makeFig1B_subjectResponses.m @@ -72,10 +72,10 @@ % % save % - if ~exist(fullfile(myDataPath.output,'derivatives', 'age'), 'dir') - mkdir(fullfile(myDataPath.output,'derivatives', 'age')); + if ~exist(fullfile(myDataPath.output,'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output,'derivatives', 'images')); end - figureName = fullfile(myDataPath.output,'derivatives', 'age', ['CCEPexamples_6subjects', '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); + figureName = fullfile(myDataPath.output,'derivatives', 'images', ['CCEPexamples_6subjects', '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); set(gcf, 'renderer', 'Painters') set(gcf, 'PaperPositionMode', 'auto') diff --git a/scripts/makeFig1Cand3A_heatmapResponsesAge.m b/scripts/makeFig1Cand3A_heatmapResponsesAge.m index c9aab6c..26b5245 100644 --- a/scripts/makeFig1Cand3A_heatmapResponsesAge.m +++ b/scripts/makeFig1Cand3A_heatmapResponsesAge.m @@ -108,10 +108,10 @@ % % save % - if ~exist(fullfile(myDataPath.output,'derivatives', 'age'), 'dir') - mkdir(fullfile(myDataPath.output,'derivatives', 'age')); + if ~exist(fullfile(myDataPath.output,'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output,'derivatives', 'images')); end - figureName = fullfile(myDataPath.output,'derivatives', 'age', ['sortedAge_tmax' int2str(ttmax * 1000), '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); + figureName = fullfile(myDataPath.output,'derivatives', 'images', ['sortedAge_tmax' int2str(ttmax * 1000), '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); set(gcf, 'PaperPositionMode', 'auto') print('-dpng', '-r300', figureName) diff --git a/scripts/makeFig2and3_transmissionAcrossAge.m b/scripts/makeFig2and3_transmissionAcrossAge.m index 5f9e34a..87c73e4 100644 --- a/scripts/makeFig2and3_transmissionAcrossAge.m +++ b/scripts/makeFig2and3_transmissionAcrossAge.m @@ -368,10 +368,10 @@ set(gca, 'YGrid', 'on', 'XGrid', 'off'); % save latency figure - if ~exist(fullfile(myDataPath.output, 'derivatives', 'age'), 'dir') - mkdir(fullfile(myDataPath.output, 'derivatives', 'age')); + if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); end - figureName = fullfile(myDataPath.output, 'derivatives', 'age', ['ageVsLatency', '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); + figureName = fullfile(myDataPath.output, 'derivatives', 'images', ['ageVsLatency', '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); set(gcf,'PaperPositionMode', 'auto'); print('-dpng', '-r300', figureName); print('-depsc', '-r300', figureName); @@ -432,7 +432,10 @@ set(gca, 'YGrid', 'on', 'XGrid', 'off'); % save speed figure - figureName = fullfile(myDataPath.output, 'derivatives', 'age', ['ageVsSpeed', '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); + if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); + end + figureName = fullfile(myDataPath.output, 'derivatives', 'images', ['ageVsSpeed', '_', rois(iTr).tract_name, '_', strrep(strSubTitle, ' -> ', '_')]); set(gcf,'PaperPositionMode', 'auto'); print('-dpng', '-r300', figureName); print('-depsc', '-r300', figureName); diff --git a/scripts/makeSupFig1_only8maSubs.m b/scripts/makeSupFig1_only8maSubs.m index 84d59b4..6d4b7f8 100644 --- a/scripts/makeSupFig1_only8maSubs.m +++ b/scripts/makeSupFig1_only8maSubs.m @@ -199,11 +199,11 @@ legend() % save -if ~exist(fullfile(myDataPath.output, 'derivatives', 'age'), 'dir') - mkdir(fullfile(myDataPath.output, 'derivatives', 'age')); +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); end -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS1_corrAgeVslatency_8mA'); +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS1_corrAgeVslatency_8mA'); set(gcf, 'PaperPositionMode', 'auto') print('-dpng', '-r300', figureName) print('-depsc', '-r300', figureName) diff --git a/scripts/makeSupFig2to5_responses.m b/scripts/makeSupFig2to5_responses.m index 4d6822c..c1cf14e 100644 --- a/scripts/makeSupFig2to5_responses.m +++ b/scripts/makeSupFig2to5_responses.m @@ -178,15 +178,17 @@ end end - -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS2_AgeVsRatioN1s'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS2_AgeVsRatioN1s'); set(gcf,'PaperPositionMode', 'auto') print('-dpng', '-r300', figureName) print('-depsc', '-r300', figureName) - %% % Generate supplementary figure 3 that displays the variance in latencies for each of the connections between the end-point areas @@ -218,8 +220,11 @@ end end - -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS3_AgeVsLatVar_N1'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS3_AgeVsLatVar_N1'); set(gcf,'PaperPositionMode', 'auto') print('-dpng', '-r300', figureName) print('-depsc', '-r300', figureName) @@ -274,7 +279,11 @@ end set(gca, 'XTick', 20:20:100) -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS4_MeanVsVariance_N1'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS4_MeanVsVariance_N1'); set(gcf,'PaperPositionMode', 'auto'); print('-dpng', '-r300', figureName); print('-depsc', '-r300', figureName); @@ -329,12 +338,17 @@ end end -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS5_MeanVsFWHM'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS5_MeanVsFWHM'); set(gcf,'PaperPositionMode', 'auto'); print('-dpng', '-r300', figureName); print('-depsc', '-r300', figureName); + % % % diff --git a/scripts/makeSupFig6and7_exploreSOZ.m b/scripts/makeSupFig6and7_exploreSOZ.m index 06212dc..0f753f1 100644 --- a/scripts/makeSupFig6and7_exploreSOZ.m +++ b/scripts/makeSupFig6and7_exploreSOZ.m @@ -339,7 +339,11 @@ lgd.FontSize = 20; set(gcf,'color', 'w'); -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS6_LatencyRespSOZ'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS6_LatencyRespSOZ'); set(gcf, 'renderer', 'Painters') set(gcf,'PaperPositionMode', 'auto') print('-dpng', '-r300', figureName) @@ -424,7 +428,11 @@ lgd.FontSize = 20; set(gcf,'color', 'w'); -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS7_LatencyStimSOZ'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS7_LatencyStimSOZ'); set(gcf, 'renderer', 'Painters') set(gcf, 'PaperPositionMode', 'auto') print('-dpng', '-r300', figureName) diff --git a/scripts/makeSupFig8_volumeConduction.m b/scripts/makeSupFig8_volumeConduction.m index 9f9887a..a3dd525 100644 --- a/scripts/makeSupFig8_volumeConduction.m +++ b/scripts/makeSupFig8_volumeConduction.m @@ -82,10 +82,12 @@ xlabel('Standard deviation (ms)') ylabel('Number of stimulation pairs') -figureName = fullfile(myDataPath.output, 'derivatives', 'age', 'SupFigS8_volumeConductionCheck'); +% save +if ~exist(fullfile(myDataPath.output, 'derivatives', 'images'), 'dir') + mkdir(fullfile(myDataPath.output, 'derivatives', 'images')); +end +figureName = fullfile(myDataPath.output, 'derivatives', 'images', 'SupFigS8_volumeConductionCheck'); set(gcf, 'PaperPositionMode', 'auto') print('-dpng', '-r300', '-painters', figureName) print('-depsc2', '-r300', '-painters', figureName) - - From 060f9cb4e8824d1eaeb33845e526a4b35fa687f5 Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Thu, 2 Feb 2023 13:45:25 -0600 Subject: [PATCH 3/6] Removed unused script and update script name --- ...tMNI.m => makeFig1A_and_SupFig9_plotMNI.m} | 0 scripts/makeSupFig9_distributionElecPosAge.m | 153 ------------------ 2 files changed, 153 deletions(-) rename scripts/{makeFig1A_plotMNI.m => makeFig1A_and_SupFig9_plotMNI.m} (100%) delete mode 100644 scripts/makeSupFig9_distributionElecPosAge.m diff --git a/scripts/makeFig1A_plotMNI.m b/scripts/makeFig1A_and_SupFig9_plotMNI.m similarity index 100% rename from scripts/makeFig1A_plotMNI.m rename to scripts/makeFig1A_and_SupFig9_plotMNI.m diff --git a/scripts/makeSupFig9_distributionElecPosAge.m b/scripts/makeSupFig9_distributionElecPosAge.m deleted file mode 100644 index 54637ec..0000000 --- a/scripts/makeSupFig9_distributionElecPosAge.m +++ /dev/null @@ -1,153 +0,0 @@ -% distributionElecPosAge -% This is an extra analysis to analyse the distribution of electrode -% positions in different age groups. - -% Dorien van Blooijs, UMCU 2022 - -%% load all N1 latencies -clear -close all - -myDataPath = setLocalDataPath(1); - -% get a list of datasets -theseSubs = ccep_getSubFilenameInfo(myDataPath); - -if exist(fullfile(myDataPath.output,'derivatives','av_ccep','ccepData_V1.mat'),'file') - - % if the ccepData_V1.mat was saved after running ccep02_loadN1, load - % the ccepData structure here - load(fullfile(myDataPath.output,'derivatives','av_ccep','ccepData_V1.mat')) -else - disp('Run first ccep02_loadN1.mat') -end - - -%% lobe specification - -rois(1).name = 'frontal'; -rois(1).regions = [12, 14, 15, 52, 53]; -rois(2).name = 'parietal'; -rois(2).regions = [25, 26, 27, 56]; -rois(3).name = 'temporal'; -rois(3).regions = [33, 34, 36, 37, 38, 60, 72, 73, 74]; -rois(4).name = 'central'; -rois(4).regions = [3, 4, 28, 29, 45]; - -%% run electrode position distribution for all subjects - -% pre-allocation -% overview = struct([]); -agegroups = struct([]); - -minAge = 1:10:51; -maxAge = 10:10:60; - -for n = 1:size(minAge,2) - agegroups(n).minAge = minAge(n); - agegroups(n).maxAge = maxAge(n); - agegroups(n).elecF = 0; - agegroups(n).elecP = 0; - agegroups(n).elecT = 0; - agegroups(n).elecC = 0; -end - -for iSubj = 1:size(ccepData,2) - - % pre-allocation - good_channels = cell(size(ccepData(iSubj).run)); - countF = 0; countP = 0; countT = 0; countC = 0; - - for iRun = 1:size(ccepData(iSubj).run,2) - good_channels{iRun} = ccepData(iSubj).run(iRun).channel_names(ccepData(iSubj).run(iRun).good_channels); - end - - unique_channels = unique(lower(vertcat(good_channels{:}))); - - for iElec = 1:size(ccepData(iSubj).electrodes,1) - if any(strcmpi(ccepData(iSubj).electrodes.name(iElec),unique_channels)) - - idx = strcmpi(ccepData(iSubj).electrodes.name(iElec),unique_channels); - if ismember(ccepData(iSubj).electrodes.Destrieux_label(idx),rois(1).regions) - countF = countF +1; - elseif ismember(ccepData(iSubj).electrodes.Destrieux_label(idx),rois(2).regions) - countP = countP +1; - elseif ismember(ccepData(iSubj).electrodes.Destrieux_label(idx),rois(3).regions) - countT = countT +1; - elseif ismember(ccepData(iSubj).electrodes.Destrieux_label(idx),rois(4).regions) - countC = countC +1; - end - end - end - -% overview(iSubj).age = ccepData(iSubj).age; -% overview(iSubj).elecF = countF; -% overview(iSubj).elecP = countP; -% overview(iSubj).elecT = countT; -% overview(iSubj).elecC = countC; - - idxAge = find(ccepData(iSubj).age >= minAge & ccepData(iSubj).age <= maxAge) ; - agegroups(idxAge).elecF = agegroups(idxAge).elecF + countF; - agegroups(idxAge).elecP = agegroups(idxAge).elecP + countP; - agegroups(idxAge).elecT = agegroups(idxAge).elecT + countT; - agegroups(idxAge).elecC = agegroups(idxAge).elecC + countC; - -end - -%% figures - -figure, -bar(mean([agegroups(:).minAge; agegroups(:).maxAge]),[agegroups(:).elecF]) -xlabel('Age (years)') -ylabel('Number of electrodes') -title('Frontal lobe') -ylim([0 350]) - -% save the image -figureName = fullfile(myDataPath.output,'derivatives','age',... - 'ageDistribution_frontal'); -set(gcf,'PaperPositionMode','auto') -print('-dpng','-r300',figureName) -print('-painters','-depsc','-r300',figureName) - -figure, -bar(mean([agegroups(:).minAge; agegroups(:).maxAge]),[agegroups(:).elecT]) -xlabel('Age (years)') -ylabel('Number of electrodes') -title('Temporal lobe') -ylim([0 350]) - -% save the image -figureName = fullfile(myDataPath.output,'derivatives','age',... - 'ageDistribution_temporal'); -set(gcf,'PaperPositionMode','auto') -print('-dpng','-r300',figureName) -print('-painters','-depsc','-r300',figureName) - -figure, -bar(mean([agegroups(:).minAge; agegroups(:).maxAge]),[agegroups(:).elecP]) -xlabel('Age (years)') -ylabel('Number of electrodes') -title('Parietal lobe') -ylim([0 350]) - -% save the image -figureName = fullfile(myDataPath.output,'derivatives','age',... - 'ageDistribution_parietal'); -set(gcf,'PaperPositionMode','auto') -print('-dpng','-r300',figureName) -print('-painters','-depsc','-r300',figureName) - -figure, -bar(mean([agegroups(:).minAge; agegroups(:).maxAge]),[agegroups(:).elecC]) -xlabel('Age (years)') -ylabel('Number of electrodes') -title('Central lobe') -ylim([0 350]) - -% save the image -figureName = fullfile(myDataPath.output,'derivatives','age',... - 'ageDistribution_central'); -set(gcf,'PaperPositionMode','auto') -print('-dpng','-r300',figureName) -print('-painters','-depsc','-r300',figureName) From 31cf4a97b73b43b942c5e67f2e2fee28345f5d4c Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Thu, 2 Feb 2023 13:51:35 -0600 Subject: [PATCH 4/6] Rename scripts --- ...and3A_heatmapResponsesAge.m => makeFig1C_and_Fig3A_heatmaps.m} | 0 ...smissionAcrossAge.m => makeFig2_and_Fig3BC_transmissionAges.m} | 0 scripts/{makeSupFig1_only8maSubs.m => makeSupFig1_currents.m} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename scripts/{makeFig1Cand3A_heatmapResponsesAge.m => makeFig1C_and_Fig3A_heatmaps.m} (100%) rename scripts/{makeFig2and3_transmissionAcrossAge.m => makeFig2_and_Fig3BC_transmissionAges.m} (100%) rename scripts/{makeSupFig1_only8maSubs.m => makeSupFig1_currents.m} (100%) diff --git a/scripts/makeFig1Cand3A_heatmapResponsesAge.m b/scripts/makeFig1C_and_Fig3A_heatmaps.m similarity index 100% rename from scripts/makeFig1Cand3A_heatmapResponsesAge.m rename to scripts/makeFig1C_and_Fig3A_heatmaps.m diff --git a/scripts/makeFig2and3_transmissionAcrossAge.m b/scripts/makeFig2_and_Fig3BC_transmissionAges.m similarity index 100% rename from scripts/makeFig2and3_transmissionAcrossAge.m rename to scripts/makeFig2_and_Fig3BC_transmissionAges.m diff --git a/scripts/makeSupFig1_only8maSubs.m b/scripts/makeSupFig1_currents.m similarity index 100% rename from scripts/makeSupFig1_only8maSubs.m rename to scripts/makeSupFig1_currents.m From b660457a9f4f771a209e52a1e05c963782e16a7d Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Thu, 2 Feb 2023 16:02:15 -0600 Subject: [PATCH 5/6] Update script names in readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5246fab..8a3340d 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ Scripts to process the data, detect N1 responses and add tract information: - scripts/ccep04_averageConnections.m Scripts to make the figure panels: -- makeFig1A_plotMNI.m +- makeFig1A_and_SupFig9_plotMNI.m - makeFig1B_subjectResponses.m -- makeFig1C_heatmapResponsesAge.m -- makeFig2and3_transmissionAcrossAge.m +- makeFig1C_and_Fig3A_heatmaps.m +- makeFig2_and_Fig3BC_transmissionAges.m To make all functions work, an m-file called personalDataPath.m should be stored in the root dir. This file should have the following content: From 54d92ec0f263a76a8db8efb1302547a1ff6f7f32 Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Thu, 2 Feb 2023 16:11:05 -0600 Subject: [PATCH 6/6] Output corrected p-values for supplementary figures 6 and 7 --- scripts/makeSupFig6and7_exploreSOZ.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/makeSupFig6and7_exploreSOZ.m b/scripts/makeSupFig6and7_exploreSOZ.m index 0f753f1..1b6c7e7 100644 --- a/scripts/makeSupFig6and7_exploreSOZ.m +++ b/scripts/makeSupFig6and7_exploreSOZ.m @@ -209,6 +209,10 @@ [~, ~, ~, p_vals_resp_FDR] = fdr_bh([n1Latencies(p_indices_resp).respSOZ_p], 0.05, 'pdep'); [~, ~, ~, p_vals_stim_FDR] = fdr_bh([n1Latencies(p_indices_stim).stimSOZ_p], 0.05, 'pdep'); +% print the FDR correct p-values +disp(['Response SOZvsNon-SOZ corrected p-values: ', char(strjoin(string(p_vals_resp_FDR), ', '))]); +disp(['Stim SOZvsNon-SOZ corrected p-values: ', char(strjoin(string(p_vals_stim_FDR), ', '))]); + % put FDR p-values back into the table for respIdx = 1:length(p_indices_resp) n1Latencies(p_indices_resp(respIdx)).respSOZ_pFDR = p_vals_resp_FDR(respIdx);