From e259d77dbb794fb2cfd5173ce523abf9ec15907c Mon Sep 17 00:00:00 2001
From: Erin
Date: Tue, 2 Jul 2024 10:38:24 -0400
Subject: [PATCH] minor edits for reviews
---
plots/combined_univariate_fmri_plots.m | 10 ++++----
plots/correlation_figure.m | 10 ++++----
plots/make_table_1.m | 6 ++++-
plots/model_plots.m | 32 ++++++++++----------------
plots/outcome_plots.m | 14 +++++------
5 files changed, 34 insertions(+), 38 deletions(-)
diff --git a/plots/combined_univariate_fmri_plots.m b/plots/combined_univariate_fmri_plots.m
index 2937fb2..a919093 100644
--- a/plots/combined_univariate_fmri_plots.m
+++ b/plots/combined_univariate_fmri_plots.m
@@ -199,7 +199,7 @@
else
fprintf(sfid,[' Again, the top-ranked AI '...
'features involved spike rates and '...
- 'relative entropy (Fig. S2A). ']);
+ 'relative entropy (Fig. S3A). ']);
end
% Also prep a supplemental table showing the top ranked features
@@ -351,13 +351,13 @@
'SOZs and right from bilateral SOZs, respectively. This suggests that right-sided SOZs '...
'are harder to distinguish than left-sided SOZs in our dataset. '...
'Several interictal features were highly correlated, including spikes and relative '...
- 'entropy (see Fig. S1 and Supplemental Results).'...
+ 'entropy (see Fig. S2 and Supplemental Results).'...
' We performed a secondary analysis in which we excluded 15 unilateral patients who did '...
'not undergo surgery or who had one-year Engel outcomes >1. We observed similar trends '...
- 'in this smaller patient cohort (Fig. S2).
']);
+ 'in this smaller patient cohort (Fig. S3).']);
else
fprintf(sfid,['We next compared the set of features that best distinguished '...
- 'left from bilateral SOZs versus right from bilateral SOZs (Fig. S2B). '...
+ 'left from bilateral SOZs versus right from bilateral SOZs (Fig. S3B). '...
'Again, spike and relative entropy features best distinguished left from '...
'bilateral SOZs (although none were significant after correcting for the false discovery rate). '...
' The best feature set to distinguish right from bilateral was again more heterogeneous ' ...
@@ -380,7 +380,7 @@
annotation('textbox',[0 0.9 0.1 0.1],'String','A','LineStyle','none','fontsize',25)
annotation('textbox',[0.5 0.9 0.1 0.1],'String','B','LineStyle','none','fontsize',25)
%print(gcf,[plot_folder,'FigS2'],'-dpng')
- print(gcf,[plot_folder,'FigS2'],'-dtiff')
+ print(gcf,[plot_folder,'FigS3'],'-dtiff')
return
end
diff --git a/plots/correlation_figure.m b/plots/correlation_figure.m
index c590d0c..1be575d 100644
--- a/plots/correlation_figure.m
+++ b/plots/correlation_figure.m
@@ -186,7 +186,7 @@
'We then calculated the Pearson correlation across electrode contacts between all features and choices of reference, '...
'yielding a Nfeatures x references x Nfeatures x references '...
'correlation matrix for each patient, where Nfeatures x references is the '...
- 'number of features times the number of references (30 x 3 = 90). Fig. S1A shows the '...
+ 'number of features times the number of references (30 x 3 = 90). Fig. S2A shows the '...
'average inter-feature correlation matrix across patients for a single choice of reference (common average), and in sleep. '...
'There were often high correlations between different frequency band measurements of the same feature. '... ...
'There were also often high correlations or anti-correlations between different features, such as between '...
@@ -315,7 +315,7 @@
title('Inter-reference feature correlation (contact level)')
-fprintf(fid,[' Fig. S1B shows the mean (standard deviation) inter-reference feature correlation '...
+fprintf(fid,[' Fig. S2B shows the mean (standard deviation) inter-reference feature correlation '...
'across patients for different features. Only the broadband frequency-measured features '...
'were considered for this analysis. Correlations varied across features, and the correlation '...
'in features between machine reference and common average reference tended to be higher than that between '...
@@ -465,9 +465,9 @@
'patient (rather than each electrode contact), inter-feature Pearson correlations '...
'were calculated across patients, rather than across electrode contacts. '...
'Similar trends were observed as in the electrode contact-level analysis. '...
- 'Fig. S1C shows the inter-feature AI correlation, again restricting analysis to common '...
+ 'Fig. S2C shows the inter-feature AI correlation, again restricting analysis to common '...
'average reference. Again, we observed high inter-feature correlation for several features. '...
- 'Fig. S1D shows the inter-reference AI correlation (there are no error bars because '...
+ 'Fig. S2D shows the inter-reference AI correlation (there are no error bars because '...
' there is only a single correlation value across all patients for this analysis). '...
'Again, we observed high variability of inter-reference correlations '...
'across features.']);
@@ -479,7 +479,7 @@
annotation('textbox',[0.53 0.41 0.1 0.1],'String','D','LineStyle','none','fontsize',20)
%print(gcf,[plot_folder,'FigS1'],'-dpng')
-print(gcf,[plot_folder,'FigS1'],'-dtiff')
+print(gcf,[plot_folder,'FigS2'],'-dtiff')
end
\ No newline at end of file
diff --git a/plots/make_table_1.m b/plots/make_table_1.m
index dfe8c49..1039018 100644
--- a/plots/make_table_1.m
+++ b/plots/make_table_1.m
@@ -670,7 +670,11 @@
fprintf(fid,[' We visually validated a random sample of 50 automated spike detections from each patient '...
'(bipolar montage). The median (IQR) percentage of automatically-detected spikes '...
'determined to be true spikes was '...
- '%1.1f%% (%1.1f%%-%1.1f%%) for HUP and %1.1f%% (%1.1f%%-%1.1f%%) for MUSC.'],...
+ '%1.1f%% (%1.1f%%-%1.1f%%) for HUP and %1.1f%% (%1.1f%%-%1.1f%%) for MUSC. '...
+ 'Fig. S1 shows 25 random spike detections from two patients from HUP and two '...
+ 'patients from MUSC, chosen as representative examples because '...
+ 'the positive predictive value of their spike detections were at the '...
+ 'bottom and top of the interquartile range across all patients from each center.'],...
median(perc_good(all_pts_hup_sp))*100,prctile(perc_good(all_pts_hup_sp),25)*100,...
prctile(perc_good(all_pts_hup_sp),75)*100,...
median(perc_good(all_pts_musc_sp))*100,prctile(perc_good(all_pts_musc_sp),25)*100,...
diff --git a/plots/model_plots.m b/plots/model_plots.m
index 0a9d24d..497e94a 100644
--- a/plots/model_plots.m
+++ b/plots/model_plots.m
@@ -123,12 +123,12 @@
fprintf(sfid,['We again tested the ability of interictal features to predict SOZ laterality in unseen patients, '...
'now restricting the unilateral patients in the HUP dataset to be those with Engel 1 surgical outcomes. '...
'The AUCs of the ROC of the left- and right-sided internal cross-validation models trained on all features were %1.2f '...
- 'and %1.2f, respectively (Fig. S3A). A model '...
+ 'and %1.2f, respectively (Fig. S5A). A model '...
'trained on only spike rates (%s reference) achieved better AUCs (%1.2f '...
- 'and %1.2f for the left and right models, respectively (Fig. S3B)). Finally, a model trained only on '...
+ 'and %1.2f for the left and right models, respectively (Fig. S5B)). Finally, a model trained only on '...
'binary spike rates indicating whether there were more spikes on the left or the right '...
'performed poorly (AUC of %1.2f and %1.2f'...
- ', respectively (Fig. S3C)). '],...
+ ', respectively (Fig. S5C)). '],...
model(1).val(1).side(1).result.AUC,model(1).val(1).side(2).result.AUC,...
upper(which_refs{ia}),...
model(2).val(1).side(1).result.AUC,model(2).val(1).side(2).result.AUC,...
@@ -406,7 +406,7 @@
'an accuracy similar to the full-duration models with 5 minutes of sampling (Fig. 4G).']);
elseif ia == 1 && io == 2
fprintf(sfid,['Model accuracies rise quickly with duration sampled, achieving '...
- 'an accuracy similar to the full-duration models with 5 minutes of sampling (Fig. S3G).']);
+ 'an accuracy similar to the full-duration models with 5 minutes of sampling (Fig. S5G).']);
end
end
@@ -521,10 +521,10 @@
fprintf(fid,[' Results were similar, although with higher AUCs '...
'across all models, when we restricted analysis of unilateral HUP patients to be those with '...
'Engel 1 surgical outcomes to ' ...
- 'build and internally validate the SOZ laterality classifier (Fig. S3).']);
+ 'build and internally validate the SOZ laterality classifier (Fig. S4).']);
fprintf(fid,[' Results were also similar when we used spikes detected in bipolar and machine references to '...
- 'build the SOZ laterality classifier (Fig. S4 and S5).']);
+ 'build the SOZ laterality classifier (Fig. S5 and S6).']);
elseif ia == 1 && io == 2
fprintf(sfid,[' Finally, we tested how the spike-only models performed in the '...
@@ -559,13 +559,13 @@
print(gcf,[plot_folder,'Fig4'],'-dtiff')
elseif ia == 1 && io == 2
%print(gcf,[plot_folder,'FigS3'],'-dpng')
- print(gcf,[plot_folder,'FigS3'],'-dtiff')
+ print(gcf,[plot_folder,'FigS4'],'-dtiff')
elseif ia == 2
%print(gcf,[plot_folder,'FigS4'],'-dpng')
- print(gcf,[plot_folder,'FigS4'],'-dtiff')
+ print(gcf,[plot_folder,'FigS5'],'-dtiff')
elseif ia == 3
%print(gcf,[plot_folder,'FigS5'],'-dpng')
- print(gcf,[plot_folder,'FigS5'],'-dtiff')
+ print(gcf,[plot_folder,'FigS6'],'-dtiff')
end
@@ -665,21 +665,13 @@
end
- fprintf(fid,[' We next examined whether model accuracy was associated '...
- 'with the precise localization of the SOZ. We aggregated patients '...
- 'from both HUP and MUSC, and selected only those patients whose '...
- 'clinician-defined SOZ was either mesial temporal (N = %d) or '...
- 'temporal neocortical (N = %d), excluding %d patients with broader '...
- 'temporal localizations. We tested for the association between mesial temporal '...
- 'vs. temporal neocortical localization and correct vs. incorrect '...
- 'laterality classification with a Fisher''s exact test. '...
- 'There was no significant association between'...
- ' model accuracy and mesial temporal vs. temporal neocortical '...
+ fprintf(fid,[' There was no significant association between'...
+ ' model accuracy and mesial temporal (N = %d) vs. temporal neocortical (N = %d) '...
'localization for either the left- or right-sided model '...
'(left-sided model odds-ratio: %1.1f (95%% CI %1.1f-%1.1f), '...
'p = %1.2f; right-sided model: %1.1f (%1.1f-%1.1f), '...
'p = %1.2f).'],...
- sum(strcmp(soz_spec,'mesial temporal')),sum(strcmp(soz_spec,'temporal neocortical')),nother,...
+ sum(strcmp(soz_spec,'mesial temporal')),sum(strcmp(soz_spec,'temporal neocortical')),...
error_stats(1,1),error_stats(1,2),error_stats(1,3),error_stats(1,4),...
error_stats(2,1),error_stats(2,2),error_stats(2,3),error_stats(2,4));
diff --git a/plots/outcome_plots.m b/plots/outcome_plots.m
index aab81f2..0c462d9 100644
--- a/plots/outcome_plots.m
+++ b/plots/outcome_plots.m
@@ -216,10 +216,10 @@
ybar = (yl(2)-yl(1))*1.1;
ytext = (yl(2)-yl(1))*1.2;
ylim(yl_new)
- plot([1 sum(good)],[ybar ybar],'Color',[0.4660, 0.6740, 0.1880] ,'linewidth',2)
+ plot([1 sum(good)],[ybar ybar],'Color','k' ,'linewidth',2)
text((1+sum(good))/2,ytext,'Good outcome','fontsize',15,'HorizontalAlignment','center',...
'color',[0.4660, 0.6740, 0.1880])
- plot([sum(good)+1 length(good)],[ybar ybar],'Color',[0.8500, 0.3250, 0.0980],'linewidth',2)
+ plot([sum(good)+1 length(good)],[ybar ybar],'Color','k','linewidth',2)
text((sum(good)+1+length(good))/2,ytext,'Poor outcome','fontsize',15,'HorizontalAlignment','center',...
'color',[0.8500, 0.3250, 0.0980])
plot([(sum(good)+sum(good)+1)/2,(sum(good)+sum(good)+1)/2],ylim, 'k--','linewidth',2)
@@ -463,7 +463,7 @@
'predict good or bad surgical outcome using the modeled probability of SOZ '...
'laterality concordant with the side of surgery as the model input. '...
'The performance of the model validated using leave-one-out classification had '...
- 'an AUC of %1.2f for predicting Engel outcome and %1.2f for predicting ILAE outcome (Fig. S6). '...
+ 'an AUC of %1.2f for predicting Engel outcome and %1.2f for predicting ILAE outcome (Fig. S7). '...
'Together, these results suggest that a model trained to predict the SOZ using spike rate '...
'asymmetry is also associated with surgical outcome, although it has only modest ability to predict outcome.'],...
prob_stats(1,1),prob_stats(1,2),prob_stats(1,3),prob_stats(1,4),prob_stats(1,5),prob_stats(1,6),...
@@ -473,7 +473,7 @@
prob_stats(1,8),prob_stats(2,8));
- fprintf(fid,[' Results were similar when we used spikes detected in bipolar and machine references (Fig. S7 and S8).']);
+ fprintf(fid,[' Results were similar when we used spikes detected in bipolar and machine references (Fig. S8 and S9).']);
end
%% Add subtitles
@@ -492,14 +492,14 @@
annotation(omFig,'textbox',[0 0.9 0.1 0.1],'String','A','LineStyle','none','fontsize',25)
annotation(omFig,'textbox',[0.5 0.9 0.1 0.1],'String','B','LineStyle','none','fontsize',25)
- print(omFig,[plot_folder,'FigS6'],'-dtiff')
+ print(omFig,[plot_folder,'FigS7'],'-dtiff')
close(omFig)
elseif ir == 2
%print(gcf,[plot_folder,'FigS6'],'-dpng')
- print(mainFig,[plot_folder,'FigS7'],'-dtiff')
+ print(mainFig,[plot_folder,'FigS8'],'-dtiff')
elseif ir == 3
%print(gcf,[plot_folder,'FigS7'],'-dpng')
- print(mainFig,[plot_folder,'FigS8'],'-dtiff')
+ print(mainFig,[plot_folder,'FigS9'],'-dtiff')
end
close(mainFig)