OSCR

Uncovering the embodied dimension of the wandering mind.

Code ↔ Paper

23 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 23 matches · 2 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/CCA_plots.Rmd, lines 129 to 193 · score 0.94 · secondary somatosensory cortex, central opercular cortex, primary somatosensory cortex, frontal medial, postcentral gyrus, interoceptive network · Report a mismatch
  2. [2] § Materials and Methods › Data Analysis. › Mind-wandering sampling validation. ↔ scripts/MDIES_validity_reliability.Rmd, lines 27 to 65 · score 0.82 · Kaiser Meyer Olkin, correlation matrix, Sphericity, Bartlett, fa, subsets · Report a mismatch
  3. [3] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/cca_pls_toolkit-master/RunCCA.m, lines 13 to 45 · score 0.80 · cross validated, statistical inference, sample correlation, CCA PLS, deflation, outer · Report a mismatch
  4. [4] § Materials and Methods › Data Analysis. › Post hoc power analyses. ↔ scripts/ControlAnalyses/poweranalysis.Rmd, lines 7 to 42 · score 0.76 · pwr.f2.test, correlation coefficient, brain connectivity, fold, power, PCA · Report a mismatch
  5. [5] § Materials and Methods › Data Analysis. › Convergent validity of the body-wandering connectome. ↔ scripts/ControlAnalyses/FactorConnectivity.ipynb, lines 382 to 477 · score 0.76 · permuted_ols, mass univariate, upper triangle, diagonal, Body Wandering, scores · Report a mismatch
  6. [6] § Materials and Methods › Data Analysis. › Gradient map association. ↔ scripts/Gradients/SpinTestResults_AverageTopCCA.m, lines 64 to 112 · score 0.74 · surface space, top CCA, FreeSurfer, gradient, Schaefer, spin · Report a mismatch
  7. [7] § Materials and Methods › Data Analysis. › Gradient map association. ↔ scripts/Gradients/gradient2surface.sh, the whole file · a weak match · score 0.73 · mri_vol2surf, surface space, FreeSurfer, gradient, spin, atlas · Report a mismatch
  8. [8] § Materials and Methods › Mental Health Assessment. ↔ scripts/ControlAnalyses/PHQ15_controlanalyses.Rmd, lines 46 to 148 · score 0.71 · mental health, removed outliers, combined sum, SD, ASRS, MDI · Report a mismatch
  9. [9] § Results › Body-Related Mind-Wandering Is Linked to Reduced ADHD and Depression Symptoms. ↔ scripts/ControlAnalyses/PHQ15_controlanalyses.Rmd, lines 46 to 148 · score 0.69 · HRV RMSSD, mental health, positive correlations, Heart Rate, ADHD, depression · Report a mismatch
  10. [10] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/cca_pls_toolkit-master/CCA_plots.m, lines 71 to 98 · score 0.69 · mind wandering variate, canonical variate, connectivity variate, scatter, properties, model · Report a mismatch
  11. [11] § Materials and Methods › Mental Health Assessment. ↔ scripts/ControlAnalyses/RobustnessCheck.Rmd, lines 383 to 494 · score 0.68 · mental health, removed outliers, combined sum, SD, ASRS, MDI · Report a mismatch
  12. [12] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/cca_pls_toolkit-master/CCA_plots.m, lines 251 to 286 · score 0.68 · model generalizability, CCA model, sample correlation, predictive, robustness, mind wandering · Report a mismatch
  13. [13] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/cca_pls_toolkit-master/RunCCA.m, lines 13 to 45 · score 0.65 · cross validated, PCA CCA, CCA PLS, MATLAB, body wandering, weighted · Report a mismatch
  14. [14] § Materials and Methods › Data Analysis. › Convergent validity of the body-wandering connectome. ↔ scripts/MDIES_validity_reliability.Rmd, lines 318 to 375 · score 0.62 · connectivity coefficients, Spearman correlations, CCA brain, univariate, permutation, validity · Report a mismatch
  15. [15] § Results › Body-Related Mind-Wandering Is Linked to Reduced ADHD and Depression Symptoms. ↔ scripts/ControlAnalyses/ADHDDepressComorbidity_controlanalyses.Rmd, lines 25 to 89 · score 0.62 · partial correlations, mental health, comorbidity, ADHD, Depression, rs · Report a mismatch
  16. [16] § Results › Intrinsic Functional Connectivity Signature of Visceral-Affective Thought. ↔ scripts/CCA/CCA_plots.Rmd, lines 129 to 193 · score 0.62 · central opercular cortex, postcentral gyrus, insula, thalamus, cingulate, Subcortical · Report a mismatch
  17. [17] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/cca_pls_toolkit-master/misc/main.m, the whole file · a weak match · score 0.60 · statistical inference, CCA PLS, iteratively, outer, optimization, training · Report a mismatch
  18. [18] § Results › Body-Related Mind-Wandering Is Linked to Reduced ADHD and Depression Symptoms. ↔ scripts/ControlAnalyses/RobustnessCheck.Rmd, lines 76 to 216 · score 0.56 · positive correlations, intraclass correlation, ICC, rumination, spontaneous, skin · Report a mismatch
  19. [19] § Materials and Methods › Data Analysis. › Canonical correlation analysis. ↔ scripts/CCA/cca_pls_toolkit-master/CCA_plots.m, lines 71 to 98 · score 0.55 · canonical variates, CCA PLS, MATLAB, models, body wandering, variable · Report a mismatch
  20. [20] § Results › Identifying Relationships of Bodily Related Content to Ongoing Thought Patterns. ↔ scripts/ControlAnalyses/RobustnessCheck.Rmd, lines 76 to 216 · score 0.53 · robustness checks, intraclass correlation, ICC, odd, split, body wandering · Report a mismatch
  21. [21] § Materials and Methods › f/MRI Preprocessing. ↔ scripts/CCA/CCA_Brain_Figures_abend.ipynb, lines 20 to 38 · score 0.52 · Schaefer atlas, nilearn, subcortical · Report a mismatch
  22. [22] § Materials and Methods › Physiological Measurements. › Physiological metric processing. ↔ scripts/ItemAnalyses_MHPhysio.Rmd, lines 169 to 183 · score 0.52 · removed outliers, heart rate, gastric, RMSSD, metric · Report a mismatch
  23. [23] § Materials and Methods › Data Analysis. ↔ scripts/Gradients/SpinTestResults_AverageTopCCA.m, lines 21 to 32 · score 0.51 · Benjamini Hochberg, gradient, FDR, CCA · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 286 lines · 13 KB · no license · 3 matches

  1. function [P, weightY, weightX] = CCA_plots(Project, mode2plot, weighttype, savepath, beh_labels)
  2. % [P, weightY, weightX] = CCA_plots('_Project_BodyWandering', 1, 'correlation', '/home/leah/Git/BodyWanderingCCA/figures/CCA_BWitems/', {'Future', 'Past', 'Self', 'Other', 'Pos', 'Neg', 'Words', 'Vivid', 'Vague', 'Focus', 'Ruminate', 'Distant', 'Image', 'Arousal', 'Body', 'Breath', 'Heart', 'Movement', 'Bladder', 'Skin', 'Stomach'})
  3. %clear all
  4. Project = '_Project_BodyWandering';
  5. mode2plot = 1;
  6. weighttype = 'correlation'; % 'weight';
  7. savepath = '/home/leah/Git/BodyWanderingCCA/figures/CCA_BWitems/'
  8. beh_labels = {'Future', 'Past', 'Self', 'Other', 'Pos', 'Neg', 'Words', 'Vivid', 'Vague', 'Focus', 'Ruminate', 'Distant', 'Image', 'Arousal', 'Body', 'Breath', 'Heart', 'Movement', 'Bladder', 'Skin', 'Stomach'};
  9. %% plotting
  10. % Set path for plotting and the BrainNet Viewer toolbox
  11. set_path('plot', 'brainnet');
  12. addpath('/Users/au704655/Documents/Packages/spm12/')
  13. % % load cfg file for effect of interest
  14. filepath = ['/home/leah/Git/connectivity_tools/toolboxes/matlab/cca_pls_toolkit-master/' Project '/framework/'];
  15. framework = 'cca_pca_holdout5-0.40_subsamp5-0.40';
  16. cfg = load([filepath, framework, '/cfg_1.mat']);
  17. % Load res
  18. res.dir.frwork = cfg.cfg.dir.frwork;
  19. res.frwork.level = mode2plot;
  20. % get the correlation between the input variables and the latent variables/projections
  21. res.gen.weight.type = weighttype; % 'correlation' for structure correlations/loadings & 'weight' for true model weights
  22. % res.gen.selectfile = 'none';
  23. % res.gen.weight.flip = 1;
  24. res = res_defaults(res, 'load');
  25. %% Plot scatterplot of data projections (Connectome * Factor Canonical Variates)
  26. % P = projections
  27. P = plot_proj(res, {'X' 'Y'}, res.frwork.level, 'osplit', res.frwork.split.best, ...
  28. 'training+test', '2d_group', 'gen.axes.FontSize', 20, ...
  29. 'gen.legend.FontSize', 20, 'gen.legend.Location', 'NorthWest', ...
  30. 'proj.scatter.SizeData', 120, 'proj.scatter.MarkerEdgeColor', 'k', ...
  31. 'proj.scatter.MarkerFaceColor', [0.3 0.3 0.9; 0.9 0.3 0.3], ... %[[224, 206, 253]/255; [87, 87, 241]/255], ... %'#c8b6ff' , '#957fef'], ... %[0.3 0.3 0.9; 0.9 0.3 0.3] % [242/255 191/255 211/255; 173/255 31/255 87/255
  32. 'proj.xlabel', 'Connectivity Variate', ... %'Brain Variate'
  33. 'proj.ylabel', 'Body-Wandering Variate', ... %'Beh Variate'
  34. 'proj.lsline', 'on');
  35. load([res.dir.frwork, sprintf('/res/level%d/model_1.mat', mode2plot)])
  36. title({sprintf('r = %.03f , p = %.03f', round(correl(res.frwork.split.best),3), round(res.stat.pval(res.frwork.split.best),3)),},'fontsize',18)
  37. xlim([min(P(:,1))-0.02 max(P(:,1))+0.02])
  38. ylim([min(P(:,2))-0.02 max(P(:,2))+0.02])
  39. saveas(gcf,[savepath, 'scatter_CCAvariates_testtrain.png'])
  40. % % Plot data projections across levels (and averaged across modalities
  41. % % in a level after standardization)
  42. % plot_proj(res, {'X' 'Y'; 'X' 'Y'}, [1 1; 2 2], 'osplit', res.frwork.split.best, ...
  43. % 'none', '2d', 'proj.multi_label', 1);
  44. %% Plot behavioural weights as vertical bar plot (function from cca-pls toolkit - alternative barplot later)
  45. %weightY = plot_weight(res, 'Y', 'behav', res.frwork.split.best, 'behav_vert', ...
  46. %'gen.axes.FontSize', 20, 'gen.legend.FontSize', 12); % ...
  47. %'behav.weight.sorttype', 'sign', 'behav.weight.numtop', 20);
  48. %'gen.axes.YLim', [-0.004 0.013], ...
  49. %if strcmp(weighttype, 'correlation')
  50. % title('Behavioural CCA loadings (structure correlations)')
  51. % saveas(gcf, [savepath, 'bar_CCAloadings_beh.png'])
  52. %elseif strcmp(weighttype, 'weight')
  53. % title('Behavioural CCA weights')
  54. % saveas(gcf, [savepath, 'bar_CCAweights_beh.png'])
  55. %end
  56. %% calculate weights
  57. weightX = calc_weights('X', res.frwork.split.best, res, cfg.cfg);
  58. weightY = calc_weights('Y', res.frwork.split.best, res, cfg.cfg);
  59. %% Plot scatterplot of Connectome * Mind-Wanding Canonical Variates and color by most influential variable
  60. % Edit figure properties
  61. fontName = 'Helvetica';
  62. fontSize = 18;
  63. dotsize = 65;
  64. plotX = P(:,1);%vargout.Q'*vargout.U(:,mode2plot); % connectome projections
  65. plotY = P(:,2);%vargout.Q'*vargout.V(:,mode2plot); % body/mind wandering items projections
  66. rawdata_path = ['/home/leah/Git/connectivity_tools/toolboxes/matlab/cca_pls_toolkit-master/', Project, '/data/'];
  67. peak_idx = find(abs(weightY) == max(abs(weightY)));
  68. peak_var = load([rawdata_path, 'Y.mat']); peak_var = peak_var.Y(:,peak_idx);
  69. figure
  70. set(gcf,'color','w');
  71. scatter(plotX, plotY, dotsize, peak_var,'filled') %%%%%%%%%%%%%%%%%%
  72. load([filepath, framework, sprintf('/res/level%d/model_1.mat',mode2plot)])
  73. title({sprintf('CCA Mode %d', mode2plot), sprintf('r = %.03f , p = %.03f', round(correl(res.frwork.split.best),3), round(res.stat.pval(res.frwork.split.best),3))},'fontsize',fontSize)
  74. ylabel(sprintf('Body-Wandering Variate'),'fontsize',fontSize); %'Beh Variate'
  75. xlabel(sprintf('Connectivity Variate'),'fontsize',fontSize); %'Brain Variate'
  76. set(gca,'FontName',fontName,'fontsize',fontSize)
  77. legend(beh_labels{peak_idx},'Location','southwest');legend boxoff ; %%
  78. xlim([min(P(:,1))-0.02 max(P(:,1))+0.02])
  79. ylim([min(P(:,2))-0.02 max(P(:,2))+0.02])
  80. saveas(gcf, [savepath, sprintf('scatter_CCAvariates_%s.png',beh_labels{peak_idx})])
  81. %% Heatmap of behavioural weights
  82. % Edit figure properties
  83. fontName = 'Helvetica';
  84. fontSize = 18;
  85. subplot(1,2,1);
  86. Aload = weightX;%wX_corr;%corr(vargout.Q'*vargout.Y0,vargout.Q'*vargout.U);
  87. imagesc(Aload); colorbar %imagesc(Aload(res.frwork.split.best,:)'); colorbar
  88. ylabel(sprintf('Original variables'),'fontsize',fontSize);
  89. xlabel(sprintf('Canonical variables'),'fontsize',fontSize);
  90. title({'Imaging side',''}','fontsize',fontSize);
  91. % daspect([1 1 1])
  92. set(gca,'FontName',fontName,'fontsize',fontSize-8)
  93. subplot(1,2,2)
  94. Bload = weightY;%wY_corr; %corr(vargout.Q'*vargout.X0,vargout.Q'*vargout.V);
  95. imagesc(Bload); colorbar %imagesc(Bload(res.frwork.split.best,:)'); colorbar
  96. title({'Task side',''},'fontsize',fontSize-2);
  97. ylabel(sprintf('Original variables '),'fontsize',fontSize-2);
  98. xlabel(sprintf('Canonical variables '),'fontsize',fontSize-2);
  99. %daspect([1 1 1])
  100. % Set color axis limits to ensure symmetry
  101. caxis([-max(abs(Bload(:))), max(abs(Bload(:)))]);
  102. varNames = beh_labels;
  103. yticks(1:length(varNames))
  104. yticklabels(varNames)
  105. %ytickangle(45)
  106. set(gcf,'color','w');
  107. set(gca,'FontName',fontName,'fontsize',fontSize-10)
  108. if strcmp(weighttype, 'correlation')
  109. sgtitle('CCA Loadings (structure correlations)','fontsize',fontSize+2)
  110. saveas(gcf, [savepath, 'heatmap_CCAloadings_equalcolorbar.png'])
  111. save([savepath, 'brainloadings'], 'weightX')
  112. save([savepath, 'psychloadings'], 'weightY')
  113. elseif strcmp(weighttype, 'weight')
  114. sgtitle(sprintf(sprintf('CCA %ss', weighttype)),'fontsize',fontSize+2)
  115. saveas(gcf, [savepath, 'heatmap_CCAweights_equalcolorbar.png'])
  116. save([savepath, 'brainweights'], 'weightX')
  117. save([savepath, 'psychweights'], 'weightY')
  118. end
  119. % save projections/variate also
  120. save([savepath, 'CCAvariate'], 'P')
  121. %% ordered bar plot of beh loadings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  122. [~, I] = sort(Bload, 'descend');
  123. %I = I([1:5, 31:37]); % if want to select subset to plot
  124. figure;
  125. bh = bar(reordercats(categorical(varNames(I)), varNames(I)), Bload(I), 'FaceColor', 'flat');
  126. % MAKE a custom colormap of your choice
  127. % Define your two RGB color codes
  128. color1_rgb = [255, 144, 179]/255; % Example: Red
  129. color2_rgb = [110, 68, 255]/255; % Example: Blue
  130. % Number of colors in the colormap
  131. num_colors = length(I); % Assuming 'I' is defined in your context
  132. % Generate the custom colormap
  133. custom_colormap = flipud([linspace(color1_rgb(1), color2_rgb(1), num_colors)', ...
  134. linspace(color1_rgb(2), color2_rgb(2), num_colors)', ...
  135. linspace(color1_rgb(3), color2_rgb(3), num_colors)']);
  136. % Use this custom colormap
  137. colormap(custom_colormap);
  138. % Define a custom colormap of your choice
  139. %custom_colormap = flipud(cool(length(I))); % flipud reverse colourmap %%parula
  140. %colormap(custom_colormap);
  141. % Set the colors of each bar individually based on Bload values
  142. for i = 1:length(I)
  143. bh.CData(i, :) = custom_colormap(i, :);
  144. end
  145. ax = gca; % Get current axes
  146. %ax.XAxis.FontSize = 14;
  147. ax.FontSize = 14; % This will affect both axes and the title
  148. title('CCA Loadings (structure correlations)');
  149. ylabel('CCA loadings');
  150. xlabel('Body/Mind-Wandering loadings');
  151. box off;
  152. if strcmp(weighttype, 'correlation')
  153. saveas(gcf, [savepath, 'barplot_CCAloadings_cool.png']);
  154. elseif strcmp(weighttype, 'weight')
  155. saveas(gcf, [savepath, 'barplot_CCAweights_cool.png']);
  156. end
  157. %% ordered vertical bar plot (coloured bars by intensity) %%%%%%%%%%%%%%%%
  158. [~, I] = sort(Bload, 'descend');
  159. figure;
  160. bh = barh(reordercats(categorical(varNames(I)), varNames(I)), Bload(I), 'FaceColor', 'flat');
  161. set(gcf, 'Position', [100, 100, 600, 800]); % Adjust the values as needed
  162. set(gca, 'Position', [0.7, 0.1, 0.25, 0.8]);
  163. xlabel('CCA loadings');
  164. ylabel('Body/Mind-Wandering variables');
  165. box off;
  166. custom_colormap = flipud(cool(length(I))); %flipud reverses colours %%flipud(cool(length(I)));
  167. colormap(custom_colormap);
  168. % Set the colors of each bar individually based on Bload values
  169. for i = 1:length(I)
  170. bh.CData(i, :) = custom_colormap(i, :);
  171. end
  172. % Save the figure
  173. if strcmp(weighttype, 'correlation')
  174. saveas(gcf, [savepath, 'barplot_CCAloadings_vert_cool.png']);
  175. elseif strcmp(weighttype, 'weight')
  176. saveas(gcf, [savepath, 'barplot_CCAweights_vert_cool.png']);
  177. end
  178. %% Plot hyperparameter surface for grid search results
  179. plot_paropt(res, 1, {'correl', 'simwx', 'simwy'}, ...
  180. 'gen.figure.Position', [500 600 1200 400], 'gen.axes.FontSize', 20, ...
  181. 'gen.axes.XScale', 'log', 'gen.axes.YScale', 'log');
  182. saveas(gcf, [savepath, 'hyperparameters.png']);
  183. % plotting grid search results
  184. %plot_paropt(res, 1, {'trcorrel', 'correl'}, ...
  185. %'gen.figure.Position', [500 600 800 400], 'gen.axes.FontSize', 20, ...
  186. %'gen.axes.XScale', 'log', 'gen.axes.YScale', 'log');
  187. %% wordcloud of beh loadings
  188. %behloadings = load("/home/leah/Git/BodyWanderingCCA/figures/CCA_BWitems/psychloadings.mat");
  189. %behlabels = beh_labels;
  190. %%%%cmap = cool(length(behloadings.weightY));
  191. %%%%cl = interp1(linspace(min(abs(behloadings.weightY)), max(abs(behloadings.weightY)), length(cmap)), cmap, abs(behloadings.weightY), 'nearest');
  192. %cl = flipud(custom_colormap)
  193. %figure;
  194. %wordcloud(behlabels, abs(behloadings.weightY), 'Color', cl);
  195. %saveas(gcf, [savepath, 'behloadings_WordCloud.png']);
  196. %% Get CCA results for table
  197. res = res_defaults(res, 'load');
  198. % always look at most sig data split (res.frwork.split.best)?
  199. load([res.dir.frwork, sprintf('/res/level%d/model_1.mat', mode2plot)])
  200. % Weight Stability - Connecitivity:
  201. result1 = sprintf('Brain (X) Weight Stability = %0.3f', round(mean(simwx(res.frwork.split.best,:)),3))
  202. % Explained Variance - Connectivity (in-sample - recommended):
  203. result2 = sprintf('Brain (X) Explained Variance (in-sample) = %0.3f', round(trexvarx(res.frwork.split.best),3))
  204. % Weight Stability - Mind-Wandering:
  205. result3 = sprintf('Behaviour (Y) Weight Stability = %0.3f', round(mean(simwy(res.frwork.split.best,:)),3))
  206. % Explained Variance - Mind-Wandering (in-sample - recommended):
  207. result4 = sprintf('Behaviour (Y) Explained Variance (in-sample) = %0.3f', round(trexvary(res.frwork.split.best),3))
  208. % In-Sample Correlation
  209. result5 = sprintf('CCA in-sample Correlation = %0.3f', round(trcorrel(res.frwork.split.best),3))
  210. % no p-val for in-sample correlation (because permutations based on predictive framework not descriptive)
  211. % Out-of-Sample Correlation - model generalizability
  212. result6 = sprintf('CCA out-of-sample Correlation = %0.3f, p = %0.3f', round(correl(res.frwork.split.best),3), round(res.stat.pval(res.frwork.split.best),3))
  213. % Robustness (number of significant data splits) of the CCA model
  214. result7 = sprintf('Robustness of CCA model = %d percent', (sum(res.stat.pval < (0.05 / length(res.stat.pval))) / length(res.stat.pval)) * 100)
  215. % Open a text file for writing
  216. fileID = fopen([savepath, 'CCAmode_results.txt'], 'w');
  217. % Write the results to the file
  218. fprintf(fileID, '%s\n%s\n%s\n%s\n%s\n%s\n%s\n', result1, result2, result3, result4, result5, result6, result7);
  219. fclose(fileID); % Close the file
  220. end

CCA_plots.m at commit d263a34, no license · at the source

Overview

Authors: Leah Banellis1, Niia Nikolova1, Malthe Brændholdt1, Melina Vejlø1, Ignacio Rebollo2, Nicolas Legrand3, Francesca Fardo1,4, Jonathan Smallwood5, Micah G Allen1,6
  1. Department of Clinical Medicine, Center of Functionally Integrative Neuroscience, Aarhus University, Aarhus 8000, Denmark
  2. Department of Decision Neuroscience and Nutrition, German Institute of Human Nutrition, Nuthetal 14558, Germany
  3. Center for Humanities Computing, Aarhus University, Aarhus 8000, Denmark
  4. Department of Clinical Medicine, Danish Pain Research Center, Aarhus University, Aarhus 8000, Denmark
  5. Department of Psychology, Queen’s University, Kingston, ON K7L 3N6, Canada
  6. Department of Psychiatry, University of Cambridge, Cambridge CB2 0SZ, United Kingdom
Dates: received 7 August 2025; accepted 24 February 2026; published online 25 March 2026; in print 31 March 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1073/pnas.2520822123 · PMID 41880559 · PMCID PMC13037934 · OpenAlex W7140310472
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: human (organism), cognitive (subfield)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, fMRI & imaging, Evoked potentials, Physiology & signal measures
Keywords: mind-wandering, interoception, emotion, brain connectivity, mental health
MeSH: Attention*, Thinking*, Adult, Female, Humans, Magnetic Resonance Imaging, Male, Young Adult (* major topic)
Topic: Mind wandering and attention (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: EC | Horizon Europe | Excellent Science | HORIZON EUROPE Marie Sklodowska-Curie Actions (MSCA) (101028203); European Research Council (948788, 948838, ERC-2020-StG-948838, ERC-2020-StG-948788); Lundbeck Foundation (Lundbeckfonden) (R436-2023-991, R272-2017-4345)
Citations: not cited yet (Europe PMC); 83 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

Its files are read in the Code ↔ Paper reader above, with 23 matches between paragraphs and lines of code.

embodied-computation-group/body_wandering_CCA

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: d263a3440362e4985781800b70d61be32c5f63c4, 26 March 2026
Languages: MATLAB (79), JavaScript (28), R (11), Jupyter (3), Shell (2), Python (2)
Size: 865 files, 125 scripts
Software Heritage: not archived
Found in: “Data, Materials, and Software Availability”
Holds: README, tests, documentation, 13 notebooks
Not found: license file, CITATION.cff, environment file, continuous integration
Tools: Statistics and Machine Learning Toolbox (15 files), tidyverse (10 files), patchwork (8 files), psych (8 files), circlize (7 files), ComplexHeatmap (7 files), ggplot2 (7 files), reshape2 (4 files), SPM (4 files), cowplot (3 files), FreeSurfer (3 files), ggpubr (3 files), NiBabel (3 files), Nilearn (3 files), NumPy (3 files), pandas (3 files), data.table (2 files), igraph (2 files), Matplotlib (2 files), SciPy (2 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
126 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 125 scripts, each with its path and the digest of its content;
  • 23 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1073/pnas.2520822123.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 9 authors, 5 keywords, 8 MeSH terms, 3 funders, 75 references.

Cite

This paper

Banellis, L., Nikolova, N., Brændholdt, M., Vejlø, M., Rebollo, I., Legrand, N., Fardo, F., Smallwood, J., & Allen, M. G. (2026). Uncovering the embodied dimension of the wandering mind. Proceedings of the National Academy of Sciences of the United States of America, 123(13), e2520822123. https://doi.org/10.1073/pnas.2520822123

BibTeX

@article{banellis2026uncovering,
author = {Banellis, Leah and Nikolova, Niia and Brændholdt, Malthe and Vejlø, Melina and Rebollo, Ignacio and Legrand, Nicolas and Fardo, Francesca and Smallwood, Jonathan and Allen, Micah G},
title = {{Uncovering the embodied dimension of the wandering mind}},
journal = {Proceedings of the National Academy of Sciences of the United States of America},
year = {2026},
month = mar,
volume = {123},
number = {13},
pages = {e2520822123},
publisher = {National Academy of Sciences},
issn = {0027-8424},
doi = {10.1073/pnas.2520822123},
url = {https://doi.org/10.1073/pnas.2520822123},
pmid = {41880559},
pmcid = {PMC13037934}
}

RIS

TY - JOUR
AU - Banellis, Leah
AU - Nikolova, Niia
AU - Brændholdt, Malthe
AU - Vejlø, Melina
AU - Rebollo, Ignacio
AU - Legrand, Nicolas
AU - Fardo, Francesca
AU - Smallwood, Jonathan
AU - Allen, Micah G
TI - Uncovering the embodied dimension of the wandering mind
T2 - Proceedings of the National Academy of Sciences of the United States of America
J2 - Proc Natl Acad Sci U S A
PY - 2026
DA - 2026/03/25
VL - 123
IS - 13
SP - e2520822123
SN - 0027-8424
PB - National Academy of Sciences
DO - 10.1073/pnas.2520822123
UR - https://doi.org/10.1073/pnas.2520822123
LA - en
ER -

CSL-JSON

{
"id": "10.1073/pnas.2520822123",
"type": "article-journal",
"title": "Uncovering the embodied dimension of the wandering mind",
"container-title": "Proceedings of the National Academy of Sciences of the United States of America",
"author": [
{
"family": "Banellis",
"given": "Leah"
},
{
"family": "Nikolova",
"given": "Niia"
},
{
"family": "Brændholdt",
"given": "Malthe"
},
{
"family": "Vejlø",
"given": "Melina"
},
{
"family": "Rebollo",
"given": "Ignacio"
},
{
"family": "Legrand",
"given": "Nicolas"
},
{
"family": "Fardo",
"given": "Francesca"
},
{
"family": "Smallwood",
"given": "Jonathan"
},
{
"family": "Allen",
"given": "Micah G"
}
],
"container-title-short": "Proc Natl Acad Sci U S A",
"volume": "123",
"issue": "13",
"page": "e2520822123",
"DOI": "10.1073/pnas.2520822123",
"PMID": "41880559",
"PMCID": "PMC13037934",
"ISSN": "0027-8424",
"publisher": "National Academy of Sciences",
"URL": "https://doi.org/10.1073/pnas.2520822123",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
25
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1101/2024.10.25.620252 [code]
Uncovering the embodied dimension of the wandering mind
Journal: bioRxiv (preprint)
In common: circlize, psych, ComplexHeatmap, 17 other tools, neurovault.org/collections/1598, cognitive, 43 references, 4 authors
[2] doi:10.1162/netn_a_00387 [code]
Individual variability in neural representations of mind-wandering.
Journal: Network neuroscience (Cambridge, Mass.)
In common: Nilearn, FreeSurfer, SPM, 5 other tools, 16 references
[3] doi:10.1371/journal.pcbi.1013086 [code]
The respiratory cycle modulates distinct dynamics of affective and perceptual decision-making.
Journal: PLoS computational biology
In common: pandas, SciPy, Matplotlib, 1 other tool, cognitive, 3 references, 4 authors
[4] doi:10.1038/s44271-025-00184-y [code]
Self-reports map the landscape of task states derived from brain imaging.
Journal: Communications psychology
In common: Nilearn, patchwork, ggpubr, 8 other tools, cognitive, 10 references, author Jonathan Smallwood
[5] doi:10.7554/elife.93689 [code]
Macro-scale patterns in functional connectivity associated with ongoing thought patterns and dispositional traits.
Journal: eLife
In common: circlize, psych, ComplexHeatmap, 8 other tools, 9 references, author Jonathan Smallwood
[6] doi:10.1038/s41598-023-48857-0 [code]
Experience sampling reveals the role that covert goal states play in task-relevant behavior.
Journal: Scientific reports
In common: Nilearn, patchwork, ggpubr, 8 other tools, cognitive, 9 references
[7] doi:10.1038/s42003-024-06630-7 [code]
Macroscale brain states support the control of semantic cognition.
Journal: Communications biology
In common: Nilearn, NiBabel, pandas, 3 other tools, cognitive, 14 references, author Jonathan Smallwood
[8] doi:10.1093/cercor/bhab494 [code]
Catching wandering minds with tapping fingers: neural and behavioral insights into task-unrelated cognition.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: pandas, SciPy, Matplotlib, 1 other tool, cognitive, 16 references
[9] doi:10.1126/sciadv.adq0261 [code]
Thermosensory predictive coding underpins an illusion of pain.
Journal: Science advances
In common: patchwork, cowplot, reshape2, 2 other tools, cognitive, 3 authors
[10] doi:10.1016/j.isci.2025.113755 [code]
Mapping content and dynamics in the stream of consciousness through latent brain state analysis.
Journal: iScience
In common: Nilearn, pandas, SciPy, 2 other tools, cognitive, 13 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1073/pnas.2520822123.svg)](https://openscicode.org/badge/doi/10.1073/pnas.2520822123)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1073/pnas.2520822123.svg
   :target: https://openscicode.org/badge/doi/10.1073/pnas.2520822123
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1073/pnas.2520822123"><img src="https://openscicode.org/badge/doi/10.1073/pnas.2520822123.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.