OSCR

When the inner clock fades: Interoceptive decline and consolidation of phase resetting in cortical rhythms by cardiac events underlie healthy lifespan aging.

Code ↔ Paper

7 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 7 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Results › Heartbeat evoked responses (HERs) across lifespan ↔ MVGC.m, lines 21–91 · score 0.97 · Frontal Sup Orb, Frontal Med Orb, Frontal Mid Orb, Frontal Sup Medial, Frontal Inf Orb, Frontal Inf Tri
  2. [2] § Materials and Methods › Cardiovascular scores ↔ PanTompkin_Rpeak.m, lines 31–49 · score 0.68 · heart rate variability, Pan Tompkins, HRV, IBI, cardiovascular, interval
  3. [3] § Materials and Methods › Granger causality ↔ MVGC.m, lines 252–299 · score 0.63 · Granger Causality, diff, lag, stationarity, MVGC, tsdata
  4. [4] § Materials and Methods › Heartbeat evoked responses (HERs) ↔ HERsAcrossAge.m, the whole file · a weak match · score 0.55 · Pan Tompkins, cardiac cycle, epoch, MEG, peaks, ECG
  5. [5] § Materials and Methods › Pan-Tompkins algorithm ↔ HERsAcrossAge.m, the whole file · a weak match · score 0.54 · Pan Tompkins, cardiac cycle, peaks, ECG
  6. [6] § Results › Physiological metrics of cardiovascular health across lifespan ageing ↔ PanTompkin_Rpeak.m, lines 31–49 · score 0.51 · heart rate variability, HRV, IBI, cardiovascular, electrocardiographic, interval
  7. [7] § Materials and Methods › Data preprocessing ↔ ICA_July_thirdfinal_HEPdec2022 (1).ipynb, lines 31–62 · score 0.50 · MNE, ICA, max, Component, filter, 45 Hz

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 623 lines · 53 KB · no license · 2 matches

  1. %% Calculating MVGC using autocov_to_mvgc function
  2. % Date: 07/28/2025
  3. % Step 1: Included EKG signal; not checking for stationarity
  4. % (Autocovariance empty)
  5. % Step 2: Detrended; diff of 2
  6. %%
  7. restoredefaultpath
  8. addpath(genpath('/Volumes/Kirti/Final_First_Draft_2023/Codes/github_repo'));
  9. prefix1 = 'D:\NatureAging\ROITimeseries\CC';
  10. suffix1 = '.mat';
  11. prefix2 = 'D:\NatureAging\EKG_Epochs\CC';
  12. suffix2 = '.mat';
  13. subjects = [110037;110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203;310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624;510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;710566;720358;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  14. for ii = 1:length(subjects)
  15. try
  16. %% Loading subject file - ROI time series
  17. load(strcat(prefix1, num2str(subjects(ii,1)), suffix1))
  18. % Build ROI x Time matrix
  19. roi_labels = {
  20. 'Frontal_Sup_Orb_R', 'Frontal_Mid_Orb_R', 'Frontal_Inf_Tri_L', ...
  21. 'Frontal_Med_Orb_R', 'Temporal_Pole_Mid_R', 'Temporal_Pole_Sup_L', ...
  22. 'Temporal_Pole_Sup_R', 'Frontal_Sup_R', 'Frontal_Sup_Medial_R', ...
  23. 'Frontal_Med_Orb_L', 'Cingulum_Ant_R', 'Frontal_Mid_Orb_L', ...
  24. 'Frontal_Sup_Orb_L', 'Frontal_Inf_Orb_L', 'Frontal_Inf_Orb_R', ...
  25. 'Insula_R'};
  26. n_rois = length(roi_labels);
  27. for r = 1:n_rois
  28. roi_ts_matrix(r, :) = ROI_ts.(roi_labels{r});
  29. end
  30. % %% Loading subject file - EKG signal
  31. load(strcat(prefix2, num2str(subjects(ii,1)), suffix2));
  32. ekg_mat = mean(cat(3, epochs{:}),3);
  33. %
  34. roi_ts = [roi_ts_matrix;ekg_mat]; % matrix includes ROI time series and ECG signal
  35. %
  36. addpath(genpath('D:\Final_First_Draft_2023\Codes\github_repo'));
  37. % Method to find out the model order
  38. ptic('\n*** tsdata_to_infocrit\n');
  39. [~, ~, ~, mobic] = tsdata_to_infocrit(roi_ts, 10, 'OLS');
  40. ptoc('*** tsdata_to_infocrit took ');
  41. % Making sure the time series for GC is stationary
  42. % Detrending and taking difference
  43. dt_ROI = [];
  44. dt_diff_ROI = [];
  45. for roi = 1:17
  46. dt_ROI(roi,:) = detrend(roi_ts(roi,:));
  47. dt_diff_ROI(roi,:) = diff(dt_ROI(roi,:),2);
  48. end
  49. % Calculating the AR variables
  50. morder = mobic;
  51. regmode = 'OLS';
  52. ptic('\n*** tsdata_to_var... ');
  53. [A,SIG] = tsdata_to_var(dt_diff_ROI,morder,regmode); % use same model order for reduced as for full regressions
  54. ptoc;
  55. % Autocovariance calculation
  56. acmaxlags = mobic;
  57. ptic('*** var_to_autocov...');
  58. [G,info] = var_to_autocov(A, SIG, acmaxlags);
  59. ptoc;
  60. % Calculating the GC using autocov_to_mvgc function
  61. for kk = 1:length(roi_ts(:,1))
  62. for jj = 1:length(roi_ts(:,1))
  63. try
  64. F1(jj,kk) = autocov_to_mvgc(G,jj,kk);
  65. catch
  66. end
  67. end
  68. end
  69. cd('D:\NatureAging\GC\mvgc_originalSig')
  70. savefile = strcat('CC',num2str(subjects(ii,1)),'.mat');
  71. save(savefile,'F1')
  72. catch
  73. end
  74. end
  75. %% plotting global average age wise
  76. prefix3 = '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/CC';
  77. suffix3 = '.mat';
  78. young = [110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203];
  79. for ii = 1:length(young)
  80. try
  81. load(strcat(prefix3, num2str(young(ii,1)), suffix3));
  82. F_young1{ii} = F1;
  83. catch
  84. end
  85. ii
  86. end
  87. mat_F_young1 = cat(3,F_young1{:,1});
  88. middle = [310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624];
  89. for ii = 1:length(middle)
  90. try
  91. load(strcat(prefix3, num2str(middle(ii,1)), suffix3));
  92. F_middle1{ii} = F1;
  93. catch
  94. end
  95. ii
  96. end
  97. mat_F_middle1 = cat(3,F_middle1{:,1});
  98. old = [510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;710566;720358;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  99. old_updated = [510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  100. for ii = 1:length(old_updated)
  101. try
  102. load(strcat(prefix3, num2str(old_updated(ii,1)), suffix3));
  103. F_old1{ii} = F1;
  104. catch
  105. ii
  106. end
  107. end
  108. mat_F_old1 = cat(3,F_old1{:,1});
  109. GC_y = mean(mat_F_young1,3);
  110. GC_m = mean(mat_F_middle1,3);
  111. GC_o = mean(mat_F_old1,3);
  112. % Lower linit
  113. lo = min([min(min(GC_y)), min(min(GC_m)), min(min(GC_o))]);
  114. up = max([max(max(GC_y)), max(max(GC_m)), max(max(GC_o))]);
  115. % Figures
  116. figure;
  117. subplot(2,3,1); imagesc(GC_y); caxis([lo up]); title('Young'); colormap('jet');
  118. subplot(2,3,2); imagesc(GC_m); caxis([lo up]); title('Middle'); colormap('jet');
  119. subplot(2,3,3); imagesc(GC_o); caxis([lo up]); title('Old'); colormap('jet');
  120. set(gca,'Layer','top','XTick',[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17],'XTickLabel',...
  121. {'ORBsup.R','ORBmid.R','IFGtriang.L','ORBmid.R','TPOmid.R','TPOsup.L','TPOsup.R','SFGdor.R','SFGmed.R','ORBmid.L','ACG.R','ORBmid.L','ORBsup.R','ORBinf.L','ORBinf.R','INS.R'},...
  122. 'XTickLabelRotation',45,'YTick',[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17],'YTickLabel',...
  123. {'ORBsup.R','ORBmid.R','IFGtriang.L','ORBmid.R','TPOmid.R','TPOsup.L','TPOsup.R','SFGdor.R','SFGmed.R','ORBmid.L','ACG.R','ORBmid.L','ORBsup.R','ORBinf.L','ORBinf.R','INS.R'},...
  124. 'YTickLabelRotation',45);
  125. %% Loading each subject from Old age group to find which subject contributes to the imaginary
  126. % Date: 08/03/2025
  127. % Subject list
  128. old = [510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;710566;720358;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  129. old_updated = [510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  130. prefix = '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/CC';
  131. suffix = '.mat';
  132. imaginary_subjects = []; % Store subjects with imaginary values
  133. nan_subjects = []; % Optional: track subjects with NaNs
  134. inf_subjects = []; % Optional: track subjects with Infs
  135. for sub = 1:length(old)
  136. sub_id = old(sub);
  137. file_path = strcat(prefix, [num2str(sub_id), suffix]);
  138. try
  139. load(file_path, 'F1');
  140. if any(imag(F1(:)) ~= 0)
  141. imaginary_subjects(end+1) = sub_id;
  142. elseif any(isnan(F1(:)))
  143. nan_subjects(end+1) = sub_id;
  144. elseif any(isinf(F1(:)))
  145. inf_subjects(end+1) = sub_id;
  146. end
  147. catch ME
  148. fprintf('Could not load subject %d: %s\n', sub_id, ME.message);
  149. end
  150. end
  151. %% Applying statistics on the GC calculated
  152. restoredefaultpath
  153. prefix1 = '/media/shrey/Kirti1/NatureAging/ROITimeseries/CC';
  154. suffix1 = '.mat';
  155. prefix2 = '/media/shrey/Kirti1/NatureAging/EKG_Epochs/CC';
  156. suffix2 = '.mat';
  157. subjects = [110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203;310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624;510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;710566;720358;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  158. for ii = 1:length(subjects)
  159. %% Loading subject file - ROI time series
  160. % cd('/media/shrey/Kirti1/NatureAging/ROITimeseries/')
  161. % dir(strcat('CC',num2str(subjects(ii,1)),'.mat'))
  162. load(strcat(prefix1, num2str(subjects(ii,1)), suffix1))
  163. % Build ROI x Time matrix
  164. roi_labels = {
  165. 'Frontal_Sup_Orb_R', 'Frontal_Mid_Orb_R', 'Frontal_Inf_Tri_L', ...
  166. 'Frontal_Med_Orb_R', 'Temporal_Pole_Mid_R', 'Temporal_Pole_Sup_L', ...
  167. 'Temporal_Pole_Sup_R', 'Frontal_Sup_R', 'Frontal_Sup_Medial_R', ...
  168. 'Frontal_Med_Orb_L', 'Cingulum_Ant_R', 'Frontal_Mid_Orb_L', ...
  169. 'Frontal_Sup_Orb_L', 'Frontal_Inf_Orb_L', 'Frontal_Inf_Orb_R', ...
  170. 'Insula_R'};
  171. n_rois = length(roi_labels);
  172. for r = 1:n_rois
  173. roi_ts_matrix(r, :) = ROI_ts.(roi_labels{r});
  174. end
  175. % %% Loading subject file - EKG signal
  176. load(strcat(prefix2, num2str(subjects(ii,1)), suffix2));
  177. ekg_mat = mean(cat(3, epochs{:}),3);
  178. roi_ts = [roi_ts_matrix;ekg_mat]; % matrix includes ROI time series and ECG signal
  179. %
  180. % roi_ts = roi_ts_matrix(:,230:799);
  181. %% Matrix for surrogate analysis
  182. % Phase-randomize each ROI
  183. [n_rois, N] = size(roi_ts);
  184. signal_rand = zeros(n_rois, N);
  185. for roi = 1:n_rois
  186. X = fft(roi_ts(roi, :));
  187. mag = abs(X);
  188. phs = angle(X);
  189. rand_phs = 2 * pi * rand(1, floor(N/2) - 1);
  190. new_phs = phs;
  191. new_phs(2:floor(N/2)) = rand_phs;
  192. new_phs(N:-1:(N - floor(N/2) + 2)) = -rand_phs;
  193. X_rand = mag .* exp(1i * new_phs);
  194. signal_rand(roi, :) = real(ifft(X_rand));
  195. end
  196. addpath(genpath('/media/shrey/Kirti1/Final_First_Draft_2023/Codes/github_repo'));
  197. % Method to find out the model order
  198. ptic('\n*** tsdata_to_infocrit\n');
  199. [~, ~, ~, mobic] = tsdata_to_infocrit(signal_rand, 10, 'OLS');
  200. ptoc('*** tsdata_to_infocrit took ');
  201. % for jj = 1:16
  202. % [h(jj),pVal(jj)] = kpsstest(signal_rand(jj,:));
  203. % end
  204. %% Making sure the time series for GC is stationary
  205. % Detrending and taking difference
  206. dt_ROI = [];
  207. dt_diff_ROI = [];
  208. alpha = 0.05;
  209. q = mobic; %no. of lags
  210. for roi = 1:n_rois
  211. dt_ROI(roi,:) = detrend(signal_rand(roi,:));
  212. dt_diff_ROI(roi,:) = diff(dt_ROI(roi,:),2);
  213. % [h1(roi),pVal1(roi)] = kpsstest(dt_diff_ROI(roi,:));
  214. end
  215. % Return VAR parameters
  216. try
  217. X = dt_diff_ROI;
  218. morder = mobic;
  219. regmode = 'OLS';
  220. % if all(h1 == 0)
  221. ptic('\n*** tsdata_to_var... ');
  222. [A,SIG] = tsdata_to_var(X,morder,regmode); % use same model order for reduced as for full regressions
  223. ptoc;
  224. % else
  225. % failed_roi = find(h1 == 1);
  226. % failed_subject_ids{ii} = subjects(ii,1); % Make sure current_subject_id is defined
  227. % end
  228. % Autocovariance calculation
  229. acmaxlags = mobic;
  230. ptic('*** var_to_autocov...');
  231. [G,info] = var_to_autocov(A, SIG, acmaxlags);
  232. ptoc;
  233. % Granger causality calclation: time domain
  234. ptic('*** autocov_to_pwcgc... ');
  235. F_null = autocov_to_pwcgc(G);
  236. ptoc;
  237. cd('/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/Surrogate')
  238. savefile = strcat('CC',num2str(subjects(ii,1)),'.mat');
  239. save(savefile,'F_null')
  240. catch
  241. end
  242. ii
  243. end
  244. %% Applying stats (Permutation testing)
  245. n_rois = 17;
  246. subjects = [110037;110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203;310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624;510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;710566;720358;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  247. n_sub = length(subjects_updated);
  248. % Preallocate
  249. F_real_all = nan(n_rois, n_rois, n_sub);
  250. F_null_all = nan(n_rois, n_rois, n_sub);
  251. prefix1= '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/CC';
  252. suffix1 = '.mat';
  253. prefix2 = '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/Surrogate/CC';
  254. suffix2 = '.mat';
  255. for ii = 1:length(subjects_updated)
  256. try
  257. %Load real GC
  258. load(strcat(prefix1, num2str(subjects_updated(ii,1)), suffix1));
  259. F_real_all(:, :,ii) = F1;
  260. %Load null GC
  261. load(strcat(prefix2, num2str(subjects_updated(ii,1)), suffix2));
  262. F_null_all(:,:,ii) = F_null;
  263. catch
  264. end
  265. ii
  266. end
  267. % Checking if the F_null includes any imaginary value
  268. % Subject list
  269. subjects = [110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203;310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624;510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;710566;720358;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  270. subjects_updated = [110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203;310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624;510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  271. prefix = '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/CC';
  272. suffix = '.mat';
  273. imaginary_subjects = []; % Store subjects with imaginary values
  274. nan_subjects = []; % Optional: track subjects with NaNs
  275. inf_subjects = []; % Optional: track subjects with Infs
  276. for sub = 1:length(subjects_updated)
  277. sub_id = subjects_updated(sub);
  278. file_path = strcat(prefix, [num2str(sub_id), suffix]);
  279. try
  280. load(file_path, 'F1');
  281. if any(imag(F1(:)) ~= 0)
  282. imaginary_subjects(end+1) = sub_id;
  283. elseif any(isnan(F1(:)))
  284. nan_subjects(end+1) = sub_id;
  285. inf_subjects(end+1) = sub_id;
  286. end
  287. catch ME
  288. fprintf('Could not load subject %d: %s\n', sub_id, ME.message);
  289. end
  290. end
  291. % Display results
  292. disp('Subjects with imaginary values in F1:');
  293. disp(imaginary_subjects');
  294. disp('Subjects with NaNs in F1 (if any):');
  295. disp(nan_subjects');
  296. disp('Subjects with Infs in F1 (if any):');
  297. disp(inf_subjects');
  298. %% Applying stats
  299. % Date: 08/06/2025
  300. % Applying FDR correction
  301. % === INPUTS ===
  302. % F_real : [16 x 16 x 620] real GC values across subjects
  303. % F_surrogate : [16 x 16 x 620] surrogate GC values (null distribution)
  304. nVars = size(F_real_all,1);
  305. nSubj = size(F_real_all,3);
  306. alpha = 0.01;
  307. % === Step 1: Compute mean GC across subjects (real)
  308. GC_real_mean = mean(F_real_all, 3, 'omitnan'); % [16 x 16]
  309. % === Step 2: Compute null distribution from surrogate data
  310. % For each connection (i→j), collect 620 surrogate values and get 99th percentile
  311. threshold_matrix = nan(nVars, nVars);
  312. pval_matrix = nan(nVars, nVars);
  313. signif_matrix = false(nVars, nVars);
  314. for i = 1:nVars
  315. for j = 1:nVars
  316. null_vals = squeeze(F_null_all(i,j,:)); % surrogate GC values for i→j
  317. null_vals = null_vals(~isnan(null_vals));
  318. real_val = GC_real_mean(i,j);
  319. if ~isempty(null_vals) && ~isnan(real_val)
  320. % 99th percentile threshold
  321. threshold = quantile(null_vals, 1 - alpha);
  322. threshold_matrix(i,j) = threshold;
  323. % Compare real value to threshold
  324. if real_val > threshold
  325. signif_matrix(i,j) = true;
  326. end
  327. % Also compute uncorrected p-value
  328. pval_matrix(i,j) = mean(null_vals >= real_val);
  329. end
  330. end
  331. end
  332. % === Step 3: Bonferroni correction
  333. nTests = nVars * nVars;
  334. bonf_alpha = alpha / nTests;
  335. signif_matrix_bonf = pval_matrix < bonf_alpha;
  336. % === Outputs ===
  337. fprintf('Connections above 99th percentile (uncorrected): %d\n', sum(signif_matrix(:)));
  338. fprintf('Connections significant after Bonferroni: %d\n', sum(signif_matrix_bonf(:)));
  339. % === OPTIONAL: Visualize
  340. figure;
  341. subplot(1,3,1); imagesc(GC_real_mean); title('Mean Real GC'); colorbar; axis square;
  342. subplot(1,3,2); imagesc(signif_matrix); title('Uncorrected Significance'); axis square;
  343. subplot(1,3,3); imagesc(signif_matrix_bonf); title('Bonferroni Corrected'); axis square;
  344. %% Understanding trend of the signficant connections
  345. % Linear regression between 1 to 5
  346. for ii = 1:176
  347. GCVal_young(ii) = F_young1{ii,1}(4,15);
  348. age_young(ii) = F_young1{ii,3};
  349. ii
  350. end
  351. for ii = 1:198
  352. GCVal_middle(ii) = F_middle1{ii,1}(4,15);
  353. age_middle(ii) = F_middle1{ii,3};
  354. ii
  355. end
  356. for ii = 1:243
  357. GCVal_old(ii) = F_old1{ii,1}(4,15);
  358. age_old(ii) = F_old1{ii,3};
  359. ii
  360. end
  361. GC = [GCVal_young, GCVal_middle, GCVal_old];
  362. age = [age_young, age_middle, age_old];
  363. [r,p] = corrcoef(age, GC)
  364. figure; scatter(age,GC);
  365. set(gca,'FontSize',14);
  366. xlabel('Age (years)');
  367. ylabel('GC Values');
  368. xlim([10 90]);
  369. %% DATE: 08/11/2025
  370. % Applying stats on group wise
  371. n_rois = 17;
  372. sub_y = length(young);
  373. sub_m = length(middle);
  374. sub_o = length(old_updated);
  375. young = [110182;120137;120376;120409;120462;121111;120061;120550;110606;120212;121685;120347;110056;110126;110098;110101;120276;120727;122016;110033;120208;120795;122620;110174;110187;110411;120065;120120;120184;120469;121317;121795;120008;120182;120640;121144;121200;121428;121479;120218;120309;120319;120764;121397;122172;122405;110069;110087;110319;120049;120166;120264;120313;120470;121106;121158;220526;221033;112141;210250;210519;212153;220115;220352;220519;221209;221373;222555;210148;210174;220151;220518;221648;222652;210023;210172;210182;220132;220419;221054;222797;220098;220511;220535;220610;221244;221565;221755;221775;221828;221954;222185;222956;220223;220323;220713;220828;221595;221886;210314;210422;210617;220107;220203;220284;220335;220920;221336;221527;221737;221980;222125;210051;210124;220234;220506;220697;220901;221107;221487;221740;222258;222326;210088;220232;220635;221040;221324;221511;221733;223115;223286;210526;210657;220198;220372;220567;220843;220974;220999;221002;221220;221352;221585;221935;221977;222120;222264;222367;221031;222304;222496;223085;320267;310203;320109;320417;320575;320616;321174;321506;321529;310129;310414;320022;320297;320321;320342;320478;320574;320686;321000;321025;321053;321087;321203];
  376. middle = [310391;310397;310410;320088;320361;320680;320687;321069;321137;310051;310052;310135;320448;320461;320651;320904;321428;321504;321976;310361;310400;320661;320814;321073;321594;310256;320325;320336;320568;320759;321107;321291;321544;321557;321585;321595;310008;310463;312149;320202;320428;320576;320608;320636;320698;321368;321464;310214;310331;310450;310473;320002;320500;320621;321281;321331;321880;310086;310224;310252;312058;320089;320107;320206;320218;320359;320445;320776;320850;320861;320870;320888;320893;322186;310142;310385;312222;320059;320160;320379;320429;320553;321154;321431;410354;420089;420383;321899;410097;410169;410286;420004;420173;420244;420322;420402;420587;420776;410284;420217;420226;420260;420566;420720;420888;410015;410323;420060;420167;420202;420392;420433;420493;420623;410220;410432;420071;420075;420091;420149;420162;420182;420229;420324;420412;420589;410182;410251;420143;420204;420236;420396;420435;410248;410325;412004;412021;420231;420261;420356;420364;420454;420582;410032;410040;410113;410173;410179;410222;420197;420222;420241;420462;420464;410101;410243;410390;420094;420100;420137;420148;420286;410084;410086;410091;410119;410177;410387;420348;410129;410287;410289;410297;420157;420198;510043;510161;520042;520253;510050;510609;510629;520168;520197;520287;520398;520584;510039;510242;510243;510258;510259;510284;510483;520011;520065;520480;520624];
  377. old_updated = [510433;510551;510648;520055;520147;520175;520395;520775;510076;510115;510255;510354;510438;510548;510639;512003;520097;510256;510342;510486;520078;520211;520215;520247;520377;520424;520436;520745;521040;510163;510321;510323;510329;510415;520002;520053;520391;520552;520597;520607;510086;510355;510434;510473;520083;520136;520239;520390;520517;520560;510208;510220;510237;510304;510474;510534;520127;520209;520254;520477;520503;520562;510226;510392;520013;520122;520134;520200;520673;520868;510393;510395;520279;520585;520980;610022;610028;610051;610101;620121;620259;620359;620406;610071;610099;610308;610594;620073;620262;620429;620479;620527;620785;621184;610039;610372;610496;610625;610671;620026;620085;620496;620821;621080;610285;610344;610575;610653;620090;620106;620118;620619;620659;620793;620935;610040;610046;610178;610292;610405;610576;620164;621199;621248;610058;610469;620114;620526;620549;621642;620005;620314;620567;620592;610210;610392;620129;620284;620451;620454;620466;620515;621128;610146;610227;610462;610568;620193;620264;620405;620413;620610;621011;621118;610052;610076;610212;610508;610631;620279;620444;620685;620354;620518;620572;620720;620885;620919;710037;710176;720188;721888;621284;710214;710223;710486;710858;710982;720119;720511;720670;720941;721052;721107;721114;721292;721418;721585;722421;722536;722651;710429;710494;711027;711128;711158;720238;720304;720329;720330;720497;721291;721377;721392;721449;721648;721707;721894;723197;710313;710350;720622;721729;710462;710664;720023;720407;721504;721704;710342;710382;710548;720986;721891;710679;720290;720516;720723;721434;722891;710131;710446;710551;710591;711244;711245;720400;721374;723395;712027;720774;721224;721532];
  378. % Preallocate
  379. F_real_young = nan(n_rois, n_rois, sub_y);
  380. F_null_young = nan(n_rois, n_rois, sub_y);
  381. F_real_middle = nan(n_rois, n_rois, sub_m);
  382. F_null_middle = nan(n_rois, n_rois, sub_m);
  383. F_real_old = nan(n_rois, n_rois, sub_o);
  384. F_null_old = nan(n_rois, n_rois, sub_o);
  385. prefix1= '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/CC';
  386. suffix1 = '.mat';
  387. prefix2 = '/media/shrey/Kirti1/NatureAging/GC/mvgc_originalSig/Surrogate/CC';
  388. suffix2 = '.mat';
  389. for ii = 1:length(young)
  390. try
  391. %Load real GC
  392. load(strcat(prefix1, num2str(young(ii,1)), suffix1));
  393. F_real_young(:, :,ii) = F1;
  394. %Load null GC
  395. load(strcat(prefix2, num2str(young(ii,1)), suffix2));
  396. F_null_young(:,:,ii) = F_null(1:16,1:16);
  397. catch
  398. end
  399. ii
  400. end
  401. for ii = 1:length(middle)
  402. try
  403. %Load real GC
  404. load(strcat(prefix1, num2str(middle(ii,1)), suffix1));
  405. F_real_middle(:, :,ii) = F1(1:16,1:16);
  406. %Load null GC
  407. load(strcat(prefix2, num2str(middle(ii,1)), suffix2));
  408. F_null_middle(:,:,ii) = F_null(1:16,1:16);
  409. catch
  410. end
  411. ii
  412. end
  413. for ii = 1:length(old_updated)
  414. try
  415. %Load real GC
  416. load(strcat(prefix1, num2str(old_updated(ii,1)), suffix1));
  417. F_real_old(:, :,ii) = F1(1:16,1:16);
  418. %Load null GC
  419. load(strcat(prefix2, num2str(old_updated(ii,1)), suffix2));
  420. F_null_old(:,:,ii) = F_null(1:16,1:16);
  421. catch
  422. end
  423. ii
  424. end
  425. %% STATS
  426. % F_surrogate : [16 x 16 x 620] surrogate GC values (null distribution)
  427. nVars = size(F_real_old,1);
  428. nSubj = size(F_real_old,3);
  429. alpha = 0.01;
  430. % === Step 1: Compute mean GC across subjects (real)
  431. GC_real_mean = mean(F_real_old, 3, 'omitnan'); % [16 x 16]
  432. % === Step 2: Compute null distribution from surrogate data
  433. % For each connection (i→j), collect 620 surrogate values and get 99th percentile
  434. threshold_matrix = nan(nVars, nVars);
  435. pval_matrix= nan(nVars, nVars);
  436. signif_matrix = false(nVars, nVars);
  437. for i = 1:nVars
  438. for j = 1:nVars
  439. null_vals = squeeze(F_null_old(i,j,:)); % surrogate GC values for i→j
  440. null_vals = null_vals(~isnan(null_vals));
  441. real_val = GC_real_mean(i,j);
  442. if ~isempty(null_vals) && ~isnan(real_val)
  443. % 99th percentile threshold
  444. threshold = quantile(null_vals, 1 - alpha);
  445. threshold_matrix(i,j) = threshold;
  446. % Compare real value to threshold
  447. if real_val > threshold
  448. signif_matrix(i,j) = true;
  449. end
  450. % Also compute uncorrected p-value
  451. pval_matrix(i,j) = mean(null_vals >= real_val);
  452. end
  453. end
  454. end
  455. % === Step 3: Bonferroni correction
  456. nTests = nVars * nVars;
  457. bonf_alpha = alpha / nTests;
  458. signif_matrix_bonf = pval_matrix< bonf_alpha;
  459. % === Outputs ===
  460. fprintf('Connections above 99th percentile (uncorrected): %d\n', sum(signif_matrix(:)));
  461. fprintf('Connections significant after Bonferroni: %d\n', sum(signif_matrix_bonf(:)));
  462. % === OPTIONAL: Visualize
  463. figure;
  464. subplot(1,3,1); imagesc(GC_real_mean); title('Old'); colorbar; axis square;
  465. subplot(1,3,2); imagesc(signif_matrix); title('Uncorrected Significance'); axis square;
  466. subplot(1,3,3); imagesc(signif_matrix_bonf); title('Bonferroni Corrected'); axis square;
  467. %% Understanding the trend of the significant GC connections
  468. %% Understanding trend of the signficant connections
  469. % Linear regression between 1 to 5
  470. for ii = 1:size(F_young1,1)
  471. GCVal_young(ii) = F_young1{ii,1}(4,15);
  472. age_young(ii) = F_young1{ii,3};
  473. ii
  474. end
  475. for ii = 1:size(F_middle1,1)
  476. GCVal_middle(ii) = F_middle1{ii,1}(4,15);
  477. age_middle(ii) = F_middle1{ii,3};
  478. ii
  479. end
  480. for ii = 1:size(F_old1,1)
  481. GCVal_old(ii) = F_old1{ii,1}(4,15);
  482. age_old(ii) = F_old1{ii,3};
  483. ii
  484. end
  485. GC = [GCVal_young, GCVal_middle, GCVal_old];
  486. age = [age_young, age_middle, age_old];
  487. [r,p] = corrcoef(age, GC)
  488. figure; scatter(age,GC);
  489. set(gca,'FontSize',14);
  490. xlabel('Age (years)');
  491. ylabel('GC Values');
  492. xlim([10 90]);

MVGC.m at commit 35b1c30, no license · at the source

Overview

Authors: Kirti Saluja1, Dipanjan Roy2, Arpan Banerjee1
ORCID iDs: Arpan Banerjee
  1. National Brain Research Centre, Manesar, India
  2. Centre for Brain Science and Applications (CBSA), School of AIDE, Indian Institute of Technology, Jodhpur, India
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1319
Dates: received 12 January 2026; accepted 27 June 2026; published online 29 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1319 · PMID 42569459 · PMCID PMC13449928 · OpenAlex W7167677055
Open access: diamond, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Preprocessing, Statistics, Smoothing, state filtering, decompositions, Machine learning, Connectivity, fMRI & imaging, Evoked potentials, Physiology & signal measures
Keywords: interoception, resting state, time perception, heartbeat evoked responses (HERs), Granger causality (GC), inter-trial phase coherence (ITPC)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 58 references in the paper

Abstract

The brain continuously integrates signals from the external environment along with internal bodily cues to support adaptive cognition and homeostasis. Among these, multiple visceral rhythms, such as respiration, circadian fluctuations, and cardiac activity, contribute to the organization of intrinsic brain dynamics. The present study focuses on cardiac signals, as the heartbeat provides a continuous, quasi-periodic physiological rhythm that enables precise time-locking of neural responses and offers a tractable model for investigating brain–body interactions at rest. Interoceptive processing is influenced by factors, including arousal, emotional state, and aging, and is known to be altered in neurological conditions such as Parkinson’s disease and dementia. Here, we investigated how the cortical representation of cardiac signals changes across the adult lifespan and the mechanisms underlying this reorganization. Using a large human cohort (N = 620, aged 18–88 years) with simultaneous resting-state MEG and ECG, the study found that cortical heartbeat-evoked responses (HERs) showed distinct amplitude changes in the 180–320 ms window post the heartbeat including a systematic reduction in amplitude with age. Cardiac signals modulated the phase of ongoing theta-band neural oscillations rather than altering overall power, and this phase-resetting effect became more consolidated in older adults. Source analysis revealed that resting-state HERs originated primarily from fronto-temporal regions, including orbitofrontal, frontal, and temporal pole areas, and exhibited a clear age-related shift from predominantly frontal to more temporal generators. Directed connectivity analyses revealed an age-related shift in heart–brain communication, characterized by increased heart-to-brain and decreased brain-to-heart Granger causality. Together, these findings demonstrate that cardiac processing undergoes systematic age-related reorganization, characterized by changes in response amplitude, phase dynamics, and heart–brain interactions. These alterations may contribute to broader age-related differences in cognitive functions such as attention, emotions, and time perception.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

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

kirtisaluja/HER-Across-Ageing

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 35b1c30602d9215083ba7114d6e88a8b9a70d151, 14 September 2025
Languages: MATLAB (5), Jupyter (1)
Size: 7 files, 6 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README, 1 notebook
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: FieldTrip (3 files), Chronux (1 file), Statistics and Machine Learning Toolbox (1 file), MNE-Python (1 file), NumPy (1 file), SciPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
7 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;
  • 6 scripts, each with its path and the digest of its content;
  • 7 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

No dataset and no data link were found in the paper.

Data and Code Availability

The neuroimaging data of healthy participants were obtained from publicly available CamCAN repository (available at http://www.mrc-cbu.cam.ac.uk/datasets/camcan). (Shafto et al., 2014; Taylor et al., 2017). Please note all data are publicly available after signing a non-disclosure clause with data provider (CamCAN). Custom code used for the analysis presented in this study can be downloaded from GitHub link https://github.com/kirtisaluja/HER-Across-Ageing/

Reproduced under the paper's license (CC BY), from the paper cited above.

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 2, 28 September 2026

  • Funding: added Department of Biotechnology, Ministry of Science and Technology, India; National Brain Research Centre

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 3 authors, 6 keywords, 58 references.

Cite

This paper

Saluja, K., Roy, D., & Banerjee, A. (2026). When the inner clock fades: Interoceptive decline and consolidation of phase resetting in cortical rhythms by cardiac events underlie healthy lifespan aging. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1319. https://doi.org/10.1162/imag.a.1319

BibTeX

@article{saluja2026when,
author = {Saluja, Kirti and Roy, Dipanjan and Banerjee, Arpan},
title = {{When the inner clock fades: Interoceptive decline and consolidation of phase resetting in cortical rhythms by cardiac events underlie healthy lifespan aging}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = jul,
volume = {4},
pages = {IMAG.a.1319},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1319},
url = {https://doi.org/10.1162/imag.a.1319},
pmid = {42569459},
pmcid = {PMC13449928}
}

RIS

TY - JOUR
AU - Saluja, Kirti
AU - Roy, Dipanjan
AU - Banerjee, Arpan
TI - When the inner clock fades: Interoceptive decline and consolidation of phase resetting in cortical rhythms by cardiac events underlie healthy lifespan aging
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/07/29
VL - 4
SP - IMAG.a.1319
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1319
UR - https://doi.org/10.1162/imag.a.1319
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1319",
"type": "article-journal",
"title": "When the inner clock fades: Interoceptive decline and consolidation of phase resetting in cortical rhythms by cardiac events underlie healthy lifespan aging",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Saluja",
"given": "Kirti"
},
{
"family": "Roy",
"given": "Dipanjan"
},
{
"family": "Banerjee",
"given": "Arpan"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1319",
"DOI": "10.1162/imag.a.1319",
"PMID": "42569459",
"PMCID": "PMC13449928",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1319",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
29
]
]
}
}

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.1111/psyp.70297 [code]
Heartbeat-Evoked Responses in M/EEG: A Systematic Review of Methods With Suggestions for Analysis and Reporting.
Journal: Psychophysiology
In common: NumPy, 17 references
[2] doi:10.1111/psyp.70301
Oscillatory Markers of Interoceptive Attention: Beta Suppression as a Neural Signature of Heartbeat Processing.
Journal: Psychophysiology
In common: cognitive, 9 references
[3] doi:10.1162/imag.a.1353 [code]
Model-based cardiac field artefact correction for OP-MEG.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: FieldTrip, Statistics and Machine Learning Toolbox, 6 references
[4] doi:10.1093/braincomms/fcag120 [code]
The heartbeat evoked potential and the prediction of functional seizure semiology.
Journal: Brain communications
In common: MNE-Python, SciPy, NumPy, 5 references
[5] doi:10.7554/elife.100605 [code]
Age-related changes in ‘cortical’ 1/f dynamics are linked to cardiac activity
Journal: n/a
In common: MNE-Python, SciPy, NumPy, 5 references
[6] doi:10.1088/1741-2552/ae5fd7 [code]
Metric validation for detection of delayed and directed coupling.
Journal: Journal of neural engineering
In common: FieldTrip, Statistics and Machine Learning Toolbox, SciPy, 1 other tool, 4 references
[7] doi:10.1038/s41467-026-73553-8 [code]
Universal rhythmic architecture uncovers two modes of neural dynamics.
Journal: Nature communications
In common: FieldTrip, MNE-Python, Statistics and Machine Learning Toolbox, 2 other tools, 3 references
[8] doi:10.1038/s41467-026-71568-9 [code]
Convergent and selective representations of pain, appetitive processes, aversive processes, and cognitive control in the insula.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, SciPy, NumPy, cognitive, 4 references
[9] doi:10.1038/s41598-026-52930-9
Cardiac systole is associated with enhanced go responding in an orthogonalized go/nogo task.
Journal: Scientific reports
In common: cognitive, 5 references
[10] doi:10.1038/s41597-025-06397-4 [code]
MEG-SCANS - A comprehensive magnetoencephalography speech dataset with Stories, Chirps and Noisy Sentences
Journal: n/a
In common: FieldTrip, MNE-Python, Statistics and Machine Learning Toolbox, 2 other tools, 2 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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

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