OSCR

Optimising 7T-fMRI for Imaging Regions of Magnetic Susceptibility.

Code ↔ Paper

22 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 22 matches · 7 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_ME.sh, lines 94–170 · score 0.97 · phase encoding direction, antsRegistrationSyN.sh, antsApplyTransforms, rigid body, native T1, native EPI
  2. [2] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_SE.sh, lines 47–131 · score 0.96 · phase encoding direction, antsRegistrationSyN.sh, antsApplyTransforms, rigid body, native T1, native EPI
  3. [3] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_SE.sh, lines 47–131 · score 0.92 · dDespike, dTshift, dAllineate, brain mask, AFNI, ANTs
  4. [4] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_ME.sh, lines 47–92 · score 0.84 · dDespike, dTshift, dAllineate, AFNI, FSL, dvolreg
  5. [5] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_ME_slice_leakage.sh, lines 94–144 · score 0.81 · t2smap, native EPI space, brain mask, slice leakage, optimal, coregistration
  6. [6] § Methods › Data Analysis › Preprocessing ↔ matlab/mp2rage_scripts/DemoRemoveBackgroundNoise.m, the whole file · a weak match · score 0.77 · background noise, MP2RAGE T1w, T1w image, segmentation, bias, brain
  7. [7] § Methods › Data Analysis › Preprocessing ↔ matlab/mp2rage_proc.m, the whole file · a weak match · score 0.76 · skull stripped, fMRIprep, CAT12, segmentation, SPM12, bias
  8. [8] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_ME.sh, lines 94–170 · score 0.76 · tedana workflow, native EPI space, brain mask, optimal, coregistration, preprocessing
  9. [9] § Methods › Data Analysis › First‐Level (Within‐Participant) GLM ↔ firstlevel_glm.m, lines 272–334 · score 0.74 · odd volumes, single band, ICA denoised, multi echo, GLM, linear
  10. [10] § Methods › Data Analysis › First‐Level (Within‐Participant) GLM ↔ firstlevel_glm_mvpa.m, lines 55–112 · score 0.72 · high pass filter, beta image, implicitly, AR, onset, regressors
  11. [11] § Methods › Data Analysis › First‐Level (Within‐Participant) GLM ↔ firstlevel_glm_ernst.m, lines 112–185 · score 0.70 · high pass filter, motion parameters, implicitly, onset, regressors, SPM
  12. [12] § Methods › Data Analysis › Second‐Level (Across‐Participant) GLM › Slice Leakage Analysis ↔ MC_sliceLeakage_find_masks_all.m, the whole file · a weak match · score 0.69 · spherical ROI, artefact location, shift, radius, peak, native
  13. [13] § Results › Region‐of‐Interest Analysis › Univariate Analysis ↔ secondlevel_glm_roi.m, lines 1549–1624 · score 0.68 · MBodd, LIFGpt, LpMTG, LvATL, interaction, RITG
  14. [14] § Methods › Data Analysis › Second‐Level (Across‐Participant) GLM › Whole‐Brain Analysis ↔ secondlevel_glm.m, lines 97–222 · score 0.66 · batch spm anova, factorial designs, band, MESB, SEMB, MEMB
  15. [15] § Methods › Data Analysis › First‐Level (Within‐Participant) GLM ↔ secondlevel_glm_roi.m, lines 1549–1624 · score 0.66 · SEMBodd, MEMBodd, match, band, GLM, model
  16. [16] § Methods › Data Analysis › Second‐Level (Across‐Participant) GLM › Slice Leakage Analysis ↔ MC_sliceLeakage_extract_ROIs_all.m, lines 13–81 · score 0.65 · slice leakage, artefact regions, control sequence, peaks, SB, seed
  17. [17] § Results › Region‐of‐Interest Analysis ↔ secondlevel_glm_roi.m, lines 232–291 · score 0.61 · LmMTG, LIFGpt, LpMTG, LvATL, LTP, LFP
  18. [18] § Methods › Image Acquisition ↔ matlab/mp2rage_scripts/func/T1M0estimateMP2RAGE.m, the whole file · a weak match · score 0.60 · partial Fourier, flip angle, neuroimaging, slabs, pulse, TR
  19. [19] § Methods › Image Acquisition ↔ matlab/mp2rage_scripts/func/T1estimateMP2RAGE.m, the whole file · a weak match · score 0.60 · partial Fourier, flip angle, neuroimaging, slabs, pulse, TR
  20. [20] § Methods › Data Analysis › Second‐Level (Across‐Participant) GLM › Slice Leakage Analysis ↔ MC_sliceLeakage_find_masks_all.m, the whole file · a weak match · score 0.60 · artefact location, slice leakage, shift, peaks, GRAPPA, seed
  21. [21] § Results › Excluded Participants ↔ motion_outliers.m, the whole file · a weak match · score 0.57 · absolute translation, absolute rotation, motion, volumes
  22. [22] § Methods › Data Analysis › Second‐Level (Across‐Participant) GLM › Region‐of‐Interest (ROI) Analysis › Exploratory Multivariate Pattern Analysis (MVPA) ↔ secondlevel_glm_roi.m, lines 909–968 · score 0.56 · cosine distance, beta images, zero, block, MVPA, ROI

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 · 1,624 lines · 71 KB · no license · 4 matches

  1. addpath('/group/mlr-lab/AH/Projects/spm12/');
  2. addpath('/group/mlr-lab/AH/Projects/toolboxes/');
  3. addpath('/group/mlr-lab/AH/Projects/toolboxes/Violinplot/');
  4. addpath('/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/riksneurotools-master/Util');
  5. % the above line adds the function roi_extract.m to path. Before using this
  6. % % function, check that lines 195-196 read:
  7. % ROI(nr,s).mean = nanmean(d,2);
  8. % ROI(nr,s).median = nanmedian(d,2);
  9. addpath('/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts');
  10. root = ['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/derivatives'];
  11. cd(root);
  12. % exclusions: 013 and 017 for excessive head motion, and 004 because the
  13. % pTx run was not acquired.
  14. subs=[{'001'},{'002'},{'003'},{'005'},{'006'},{'007'},{'008'},{'009'},{'010'},{'011'},{'012'},{'014'},{'015'},{'016'},{'017'},{'018'},{'019'}];
  15. %% comparing pTx to SESB
  16. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  17. % 1) and use only ROIs that overlap with this main effect (comment out
  18. % those that do not).
  19. R = struct();
  20. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  21. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  22. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  23. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  24. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  25. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  26. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  27. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  28. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  29. % extract ROIs from con images (expressing model fit)
  30. imgs = cell(1,length(subs));
  31. con = struct();
  32. for s=1:length(subs)
  33. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/con_0003.nii'];
  34. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_ptx8ms/con_0003.nii'];
  35. end
  36. % extract data from each ROI
  37. con.Datafiles = imgs;
  38. con.output_raw = 1;
  39. con.ROIfiles=R.ROIfiles;
  40. con.ROI = roi_extract(con);
  41. % extract ROIs from spmT images (expressing model precision)
  42. imgs = cell(1,length(subs));
  43. spmT = struct();
  44. for s=1:length(subs)
  45. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/spmT_0003.nii'];
  46. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_ptx8ms/spmT_0003.nii'];
  47. end
  48. % extract data from each ROI
  49. spmT.Datafiles = imgs;
  50. spmT.output_raw = 1;
  51. spmT.ROIfiles=R.ROIfiles;
  52. spmT.ROI = roi_extract(spmT);
  53. %remove NaN voxels from data
  54. % for each participant
  55. for s=1:length(subs)
  56. % for each protocol
  57. for c=1:length(imgs{1,1})
  58. % for each ROI
  59. for n=1:length(con.ROIfiles)
  60. % find NaNs in the contrast
  61. x=isnan(con.ROI(n,s).rawdata(1,:));
  62. % get indices of these NaNs
  63. ind=find(x);
  64. % remove the NaNs from the data and the corresponding values
  65. % from the spmT data
  66. con.ROI(n,s).rawdata(:,ind)=[];
  67. spmT.ROI(n,s).rawdata(:,ind)=[];
  68. % remove the coordinates of the NaNs from the matrix of
  69. % coordinates, so that everything lines up
  70. con.ROI(n,s).XYZ(:,ind)=[];
  71. spmT.ROI(n,s).XYZ(:,ind)=[];
  72. % extract the mean and median for each ROI (for each contrast)
  73. con_collate_median{n}(s,:)=con.ROI(n,s).median';
  74. con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
  75. spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
  76. spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
  77. end
  78. end
  79. end
  80. % violin plot - con images
  81. roiname=[{'LvATL'},{'RITG'},{'LpMTG'},{'LIFGpt'}];
  82. cond={'SESB';'pTx'};
  83. figure;
  84. colours = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  85. % for every ROI
  86. for i=1:length(R.ROIfiles)
  87. % get data from that ROI and make it into a table
  88. tmp=con_collate_median{1,i};
  89. tmp=array2table(tmp,'VariableNames',cond);
  90. % make a violin plot
  91. subplot(2,2,i);
  92. v=violinplot(tmp);
  93. % set title and y-axis label
  94. title(roiname{1,i});
  95. ylabel('Contrast value','FontSize',20);
  96. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark pink, pTx = purple
  97. v(1,1).ViolinColor = colours(7,:);
  98. v(1,2).ViolinColor = colours(4,:);
  99. set(gca,'FontSize',16)
  100. end
  101. % make the plots a standard size
  102. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  103. % make the axes of all subplots match
  104. ax1 = subplot(2,2,1);
  105. ax2 = subplot(2,2,2);
  106. ax3 = subplot(2,2,3);
  107. ax4 = subplot(2,2,4);
  108. linkaxes([ax1,ax2,ax3,ax4],'y')
  109. % violin plots - spmT images
  110. figure;
  111. % for every ROI
  112. for i=1:length(R.ROIfiles)
  113. % get data from that ROI and make it into a table
  114. tmp=spmT_collate_median{1,i};
  115. tmp=array2table(tmp,'VariableNames',cond);
  116. % make a violin plot
  117. subplot(2,2,i);
  118. v=violinplot(tmp);
  119. % set title and y-axis label
  120. title(roiname{1,i});
  121. ylabel('spmT value','FontSize',20);
  122. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark pink, pTx = purple
  123. v(1,1).ViolinColor = colours(7,:);
  124. v(1,2).ViolinColor= colours(4,:);
  125. set(gca,'FontSize',16)
  126. end
  127. % make the plots a standard size
  128. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  129. % make the axes of all subplots match
  130. ax1 = subplot(2,2,1);
  131. ax2 = subplot(2,2,2);
  132. ax3 = subplot(2,2,3);
  133. ax4 = subplot(2,2,4);
  134. linkaxes([ax1,ax2,ax3,ax4],'y')
  135. % statistics - post-hoc t-tests
  136. for n=1:length(R.ROIfiles)
  137. % SESB > pTx
  138. % conduct paired t-test on con values
  139. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2)],[con_collate_median{1,n}(:,1)],'tail','left');
  140. % get p-values
  141. con_p_val(1,n)=tmp2;
  142. % also get t-values
  143. con_t_val(1,n)=tmp4.tstat;
  144. % repeat for spmT values
  145. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2)],[spmT_collate_median{1,n}(:,1)],'tail','left');
  146. spmT_p_val(1,n)=tmp2;
  147. spmT_t_val(1,n)=tmp4.tstat;
  148. % pTx > SESB
  149. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,1)],[con_collate_median{1,n}(:,2)],'tail','left');
  150. con_p_val(2,n)=tmp2;
  151. con_t_val(2,n)=tmp4.tstat;
  152. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,1)],[spmT_collate_median{1,n}(:,2)],'tail','left');
  153. spmT_p_val(2,n)=tmp2;
  154. spmT_t_val(2,n)=tmp4.tstat;
  155. end
  156. %% 2x2 Factorial design - echo and band
  157. clear con_collate_median con_collate_mean con_p_val con_t_val spmT_collate_median spmT_collate_mean spmT_p_val spmT_t_val
  158. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  159. % 1) and use only ROIs that overlap with this main effect (comment out
  160. % those that do not).
  161. R = struct();
  162. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  163. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  164. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  165. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  166. R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  167. R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  168. R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  169. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  170. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  171. % extract ROIs from con images (expressing model fit)
  172. imgs = cell(1,length(subs));
  173. con = struct();
  174. for s=1:length(subs)
  175. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/con_0003.nii'];
  176. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB/con_0003.nii'];
  177. imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/con_0003.nii'];
  178. imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/con_0003.nii'];
  179. end
  180. % extract data from each ROI
  181. con.Datafiles = imgs;
  182. con.output_raw = 1;
  183. con.ROIfiles=R.ROIfiles;
  184. con.ROI = roi_extract(con);
  185. % extract ROIs from spmT images (expressing model precision)
  186. imgs = cell(1,length(subs));
  187. spmT = struct();
  188. for s=1:length(subs)
  189. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/spmT_0003.nii'];
  190. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB/spmT_0003.nii'];
  191. imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/spmT_0003.nii'];
  192. imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/spmT_0003.nii'];
  193. end
  194. % extract data from each ROI
  195. spmT.Datafiles = imgs;
  196. spmT.output_raw = 1;
  197. spmT.ROIfiles=R.ROIfiles;
  198. spmT.ROI = roi_extract(spmT);
  199. %remove NaN voxels from data
  200. % for each participant
  201. for s=1:length(subs)
  202. % for each protocol
  203. for c=1:length(imgs{1,1})
  204. % for each ROI
  205. for n=1:length(con.ROIfiles)
  206. % find NaNs in the contrast
  207. x=isnan(con.ROI(n,s).rawdata(1,:));
  208. % get indices of these NaNs
  209. ind=find(x);
  210. % remove the NaNs from the data and the corresponding values
  211. % from the spmT data
  212. con.ROI(n,s).rawdata(:,ind)=[];
  213. spmT.ROI(n,s).rawdata(:,ind)=[];
  214. % remove the coordinates of the NaNs from the matrix of
  215. % coordinates, so that everything lines up
  216. con.ROI(n,s).XYZ(:,ind)=[];
  217. spmT.ROI(n,s).XYZ(:,ind)=[];
  218. % extract the mean and median for each ROI (for each contrast)
  219. con_collate_median{n}(s,:)=con.ROI(n,s).median';
  220. con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
  221. spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
  222. spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
  223. end
  224. end
  225. end
  226. % violin plot - con images
  227. roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
  228. cond={'SESB';'SEMB';'MESB';'MEMB'};
  229. figure;
  230. a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  231. for i=1:length(R.ROIfiles)
  232. % get data from that ROI and make it into a table
  233. tmp=con_collate_median{1,i};
  234. tmp=array2table(tmp,'VariableNames',cond);
  235. % make a violin plot
  236. subplot(2,4,i);
  237. v=violinplot(tmp);
  238. % set title and y-axis label
  239. title(roiname{1,i},'FontSize',20);
  240. ylabel('Contrast value','FontSize',16)
  241. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
  242. v(1,1).ViolinColor = a(7,:);
  243. v(1,2).ViolinColor = a(5,:);
  244. v(1,3).ViolinColor = a(2,:);
  245. v(1,4).ViolinColor = a(1,:);
  246. % set axis font size
  247. set(gca,'FontSize',16)
  248. end
  249. % make the plots a standard size
  250. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  251. % make the axes of all subplots match
  252. ax1 = subplot(2,4,1);
  253. ax2 = subplot(2,4,2);
  254. ax3 = subplot(2,4,3);
  255. ax4 = subplot(2,4,4);
  256. ax5 = subplot(2,4,5);
  257. ax6 = subplot(2,4,6);
  258. ax7 = subplot(2,4,7);
  259. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
  260. % violin plots - spmT images
  261. figure;
  262. for i=1:length(R.ROIfiles)
  263. % get data from that ROI and make it into a table
  264. tmp=spmT_collate_median{1,i};
  265. tmp=array2table(tmp,'VariableNames',cond);
  266. % make a violin plot
  267. subplot(2,4,i);
  268. v=violinplot(tmp);
  269. % set title and y-axis label
  270. title(roiname{1,i},'FontSize',20);
  271. ylabel('spmT value','FontSize',16)
  272. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
  273. v(1,1).ViolinColor = a(7,:);
  274. v(1,2).ViolinColor = a(5,:);
  275. v(1,3).ViolinColor = a(2,:);
  276. v(1,4).ViolinColor = a(1,:);
  277. % set axis font size
  278. set(gca,'FontSize',16)
  279. end
  280. % make the plots a standard size
  281. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  282. % make the axes of all subplots match
  283. ax1 = subplot(2,4,1);
  284. ax2 = subplot(2,4,2);
  285. ax3 = subplot(2,4,3);
  286. ax4 = subplot(2,4,4);
  287. ax5 = subplot(2,4,5);
  288. ax6 = subplot(2,4,6);
  289. ax7 = subplot(2,4,7);
  290. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
  291. % statistics - anova
  292. for i=1:length(con.ROIfiles)
  293. % get data from that ROI and make it into a table
  294. tmp=con_collate_median{1,i};
  295. tmp=array2table(tmp,'VariableNames',cond);
  296. % setup
  297. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo', 'Band'});
  298. % fit repeated measures model
  299. rm = fitrm(tmp, 'MEMB-SESB ~ 1', 'WithinDesign', w);
  300. % run anova
  301. anova_con{i}=ranova(rm, 'withinmodel', 'Echo*Band');
  302. % get p-values
  303. anova_con_p(:,i) = [anova_con{i}.pValue(1,1),anova_con{i}.pValue(3,1),anova_con{i}.pValue(5,1),anova_con{i}.pValue(7,1)];
  304. % get data from that ROI and make it into a table
  305. tmp=spmT_collate_median{1,i};
  306. tmp=array2table(tmp,'VariableNames',cond);
  307. % setup
  308. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo', 'Band'});
  309. % fit repeated measures model
  310. rm = fitrm(tmp, 'MEMB-SESB ~ 1', 'WithinDesign', w);
  311. % run anova
  312. anova_spmT{i}=ranova(rm, 'withinmodel', 'Echo*Band');
  313. % get p-values
  314. anova_spmT_p(:,i) = [anova_spmT{i}.pValue(1,1),anova_spmT{i}.pValue(3,1),anova_spmT{i}.pValue(5,1),anova_spmT{i}.pValue(7,1)];
  315. end
  316. % statistics - post-hoc t-tests
  317. for n=1:length(R.ROIfiles)
  318. % ME > SE
  319. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,2)],[con_collate_median{1,n}(:,3);con_collate_median{1,n}(:,4)],'tail','left');
  320. % get p-values
  321. con_p_val(1,n)=tmp2;
  322. % also get t-values
  323. con_t_val(1,n)=tmp4.tstat;
  324. % repeat for spmT values
  325. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,2)],[spmT_collate_median{1,n}(:,3);spmT_collate_median{1,n}(:,4)],'tail','left');
  326. spmT_p_val(1,n)=tmp2;
  327. spmT_t_val(1,n)=tmp4.tstat;
  328. % SE > ME
  329. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,3);con_collate_median{1,n}(:,4)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,2)],'tail','left');
  330. con_p_val(2,n)=tmp2;
  331. con_t_val(2,n)=tmp4.tstat;
  332. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,3);spmT_collate_median{1,n}(:,4)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,2)],'tail','left');
  333. spmT_p_val(2,n)=tmp2;
  334. spmT_t_val(2,n)=tmp4.tstat;
  335. % MB > SB
  336. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,3)],[con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,4)],'tail','left');
  337. con_p_val(3,n)=tmp2;
  338. con_t_val(3,n)=tmp4.tstat;
  339. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,3)],[spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,4)],'tail','left');
  340. spmT_p_val(3,n)=tmp2;
  341. spmT_t_val(3,n)=tmp4.tstat;
  342. % SB > MB
  343. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,4)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,3)],'tail','left');
  344. con_p_val(4,n)=tmp2;
  345. con_t_val(4,n)=tmp4.tstat;
  346. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,4)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,3)],'tail','left');
  347. spmT_p_val(4,n)=tmp2;
  348. spmT_t_val(4,n)=tmp4.tstat;
  349. % Interaction
  350. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,3)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,4)],'tail','left');
  351. con_p_val(5,n)=tmp2;
  352. con_t_val(5,n)=tmp4.tstat;
  353. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,3)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,4)],'tail','left');
  354. spmT_p_val(5,n)=tmp2;
  355. spmT_t_val(5,n)=tmp4.tstat;
  356. end
  357. %% Effect of denoising
  358. clear con_collate_median con_collate_mean con_p_val con_t_val spmT_collate_median spmT_collate_mean spmT_p_val spmT_t_val
  359. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  360. % 1) and use only ROIs that overlap with this main effect (comment out
  361. % those that do not).
  362. R = struct();
  363. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  364. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  365. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  366. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  367. R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  368. R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  369. R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  370. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  371. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  372. % extract ROIs from con images (expressing model fit)
  373. imgs = cell(1,length(subs));
  374. con = struct();
  375. for s=1:length(subs)
  376. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/con_0003.nii'];
  377. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB_dn/con_0003.nii'];
  378. imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/con_0003.nii'];
  379. imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_dn/con_0003.nii'];
  380. end
  381. % extract data from each ROI
  382. con.Datafiles = imgs;
  383. con.output_raw = 1;
  384. con.ROIfiles=R.ROIfiles;
  385. con.ROI = roi_extract(con);
  386. % extract ROIs from spmT images (expressing model precision)
  387. imgs = cell(1,length(subs));
  388. spmT = struct();
  389. for s=1:length(subs)
  390. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/spmT_0003.nii'];
  391. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB_dn/spmT_0003.nii'];
  392. imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/spmT_0003.nii'];
  393. imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_dn/spmT_0003.nii'];
  394. end
  395. % extract data from each ROI
  396. spmT.Datafiles = imgs;
  397. spmT.output_raw = 1;
  398. spmT.ROIfiles=R.ROIfiles;
  399. spmT.ROI = roi_extract(spmT);
  400. %remove NaN voxels from data
  401. % for each participant
  402. for s=1:length(subs)
  403. % for each protocol
  404. for c=1:length(imgs{1,1})
  405. % for each ROI
  406. for n=1:length(con.ROIfiles)
  407. % find NaNs in the contrast
  408. x=isnan(con.ROI(n,s).rawdata(1,:));
  409. % get indices of these NaNs
  410. ind=find(x);
  411. % remove the NaNs from the data and the corresponding values
  412. % from the spmT data
  413. con.ROI(n,s).rawdata(:,ind)=[];
  414. spmT.ROI(n,s).rawdata(:,ind)=[];
  415. % remove the coordinates of the NaNs from the matrix of
  416. % coordinates, so that everything lines up
  417. con.ROI(n,s).XYZ(:,ind)=[];
  418. spmT.ROI(n,s).XYZ(:,ind)=[];
  419. % extract the mean and median for each ROI (for each contrast)
  420. con_collate_median{n}(s,:)=con.ROI(n,s).median';
  421. con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
  422. spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
  423. spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
  424. end
  425. end
  426. end
  427. % violin plot - con images
  428. roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
  429. cond={'MESB';'MESBdn';'MEMB';'MEMBdn'};
  430. figure;
  431. a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  432. for i=1:length(R.ROIfiles)
  433. % get data from that ROI and make it into a table
  434. tmp=con_collate_median{1,i};
  435. tmp=array2table(tmp,'VariableNames',cond);
  436. % make a violin plot
  437. subplot(2,4,i);
  438. v=violinplot(tmp);
  439. % set title and y-axis label
  440. title(roiname{1,i},'FontSize',20);
  441. ylabel('Contrast value','FontSize',16)
  442. % Set violin colours, which should be consistent across all plots in
  443. % the paper. MESB = orange; MESBdn = yellow; MEMB = dark blue; MEMBdn =
  444. % pale blue
  445. v(1,1).ViolinColor = a(2,:);
  446. v(1,2).ViolinColor = a(3,:);
  447. v(1,3).ViolinColor = a(1,:);
  448. v(1,4).ViolinColor = a(6,:);
  449. % set axis font size
  450. set(gca,'FontSize',16)
  451. end
  452. % make the plots a standard size
  453. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  454. % make the axes of all subplots match
  455. ax1 = subplot(2,4,1);
  456. ax2 = subplot(2,4,2);
  457. ax3 = subplot(2,4,3);
  458. ax4 = subplot(2,4,4);
  459. ax5 = subplot(2,4,5);
  460. ax6 = subplot(2,4,6);
  461. ax7 = subplot(2,4,7);
  462. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
  463. % violin plots - spmT images
  464. figure;
  465. for i=1:length(R.ROIfiles)
  466. % get data from that ROI and make it into a table
  467. tmp=spmT_collate_median{1,i};
  468. tmp=array2table(tmp,'VariableNames',cond);
  469. % make a violin plot
  470. subplot(2,4,i);
  471. v=violinplot(tmp);
  472. % set title and y-axis label
  473. title(roiname{1,i},'FontSize',20);
  474. ylabel('spmT value','FontSize',16)
  475. % Set violin colours, which should be consistent across all plots in the paper. MESB = orange; MESBdn = yellow; MEMB = dark blue; MEMBdn =
  476. % pale blue
  477. v(1,1).ViolinColor = a(2,:);
  478. v(1,2).ViolinColor = a(3,:);
  479. v(1,3).ViolinColor = a(1,:);
  480. v(1,4).ViolinColor = a(6,:);
  481. % set axis font size
  482. set(gca,'FontSize',16)
  483. end
  484. % make the plots a standard size
  485. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  486. % make the axes of all subplots match
  487. ax1 = subplot(2,4,1);
  488. ax2 = subplot(2,4,2);
  489. ax3 = subplot(2,4,3);
  490. ax4 = subplot(2,4,4);
  491. ax5 = subplot(2,4,5);
  492. ax6 = subplot(2,4,6);
  493. ax7 = subplot(2,4,7);
  494. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
  495. % statistics - anova
  496. for i=1:length(con.ROIfiles)
  497. % get data from that ROI and make it into a table
  498. tmp=con_collate_median{1,i};
  499. tmp=array2table(tmp,'VariableNames',cond);
  500. % setup
  501. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Band','denoisedEcho'});
  502. % fit repeated measures model
  503. rm = fitrm(tmp, 'MEMBdn-MESB ~ 1', 'WithinDesign', w);
  504. % run anova
  505. anova_con{i}=ranova(rm, 'withinmodel', 'Band*denoisedEcho');
  506. % get p-values
  507. anova_con_p(:,i) = [anova_con{i}.pValue(1,1),anova_con{i}.pValue(3,1),anova_con{i}.pValue(5,1),anova_con{i}.pValue(7,1)];
  508. % get data from that ROI and make it into a table
  509. tmp=spmT_collate_median{1,i};
  510. tmp=array2table(tmp,'VariableNames',cond);
  511. % setup
  512. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Band','denoisedEcho'});
  513. % fit repeated measures model
  514. rm = fitrm(tmp, 'MEMBdn-MESB ~ 1', 'WithinDesign', w);
  515. % run anova
  516. anova_spmT{i}=ranova(rm, 'withinmodel', 'Band*denoisedEcho');
  517. % get p-values
  518. anova_spmT_p(:,i) = [anova_spmT{i}.pValue(1,1),anova_spmT{i}.pValue(3,1),anova_spmT{i}.pValue(5,1),anova_spmT{i}.pValue(7,1)];
  519. end
  520. % statistics - post-hoc t-tests
  521. for n=1:length(R.ROIfiles)
  522. % standard > denoised
  523. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,4)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,3)],'tail','left');
  524. con_p_val(1,n)=tmp2;
  525. con_t_val(1,n)=tmp4.tstat;
  526. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,4)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,3)],'tail','left');
  527. spmT_p_val(1,n)=tmp2;
  528. spmT_t_val(1,n)=tmp4.tstat;
  529. % denoised > standard
  530. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,3)],[con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,4)],'tail','left');
  531. con_p_val(2,n)=tmp2;
  532. con_t_val(2,n)=tmp4.tstat;
  533. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,3)],[spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,4)],'tail','left');
  534. spmT_p_val(2,n)=tmp2;
  535. spmT_t_val(2,n)=tmp4.tstat;
  536. % Interaction
  537. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,3)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,4)],'tail','left');
  538. con_p_val(3,n)=tmp2;
  539. con_t_val(3,n)=tmp4.tstat;
  540. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,3)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,4)],'tail','left');
  541. spmT_p_val(3,n)=tmp2;
  542. spmT_t_val(3,n)=tmp4.tstat;
  543. end
  544. %% Odd volumes
  545. clear con_collate_median con_collate_mean con_p_val con_t_val spmT_collate_median spmT_collate_mean spmT_p_val spmT_t_val
  546. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  547. % 1) and use only ROIs that overlap with this main effect (comment out
  548. % those that do not).
  549. R = struct();
  550. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  551. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  552. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  553. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  554. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  555. R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  556. R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  557. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  558. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  559. % extract ROIs from con images (expressing model fit)
  560. imgs = cell(1,length(subs));
  561. con = struct();
  562. for s=1:length(subs)
  563. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/con_0003.nii'];
  564. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB_odd/con_0003.nii'];
  565. imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/con_0003.nii'];
  566. imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_odd/con_0003.nii'];
  567. end
  568. % extract data from each ROI
  569. con.Datafiles = imgs;
  570. con.output_raw = 1;
  571. con.ROIfiles=R.ROIfiles;
  572. con.ROI = roi_extract(con);
  573. % extract ROIs from spmT images (expressing model precision)
  574. imgs = cell(1,length(subs));
  575. spmT = struct();
  576. for s=1:length(subs)
  577. imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/spmT_0003.nii'];
  578. imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB_odd/spmT_0003.nii'];
  579. imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/spmT_0003.nii'];
  580. imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_odd/spmT_0003.nii'];
  581. end
  582. % extract data from each ROI
  583. spmT.Datafiles = imgs;
  584. spmT.output_raw = 1;
  585. spmT.ROIfiles=R.ROIfiles;
  586. spmT.ROI = roi_extract(spmT);
  587. %remove NaN voxels from data
  588. % for each participant
  589. for s=1:length(subs)
  590. % for each protocol
  591. for c=1:length(imgs{1,1})
  592. % for each ROI
  593. for n=1:length(con.ROIfiles)
  594. % find NaNs in the contrast
  595. x=isnan(con.ROI(n,s).rawdata(1,:));
  596. % get indices of these NaNs
  597. ind=find(x);
  598. % remove the NaNs from the data and the corresponding values
  599. % from the spmT data
  600. con.ROI(n,s).rawdata(:,ind)=[];
  601. spmT.ROI(n,s).rawdata(:,ind)=[];
  602. % remove the coordinates of the NaNs from the matrix of
  603. % coordinates, so that everything lines up
  604. con.ROI(n,s).XYZ(:,ind)=[];
  605. spmT.ROI(n,s).XYZ(:,ind)=[];
  606. % extract the mean and median for each ROI (for each contrast)
  607. con_collate_median{n}(s,:)=con.ROI(n,s).median';
  608. con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
  609. spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
  610. spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
  611. end
  612. end
  613. end
  614. % violin plot - con images
  615. roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
  616. cond={'SESB';'SEMBodd';'MESB';'MEMBodd'};
  617. figure;
  618. a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  619. for i=1:length(R.ROIfiles)
  620. % get data from that ROI and make it into a table
  621. tmp=con_collate_median{1,i};
  622. tmp=array2table(tmp,'VariableNames',cond);
  623. % make a violin plot
  624. subplot(2,3,i);
  625. v=violinplot(tmp);
  626. % set title and y-axis label
  627. title(roiname{1,i},'FontSize',20);
  628. ylabel('Contrast value','FontSize',16)
  629. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
  630. v(1,1).ViolinColor = a(7,:);
  631. v(1,2).ViolinColor = a(5,:);
  632. v(1,3).ViolinColor = a(2,:);
  633. v(1,4).ViolinColor = a(1,:);
  634. % set axis font size
  635. set(gca,'FontSize',16)
  636. end
  637. % make the plots a standard size
  638. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  639. % make the axes of all subplots match
  640. ax1 = subplot(2,3,1);
  641. ax2 = subplot(2,3,2);
  642. ax3 = subplot(2,3,3);
  643. ax4 = subplot(2,3,4);
  644. ax5 = subplot(2,3,5);
  645. ax6 = subplot(2,3,6);
  646. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'y')
  647. % violin plots - spmT images
  648. figure;
  649. for i=1:length(R.ROIfiles)
  650. % get data from that ROI and make it into a table
  651. tmp=spmT_collate_median{1,i};
  652. tmp=array2table(tmp,'VariableNames',cond);
  653. % make a violin plot
  654. subplot(2,3,i);
  655. v=violinplot(tmp);
  656. % set title and y-axis label
  657. title(roiname{1,i},'FontSize',20);
  658. ylabel('spmT value','FontSize',16)
  659. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
  660. v(1,1).ViolinColor = a(7,:);
  661. v(1,2).ViolinColor = a(5,:);
  662. v(1,3).ViolinColor = a(2,:);
  663. v(1,4).ViolinColor = a(1,:);
  664. % set axis font size
  665. set(gca,'FontSize',16)
  666. end
  667. % make the plots a standard size
  668. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  669. % make the axes of all subplots match
  670. ax1 = subplot(2,3,1);
  671. ax2 = subplot(2,3,2);
  672. ax3 = subplot(2,3,3);
  673. ax4 = subplot(2,3,4);
  674. ax5 = subplot(2,3,5);
  675. ax6 = subplot(2,3,6);
  676. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'y')
  677. % statistics - anova
  678. for i=1:length(con.ROIfiles)
  679. % get data from that ROI and make it into a table
  680. tmp=con_collate_median{1,i};
  681. tmp=array2table(tmp,'VariableNames',cond);
  682. % setup
  683. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo','oddBand'});
  684. % fit repeated measures model
  685. rm = fitrm(tmp, 'MEMBodd-SESB ~ 1', 'WithinDesign', w);
  686. % run anova
  687. anova_con{i}=ranova(rm, 'withinmodel', 'Echo*oddBand');
  688. % get p-values
  689. anova_con_p(:,i) = [anova_con{i}.pValue(1,1),anova_con{i}.pValue(3,1),anova_con{i}.pValue(5,1),anova_con{i}.pValue(7,1)];
  690. % get data from that ROI and make it into a table
  691. tmp=spmT_collate_median{1,i};
  692. tmp=array2table(tmp,'VariableNames',cond);
  693. % setup
  694. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo','oddBand'});
  695. % fit repeated measures model
  696. rm = fitrm(tmp, 'MEMBodd-SESB ~ 1', 'WithinDesign', w);
  697. % run anova
  698. anova_spmT{i}=ranova(rm, 'withinmodel', 'Echo*oddBand');
  699. % get p-values
  700. anova_spmT_p(:,i) = [anova_spmT{i}.pValue(1,1),anova_spmT{i}.pValue(3,1),anova_spmT{i}.pValue(5,1),anova_spmT{i}.pValue(7,1)];
  701. end
  702. % statistics - post-hoc t-tests
  703. for n=1:length(R.ROIfiles)
  704. % SB > MBodd
  705. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,4)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,3)],'tail','left');
  706. con_p_val(1,n)=tmp2;
  707. con_t_val(1,n)=tmp4.tstat;
  708. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,4)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,3)],'tail','left');
  709. spmT_p_val(1,n)=tmp2;
  710. spmT_t_val(1,n)=tmp4.tstat;
  711. % MBodd > SB
  712. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,3)],[con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,4)],'tail','left');
  713. con_p_val(2,n)=tmp2;
  714. con_t_val(2,n)=tmp4.tstat;
  715. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,3)],[spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,4)],'tail','left');
  716. spmT_p_val(2,n)=tmp2;
  717. spmT_t_val(2,n)=tmp4.tstat;
  718. % Interaction
  719. [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2);con_collate_median{1,n}(:,3)],[con_collate_median{1,n}(:,1);con_collate_median{1,n}(:,4)],'tail','left');
  720. con_p_val(3,n)=tmp2;
  721. con_t_val(3,n)=tmp4.tstat;
  722. [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2);spmT_collate_median{1,n}(:,3)],[spmT_collate_median{1,n}(:,1);spmT_collate_median{1,n}(:,4)],'tail','left');
  723. spmT_p_val(3,n)=tmp2;
  724. spmT_t_val(3,n)=tmp4.tstat;
  725. end
  726. %% Exploratory MVPA
  727. % Comparing pTx to SESB
  728. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  729. % 1) and use only ROIs that overlap with this main effect (comment out
  730. % those that do not).
  731. R = struct();
  732. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  733. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  734. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  735. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  736. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  737. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  738. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  739. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  740. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  741. % extract ROIs from beta images
  742. cond={'SESB';'ptx8ms'};
  743. imgs = cell(1,length(subs));
  744. con_mvpa = struct();
  745. % for each protocol
  746. for c = 1:length(cond)
  747. % for each participant
  748. for s = 1:length(subs)
  749. % setup beta image structure
  750. imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
  751. imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
  752. imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
  753. imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
  754. imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
  755. imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
  756. imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
  757. imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
  758. imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
  759. imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
  760. imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
  761. imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
  762. imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
  763. imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
  764. imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
  765. imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
  766. imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
  767. imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
  768. imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
  769. imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
  770. imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
  771. imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
  772. imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
  773. imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
  774. end
  775. % extract data from each ROI and store in one big struct
  776. field = cond{c};
  777. con_mvpa.(field).Datafiles = imgs;
  778. con_mvpa.(field).output_raw = 1;
  779. con_mvpa.(field).ROIfiles = R.ROIfiles;
  780. con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
  781. end
  782. % remove NaN voxels from data
  783. % for each participant
  784. for s=1:length(subs)
  785. % for each protocol
  786. for c=1:length(cond)
  787. % for each ROI
  788. for n=1:length(R.ROIfiles)
  789. field = cond{c};
  790. % find NaNs in the beta images
  791. x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
  792. % get indices of these NaNs
  793. ind=find(x);
  794. % remove the NaNs from the data
  795. con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
  796. % remove the coordinates of the NaNs from the matrix of
  797. % coordinates, so that everything lines up
  798. con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
  799. end
  800. end
  801. end
  802. % for each participant
  803. for s=1:length(subs)
  804. % for each protocol
  805. for c=1:length(cond)
  806. % for each ROI
  807. for n=1:length(R.ROIfiles)
  808. field = cond{c};
  809. % extract data (this matrix is beta images x nonzero voxels)
  810. x=con_mvpa.(field).ROI(n,s).rawdata;
  811. % Each block (12 semantic and 12 control) is one row of x.
  812. % Calculate cosine distance between each pair of blocks (This
  813. % is stored as the upper triangle of the similarity matrix).
  814. con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
  815. % convert zeros in the matrix to NaNs
  816. con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
  817. % calculate the mean dissimilarity between pairs of blocks in
  818. % the same condition (i.e. mean dissimilarity between pairs of
  819. % semantic blocks or pairs of control blocks)
  820. con_mvpa.(field).ROI(n,s).mvpa_within_mean=nanmean([reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[1:12]),[],1);reshape(con_mvpa.(field).ROI(n,s).dissimilarity([13:24],[13:24]),[],1)]);
  821. % calculate the mean dissimilarity between pairs of blocks in
  822. % different conditions (i.e. mean dissimilarity between one
  823. % semantic block and one control block)
  824. con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
  825. % calculate the difference in means
  826. con_mvpa.(field).ROI(n,s).mvpa_comparison_mean=[con_mvpa.(field).ROI(n,s).mvpa_between_mean-con_mvpa.(field).ROI(n,s).mvpa_within_mean];
  827. % collate results
  828. con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
  829. end
  830. end
  831. end
  832. % violin plot - beta images
  833. roiname=[{'LvATL'},{'RITG'},{'LpMTG'},{'LIFGpt'}];
  834. cond={'SESB';'pTx'};
  835. figure;
  836. colours = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  837. % for every ROI
  838. for i=1:length(R.ROIfiles)
  839. % get data from that ROI and make it into a table
  840. tmp=con_mvpa_collate_mean{1,i};
  841. tmp=array2table(tmp,'VariableNames',cond);
  842. % make a violin plot
  843. subplot(2,2,i);
  844. v=violinplot(tmp);
  845. % set title and y-axis label
  846. title(roiname{1,i});
  847. ylabel('Difference in cosine distance','FontSize',20);
  848. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark pink, pTx = purple
  849. v(1,1).ViolinColor = colours(7,:);
  850. v(1,2).ViolinColor= colours(4,:);
  851. set(gca,'FontSize',16)
  852. end
  853. % make the plots a standard size
  854. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  855. % make the axes of all subplots match
  856. ax1 = subplot(2,2,1);
  857. ax2 = subplot(2,2,2);
  858. ax3 = subplot(2,2,3);
  859. ax4 = subplot(2,2,4);
  860. linkaxes([ax1,ax2,ax3,ax4],'y')
  861. % statistics - post-hoc t-tests
  862. for n=1:length(R.ROIfiles)
  863. % SESB > pTx
  864. % conduct paired t-test on con values
  865. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2)],[con_mvpa_collate_mean{1,n}(:,1)],'tail','left');
  866. % get p-values
  867. con_mvpa_p_val(1,n)=tmp2;
  868. % also get t-values
  869. con_mvpa_t_val(1,n)=tmp4.tstat;
  870. % pTx > SESB
  871. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,1)],[con_mvpa_collate_mean{1,n}(:,2)],'tail','left');
  872. con_mvpa_p_val(2,n)=tmp2;
  873. con_mvpa_t_val(2,n)=tmp4.tstat;
  874. end
  875. % 2x2 factorial design - echo and band
  876. clear con_mvpa con_mvpa_collate_mean con_mvpa_p_val con_mvpa_t_val
  877. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  878. % 1) and use only ROIs that overlap with this main effect (comment out
  879. % those that do not).
  880. R = struct();
  881. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  882. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  883. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  884. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  885. R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  886. R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  887. R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  888. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  889. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  890. % extract ROIs from beta images
  891. cond={'SESB';'SEMB';'MESB';'MEMB'};
  892. imgs = cell(1,length(subs));
  893. con_mvpa = struct();
  894. % for each protocol
  895. for c = 1:length(cond)
  896. % for each participant
  897. for s = 1:length(subs)
  898. % setup beta image structure
  899. imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
  900. imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
  901. imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
  902. imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
  903. imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
  904. imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
  905. imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
  906. imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
  907. imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
  908. imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
  909. imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
  910. imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
  911. imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
  912. imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
  913. imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
  914. imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
  915. imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
  916. imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
  917. imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
  918. imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
  919. imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
  920. imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
  921. imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
  922. imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
  923. end
  924. % extract data from each ROI and store in one big struct
  925. field = cond{c};
  926. con_mvpa.(field).Datafiles = imgs;
  927. con_mvpa.(field).output_raw = 1;
  928. con_mvpa.(field).ROIfiles = R.ROIfiles;
  929. con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
  930. end
  931. % remove NaN voxels from data
  932. % for each participant
  933. for s=1:length(subs)
  934. % for each protocol
  935. for c=1:length(cond)
  936. % for each ROI
  937. for n=1:length(R.ROIfiles)
  938. field = cond{c};
  939. % find NaNs in the beta images
  940. x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
  941. % get indices of these NaNs
  942. ind=find(x);
  943. % remove the NaNs from the data
  944. con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
  945. % remove the coordinates of the NaNs from the matrix of
  946. % coordinates, so that everything lines up
  947. con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
  948. end
  949. end
  950. end
  951. % for each participant
  952. for s=1:length(subs)
  953. % for each protocol
  954. for c=1:length(cond)
  955. % for each ROI
  956. for n=1:length(R.ROIfiles)
  957. field = cond{c};
  958. % extract data (this matrix is beta images x nonzero voxels)
  959. x=con_mvpa.(field).ROI(n,s).rawdata;
  960. % Each block (12 semantic and 12 control) is one row of x.
  961. % Calculate cosine distance between each pair of blocks (This
  962. % is stored as the upper triangle of the similarity matrix).
  963. con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
  964. % convert zeros in the matrix to NaNs
  965. con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
  966. % calculate the mean dissimilarity between pairs of blocks in
  967. % the same condition (i.e. mean dissimilarity between pairs of
  968. % semantic blocks or pairs of control blocks)
  969. con_mvpa.(field).ROI(n,s).mvpa_within_mean=nanmean([reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[1:12]),[],1);reshape(con_mvpa.(field).ROI(n,s).dissimilarity([13:24],[13:24]),[],1)]);
  970. % calculate the mean dissimilarity between pairs of blocks in
  971. % different conditions (i.e. mean dissimilarity between one
  972. % semantic block and one control block)
  973. con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
  974. % calculate the difference in means
  975. con_mvpa.(field).ROI(n,s).mvpa_comparison_mean=[con_mvpa.(field).ROI(n,s).mvpa_between_mean-con_mvpa.(field).ROI(n,s).mvpa_within_mean];
  976. % collate results
  977. con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
  978. end
  979. end
  980. end
  981. % violin plot - beta images
  982. roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
  983. cond={'SESB';'SEMB';'MESB';'MEMB'};
  984. figure;
  985. a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  986. for i=1:length(R.ROIfiles)
  987. % get data from that ROI and make it into a table
  988. tmp=con_mvpa_collate_mean{1,i};
  989. tmp=array2table(tmp,'VariableNames',cond);
  990. % make a violin plot
  991. subplot(2,4,i);
  992. v=violinplot(tmp);
  993. % set title and y-axis label
  994. title(roiname{1,i},'FontSize',20);
  995. ylabel('Difference in cosine distance','FontSize',16)
  996. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
  997. v(1,1).ViolinColor = a(7,:);
  998. v(1,2).ViolinColor = a(5,:);
  999. v(1,3).ViolinColor = a(2,:);
  1000. v(1,4).ViolinColor = a(1,:);
  1001. % set axis font size
  1002. set(gca,'FontSize',16)
  1003. end
  1004. % make the plots a standard size
  1005. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  1006. % make the axes of all subplots match
  1007. ax1 = subplot(2,4,1);
  1008. ax2 = subplot(2,4,2);
  1009. ax3 = subplot(2,4,3);
  1010. ax4 = subplot(2,4,4);
  1011. ax5 = subplot(2,4,5);
  1012. ax6 = subplot(2,4,6);
  1013. ax7 = subplot(2,4,7);
  1014. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
  1015. % statistics - anova
  1016. for i=1:7
  1017. % get data from that ROI and make it into a table
  1018. tmp=con_mvpa_collate_mean{1,i};
  1019. tmp=array2table(tmp,'VariableNames',cond);
  1020. % setup
  1021. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo', 'Band'});
  1022. % fit repeated measures model
  1023. rm = fitrm(tmp, 'MEMB-SESB ~ 1', 'WithinDesign', w);
  1024. % run anova
  1025. anova_mvpa{i}=ranova(rm, 'withinmodel', 'Echo*Band');
  1026. % get p-values
  1027. anova_mvpa_p(:,i) = [anova_mvpa{i}.pValue(1,1),anova_mvpa{i}.pValue(3,1),anova_mvpa{i}.pValue(5,1),anova_mvpa{i}.pValue(7,1)];
  1028. end
  1029. % statistics - post-hoc t-tests
  1030. for n=1:length(R.ROIfiles)
  1031. % ME > SE
  1032. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,2)],[con_mvpa_collate_mean{1,n}(:,3);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1033. % get p-values
  1034. con_mvpa_p_val(1,n)=tmp2;
  1035. % also get t-values
  1036. con_mvpa_t_val(1,n)=tmp4.tstat;
  1037. % SE > ME
  1038. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,3);con_mvpa_collate_mean{1,n}(:,4)],[con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,2)],'tail','left');
  1039. con_mvpa_p_val(2,n)=tmp2;
  1040. con_mvpa_t_val(2,n)=tmp4.tstat;
  1041. % MB > SB
  1042. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,3)],[con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1043. con_mvpa_p_val(3,n)=tmp2;
  1044. con_mvpa_t_val(3,n)=tmp4.tstat;
  1045. % SB > MB
  1046. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,4)],[con_mvpa_collate_mean{1,n}(:,3);con_mvpa_collate_mean{1,n}(:,1)],'tail','left');
  1047. con_mvpa_p_val(4,n)=tmp2;
  1048. con_mvpa_t_val(4,n)=tmp4.tstat;
  1049. % Interaction
  1050. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,3)],[con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1051. con_mvpa_p_val(5,n)=tmp2;
  1052. con_mvpa_t_val(5,n)=tmp4.tstat;
  1053. end
  1054. % Effect of denoising
  1055. clear con_mvpa con_mvpa_collate_mean con_mvpa_p_val con_mvpa_t_val
  1056. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  1057. % 1) and use only ROIs that overlap with this main effect (comment out
  1058. % those that do not).
  1059. R = struct();
  1060. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  1061. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  1062. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  1063. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  1064. R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  1065. R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  1066. R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  1067. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  1068. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  1069. % extract ROIs from beta images
  1070. cond={'MESB';'MESB_dn';'MEMB';'MEMB_dn'};
  1071. imgs = cell(1,length(subs));
  1072. con_mvpa = struct();
  1073. % for each protocol
  1074. for c = 1:length(cond)
  1075. % for each participant
  1076. for s = 1:length(subs)
  1077. % setup beta image structure
  1078. imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
  1079. imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
  1080. imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
  1081. imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
  1082. imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
  1083. imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
  1084. imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
  1085. imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
  1086. imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
  1087. imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
  1088. imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
  1089. imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
  1090. imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
  1091. imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
  1092. imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
  1093. imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
  1094. imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
  1095. imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
  1096. imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
  1097. imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
  1098. imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
  1099. imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
  1100. imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
  1101. imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
  1102. end
  1103. % extract data from each ROI and store in one big struct
  1104. field = cond{c};
  1105. con_mvpa.(field).Datafiles = imgs;
  1106. con_mvpa.(field).output_raw = 1;
  1107. con_mvpa.(field).ROIfiles = R.ROIfiles;
  1108. con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
  1109. end
  1110. % remove NaN voxels from data
  1111. % for each participant
  1112. for s=1:length(subs)
  1113. % for each protocol
  1114. for c=1:length(cond)
  1115. % for each ROI
  1116. for n=1:length(R.ROIfiles)
  1117. field = cond{c};
  1118. % find NaNs in the beta images
  1119. x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
  1120. % get indices of these NaNs
  1121. ind=find(x);
  1122. % remove the NaNs from the data
  1123. con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
  1124. % remove the coordinates of the NaNs from the matrix of
  1125. % coordinates, so that everything lines up
  1126. con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
  1127. end
  1128. end
  1129. end
  1130. % for each participant
  1131. for s=1:length(subs)
  1132. % for each protocol
  1133. for c=1:length(cond)
  1134. % for each ROI
  1135. for n=1:length(R.ROIfiles)
  1136. field = cond{c};
  1137. % extract data (this matrix is beta images x nonzero voxels)
  1138. x=con_mvpa.(field).ROI(n,s).rawdata;
  1139. % Each block (12 semantic and 12 control) is one row of x.
  1140. % Calculate cosine distance between each pair of blocks (This
  1141. % is stored as the upper triangle of the similarity matrix).
  1142. con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
  1143. % convert zeros in the matrix to NaNs
  1144. con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
  1145. % calculate the mean dissimilarity between pairs of blocks in
  1146. % the same condition (i.e. mean dissimilarity between pairs of
  1147. % semantic blocks or pairs of control blocks)
  1148. con_mvpa.(field).ROI(n,s).mvpa_within_mean=nanmean([reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[1:12]),[],1);reshape(con_mvpa.(field).ROI(n,s).dissimilarity([13:24],[13:24]),[],1)]);
  1149. % calculate the mean dissimilarity between pairs of blocks in
  1150. % different conditions (i.e. mean dissimilarity between one
  1151. % semantic block and one control block)
  1152. con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
  1153. % calculate the difference in means
  1154. con_mvpa.(field).ROI(n,s).mvpa_comparison_mean=[con_mvpa.(field).ROI(n,s).mvpa_between_mean-con_mvpa.(field).ROI(n,s).mvpa_within_mean];
  1155. % collate results
  1156. con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
  1157. end
  1158. end
  1159. end
  1160. % violin plots - beta images
  1161. roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
  1162. cond={'MESB';'MESBdn';'MEMB';'MEMBdn'};
  1163. figure;
  1164. a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  1165. for i=1:length(R.ROIfiles)
  1166. % get data from that ROI and make it into a table
  1167. tmp=con_mvpa_collate_mean{1,i};
  1168. tmp=array2table(tmp,'VariableNames',cond);
  1169. % make a violin plot
  1170. subplot(2,4,i);
  1171. v=violinplot(tmp);
  1172. % set title and y-axis label
  1173. title(roiname{1,i},'FontSize',20);
  1174. ylabel('Difference in cosine distance','FontSize',16)
  1175. % Set violin colours, which should be consistent across all plots in
  1176. % the paper. MESB = orange; MESBdn = yellow; MEMB = dark blue; MEMBdn =
  1177. % pale blue
  1178. v(1,1).ViolinColor = a(2,:);
  1179. v(1,2).ViolinColor = a(3,:);
  1180. v(1,3).ViolinColor = a(1,:);
  1181. v(1,4).ViolinColor = a(6,:);
  1182. % set axis font size
  1183. set(gca,'FontSize',16)
  1184. end
  1185. % make the plots a standard size
  1186. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  1187. % make the axes of all subplots match
  1188. ax1 = subplot(2,4,1);
  1189. ax2 = subplot(2,4,2);
  1190. ax3 = subplot(2,4,3);
  1191. ax4 = subplot(2,4,4);
  1192. ax5 = subplot(2,4,5);
  1193. ax6 = subplot(2,4,6);
  1194. ax7 = subplot(2,4,7);
  1195. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
  1196. % statistics - anova
  1197. for i=1:7
  1198. % get data from that ROI and make it into a table
  1199. tmp=con_mvpa_collate_mean{1,i};
  1200. tmp=array2table(tmp,'VariableNames',cond);
  1201. % setup
  1202. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Band','denoisedEcho'});
  1203. % fit repeated measures model
  1204. rm = fitrm(tmp, 'MEMBdn-MESB ~ 1', 'WithinDesign', w);
  1205. % run anova
  1206. anova_mvpa{i}=ranova(rm, 'withinmodel', 'Band*denoisedEcho');
  1207. % get p-values
  1208. anova_mvpa_p(:,i) = [anova_mvpa{i}.pValue(1,1),anova_mvpa{i}.pValue(3,1),anova_mvpa{i}.pValue(5,1),anova_mvpa{i}.pValue(7,1)];
  1209. end
  1210. % statistics - post-hoc t-tests
  1211. for n=1:length(R.ROIfiles)
  1212. % standard > denoised
  1213. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,4)],[con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,3)],'tail','left');
  1214. con_mvpa_p_val(1,n)=tmp2;
  1215. con_mvpa_t_val(1,n)=tmp4.tstat;
  1216. % denoised > standard
  1217. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,3)],[con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1218. con_mvpa_p_val(2,n)=tmp2;
  1219. con_mvpa_t_val(2,n)=tmp4.tstat;
  1220. % Interaction
  1221. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,3)],[con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1222. con_mvpa_p_val(3,n)=tmp2;
  1223. con_mvpa_t_val(3,n)=tmp4.tstat;
  1224. end
  1225. % Odd volumes
  1226. clear con_mvpa con_mvpa_collate_mean con_mvpa_p_val con_mvpa_t_val
  1227. % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
  1228. % 1) and use only ROIs that overlap with this main effect (comment out
  1229. % those that do not).
  1230. R = struct();
  1231. R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
  1232. R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
  1233. R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
  1234. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
  1235. R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
  1236. R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
  1237. R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
  1238. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
  1239. % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
  1240. % extract ROIs from beta images
  1241. cond={'SESB';'SEMB_odd';'MESB';'MEMB_odd'};
  1242. imgs = cell(1,length(subs));
  1243. con_mvpa = struct();
  1244. % for each protocol
  1245. for c = 1:length(cond)
  1246. % for each participant
  1247. for s = 1:length(subs)
  1248. % setup beta image structure
  1249. imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
  1250. imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
  1251. imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
  1252. imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
  1253. imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
  1254. imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
  1255. imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
  1256. imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
  1257. imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
  1258. imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
  1259. imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
  1260. imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
  1261. imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
  1262. imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
  1263. imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
  1264. imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
  1265. imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
  1266. imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
  1267. imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
  1268. imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
  1269. imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
  1270. imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
  1271. imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
  1272. imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
  1273. end
  1274. % extract data from each ROI and store in one big struct
  1275. field = cond{c};
  1276. con_mvpa.(field).Datafiles = imgs;
  1277. con_mvpa.(field).output_raw = 1;
  1278. con_mvpa.(field).ROIfiles = R.ROIfiles;
  1279. con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
  1280. end
  1281. % remove NaN voxels from data
  1282. % for each participant
  1283. for s=1:length(subs)
  1284. % for each protocol
  1285. for c=1:length(cond)
  1286. % for each ROI
  1287. for n=1:length(R.ROIfiles)
  1288. field = cond{c};
  1289. % find NaNs in the beta images
  1290. x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
  1291. % get indices of these NaNs
  1292. ind=find(x);
  1293. % remove the NaNs from the data
  1294. con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
  1295. % remove the coordinates of the NaNs from the matrix of
  1296. % coordinates, so that everything lines up
  1297. con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
  1298. end
  1299. end
  1300. end
  1301. % for each participant
  1302. for s=1:length(subs)
  1303. % for each protocol
  1304. for c=1:length(cond)
  1305. % for each ROI
  1306. for n=1:length(R.ROIfiles)
  1307. field = cond{c};
  1308. % extract data (this matrix is beta images x nonzero voxels)
  1309. x=con_mvpa.(field).ROI(n,s).rawdata;
  1310. % Each block (12 semantic and 12 control) is one row of x.
  1311. % Calculate cosine distance between each pair of blocks (This
  1312. % is stored as the upper triangle of the similarity matrix).
  1313. con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
  1314. % convert zeros in the matrix to NaNs
  1315. con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
  1316. % calculate the mean dissimilarity between pairs of blocks in
  1317. % the same condition (i.e. mean dissimilarity between pairs of
  1318. % semantic blocks or pairs of control blocks)
  1319. con_mvpa.(field).ROI(n,s).mvpa_within_mean=nanmean([reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[1:12]),[],1);reshape(con_mvpa.(field).ROI(n,s).dissimilarity([13:24],[13:24]),[],1)]);
  1320. % calculate the mean dissimilarity between pairs of blocks in
  1321. % different conditions (i.e. mean dissimilarity between one
  1322. % semantic block and one control block)
  1323. con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
  1324. % calculate the difference in means
  1325. con_mvpa.(field).ROI(n,s).mvpa_comparison_mean=[con_mvpa.(field).ROI(n,s).mvpa_between_mean-con_mvpa.(field).ROI(n,s).mvpa_within_mean];
  1326. % collate results
  1327. con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
  1328. end
  1329. end
  1330. end
  1331. % violin plot - con images
  1332. roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
  1333. cond={'SESB';'SEMBodd';'MESB';'MEMBodd'};
  1334. figure;
  1335. a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
  1336. for i=1:length(R.ROIfiles)
  1337. % get data from that ROI and make it into a table
  1338. tmp=con_mvpa_collate_mean{1,i};
  1339. tmp=array2table(tmp,'VariableNames',cond);
  1340. % make a violin plot
  1341. subplot(2,3,i);
  1342. v=violinplot(tmp);
  1343. % set title and y-axis label
  1344. title(roiname{1,i},'FontSize',20);
  1345. ylabel('Difference in cosine distance','FontSize',16)
  1346. % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
  1347. v(1,1).ViolinColor = a(7,:);
  1348. v(1,2).ViolinColor = a(5,:);
  1349. v(1,3).ViolinColor = a(2,:);
  1350. v(1,4).ViolinColor = a(1,:);
  1351. % set axis font size
  1352. set(gca,'FontSize',16)
  1353. end
  1354. % make the plots a standard size
  1355. set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
  1356. % make the axes of all subplots match
  1357. ax1 = subplot(2,3,1);
  1358. ax2 = subplot(2,3,2);
  1359. ax3 = subplot(2,3,3);
  1360. ax4 = subplot(2,3,4);
  1361. ax5 = subplot(2,3,5);
  1362. ax6 = subplot(2,3,6);
  1363. linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'y')
  1364. clear anova_mvpa anova_mvpa_p
  1365. % statistics - anova
  1366. for i=1:6
  1367. % get data from that ROI and make it into a table
  1368. tmp=con_mvpa_collate_mean{1,i};
  1369. tmp=array2table(tmp,'VariableNames',cond);
  1370. % setup
  1371. w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo','oddBand'});
  1372. % fit repeated measures model
  1373. rm = fitrm(tmp, 'MEMBodd-SESB ~ 1', 'WithinDesign', w);
  1374. % run anova
  1375. anova_mvpa{i}=ranova(rm, 'withinmodel', 'Echo*oddBand');
  1376. % get p-values
  1377. anova_mvpa_p(:,i) = [anova_mvpa{i}.pValue(1,1),anova_mvpa{i}.pValue(3,1),anova_mvpa{i}.pValue(5,1),anova_mvpa{i}.pValue(7,1)];
  1378. end
  1379. % statistics - post-hoc t-tests
  1380. for n=1:6
  1381. % SB > MBodd
  1382. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,4)],[con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,3)],'tail','left');
  1383. con_mvpa_p_val(1,n)=tmp2;
  1384. con_mvpa_t_val(1,n)=tmp4.tstat;
  1385. % MBodd > SB
  1386. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,3)],[con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1387. con_mvpa_p_val(2,n)=tmp2;
  1388. con_mvpa_t_val(2,n)=tmp4.tstat;
  1389. % Interaction
  1390. [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2);con_mvpa_collate_mean{1,n}(:,3)],[con_mvpa_collate_mean{1,n}(:,1);con_mvpa_collate_mean{1,n}(:,4)],'tail','left');
  1391. con_mvpa_p_val(3,n)=tmp2;
  1392. con_mvpa_t_val(3,n)=tmp4.tstat;
  1393. end

secondlevel_glm_roi.m at commit b286716, no license · at the source

Overview

  1. MRC Cognition and Brain Sciences Unit University of Cambridge Cambridge UK
  2. Wolfson Brain Imaging Centre University of Cambridge Cambridge UK
  3. Department of Psychology University of Wisconsin‐Madison Madison Wisconsin USA
  4. Institute of Cognitive Neuroscience University College London London UK
Institutions: MRC Cognition and Brain Sciences Unit (United Kingdom); University of Cambridge (United Kingdom); University of Wisconsin–Madison (United States); University College London (United Kingdom)
Journal: Human brain mapping, volume 47, issue 11, article e70621
Dates: received 24 February 2026; accepted 27 July 2026; published online 10 August 2026; in print August 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1002/hbm.70621 · PMID 42574053 · PMCID PMC13456059 · OpenAlex W7202117783
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, fMRI & imaging, Machine learning
Keywords: 7T‐fMRI, multiband, multi‐echo, orbitofrontal cortex, parallel transmit, temporal lobe
MeSH: Brain*, Brain Mapping*, Image Processing, Computer-Assisted*, Magnetic Resonance Imaging*, Adult, Artifacts, Female, Humans, Male, Oxygen, Signal-To-Noise Ratio (* major topic)
Topic: Advanced MRI Techniques and Applications (Radiology, Nuclear Medicine and Imaging, Medicine), according to OpenAlex
Funding: Medical Research Council (MR/V031481/1, SUAG/019 G116768, MR N013433‐1, MC_UU_00005/18, MR/R023883/1, MR/M008983/1); NIHR Cambridge Biomedical Research Centre (NIHR203312)
Citations: not cited yet (Europe PMC); 94 references in the paper

Abstract

The temporal signal‐to‐noise ratio (tSNR) of functional magnetic resonance imaging (fMRI) is particularly poor in ventral anterior temporal and orbitofrontal regions because of B0 and B1 + magnetic field inhomogeneity, a problem that is exacerbated at higher field strengths. In this 7T‐fMRI study we compared three methods of improving sensitivity in these areas: parallel transmit, which uses multiple transmit elements, controlled independently, to homogenise the flip angle experienced by the tissue; multi‐echo, which entails collection of multiple volumes at different echo times following a single radiofrequency pulse; and multiband, in which multiple slices are acquired simultaneously. We found that parallel transmit and multi‐echo increased the magnitude of the BOLD signal change, but only multi‐echo increased BOLD magnitude in areas prone to susceptibility artefacts. Multiband and denoising of multi‐echo data with independent components analysis (ICA) both improved precision of GLM fit. Exploratory results suggested that multi‐echo and ICA denoising can both benefit multivariate analyses. In conclusion, a multi‐echo, multiband sequence improved fMRI quality in areas prone to susceptibility artefacts while maintaining sensitivity across the whole brain. We recommend this approach for studies investigating the functional roles of ventral temporal and orbitofrontal regions with 7T fMRI.

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

Repositories

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

slfrisby/7TOptimisation

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: b2867168d5b684fbd203dd84b9406431edc38e6b, 24 March 2026
Languages: MATLAB (106), Shell (13), Python (2)
Size: 229 files, 121 scripts
Software Heritage: not archived
Found in: the text, “Data Analysis”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (22 files), Tools for NIfTI and ANALYZE image (MATLAB) (20 files), Statistics and Machine Learning Toolbox (14 files), FSL (10 files), ANTs (8 files), AFNI (5 files), Image Processing Toolbox (2 files), Violinplot-Matlab (2 files), CAT12 (1 file), fMRIPrep (1 file), HeuDiConv (1 file), tedana (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
122 files

mrc-cbu/riksneurotools

License: GPL-3.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: f8b948f0dd465a1af2deedebd050b195ec077a83, 26 January 2026
Languages: MATLAB (17)
Size: 19 files, 17 scripts
Software Heritage: not archived
Found in: the text, “Univariate Analysis”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (13 files), Statistics and Machine Learning Toolbox (9 files), EEGLAB (1 file), fdr_bh (Benjamini-Hochberg FDR) (1 file), FieldTrip (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
19 files

DrMichaelLindner/MAP4SL

License: CC-BY-4.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 84572d4713df513a6d78cb5c829c1e91288a6138, 7 November 2018
Languages: MATLAB (1)
Size: 4 files, 1 script
Software Heritage: not archived
Found in: the text, “Slice Leakage Analysis”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
3 files

mrc-cbu.cam.ac.uk/publications/opendata

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Data Availability Statement”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
  • 26 September 2026: the link answers (HTTP 200)

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:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 139 scripts, each with its path and the digest of its content;
  • 22 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 Availability Statement

Data are publicly available for scientific research purposes via the MRC Cognition and Brain Sciences Unit Data Repository (https://www.mrc‐cbu.cam.ac.uk/publications/opendata/request/9273/ (https://www.mrc-cbu.cam.ac.uk/publications/opendata/request/9273/)). Code is publicly available at: https://github.com/slfrisby/7TOptimisation/.

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 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 6 keywords, 11 MeSH terms, 2 funders, 91 references.

Cite

This paper

Frisby, S. L., Correia, M. M., Zhang, M., Rodgers, C. T., Rogers, T. T., Lambon Ralph, M. A., & Halai, A. D. (2026). Optimising 7T-fMRI for Imaging Regions of Magnetic Susceptibility. Human brain mapping, 47(11), e70621. https://doi.org/10.1002/hbm.70621

BibTeX

@article{frisby2026optimising,
author = {Frisby, Saskia L. and Correia, Marta M. and Zhang, Minghao and Rodgers, Christopher T. and Rogers, Timothy T. and Lambon Ralph, Matthew A. and Halai, Ajay D.},
title = {{Optimising 7T-fMRI for Imaging Regions of Magnetic Susceptibility}},
journal = {Human brain mapping},
year = {2026},
month = aug,
volume = {47},
number = {11},
pages = {e70621},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/hbm.70621},
url = {https://doi.org/10.1002/hbm.70621},
pmid = {42574053},
pmcid = {PMC13456059}
}

RIS

TY - JOUR
AU - Frisby, Saskia L.
AU - Correia, Marta M.
AU - Zhang, Minghao
AU - Rodgers, Christopher T.
AU - Rogers, Timothy T.
AU - Lambon Ralph, Matthew A.
AU - Halai, Ajay D.
TI - Optimising 7T-fMRI for Imaging Regions of Magnetic Susceptibility
T2 - Human brain mapping
J2 - Hum Brain Mapp
PY - 2026
DA - 2026/08/01
VL - 47
IS - 11
SP - e70621
SN - 1065-9471
PB - Wiley
DO - 10.1002/hbm.70621
UR - https://doi.org/10.1002/hbm.70621
LA - en
ER -

CSL-JSON

{
"id": "10.1002/hbm.70621",
"type": "article-journal",
"title": "Optimising 7T-fMRI for Imaging Regions of Magnetic Susceptibility",
"container-title": "Human brain mapping",
"author": [
{
"family": "Frisby",
"given": "Saskia L."
},
{
"family": "Correia",
"given": "Marta M."
},
{
"family": "Zhang",
"given": "Minghao"
},
{
"family": "Rodgers",
"given": "Christopher T."
},
{
"family": "Rogers",
"given": "Timothy T."
},
{
"family": "Lambon Ralph",
"given": "Matthew A."
},
{
"family": "Halai",
"given": "Ajay D."
}
],
"container-title-short": "Hum Brain Mapp",
"volume": "47",
"issue": "11",
"page": "e70621",
"DOI": "10.1002/hbm.70621",
"PMID": "42574053",
"PMCID": "PMC13456059",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/hbm.70621",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
1
]
]
}
}

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.1162/imag.a.1198 [code]
MEPrep: A robust pipeline for multi-echo fMRI denoising and preprocessing.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: tedana, fMRIPrep, AFNI, 1 other tool, fMRI, 17 references
[2] doi:10.1162/imag.a.1201 [code]
All spectral frequencies of neural activity reveal semantic representation in the human anterior ventral temporal cortex.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: EEGLAB, FieldTrip, SPM, 2 other tools, 8 references, 2 authors
[3] doi:10.1162/imag.a.1262 [code]
Frame-wise multi-echo distortion correction for superior functional MRI.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: HeuDiConv, Tools for NIfTI and ANALYZE image (MATLAB), FieldTrip, 4 other tools, fMRI, 10 references
[4] doi:10.1162/netn.a.547 [code]
An evaluation of the efficacy of single-echo and multi-echo fMRI denoising strategies.
Journal: Network neuroscience (Cambridge, Mass.)
In common: tedana, fMRIPrep, ANTs, 1 other tool, fMRI, 11 references
[5] doi:10.1162/imag.a.1222 [code]
Network-based near-scalp personalized brain stimulation targets.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: tedana, AFNI, Tools for NIfTI and ANALYZE image (MATLAB), 6 other tools, 6 references
[6] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: fMRIPrep, Violinplot-Matlab, fdr_bh (Benjamini-Hochberg FDR), 7 other tools, 3 references
[7] doi:10.1016/j.neuron.2026.04.011 [code]
Precision fMRI reveals densely interdigitated network patches with conserved motifs in the lateral prefrontal cortex.
Journal: Neuron
In common: tedana, AFNI, Tools for NIfTI and ANALYZE image (MATLAB), 6 other tools, fMRI, 4 references
[8] doi:10.1002/hbm.70512 [code]
Precision Imaging for Intraindividual Investigation of the Reward Response.
Journal: Human brain mapping
In common: HeuDiConv, fMRIPrep, AFNI, 2 other tools, fMRI, 6 references
[9] doi:10.1038/s41467-026-73668-y [code]
Convergent and divergent brain-cognition development in early adolescence.
Journal: Nature communications
In common: tedana, fdr_bh (Benjamini-Hochberg FDR), AFNI, 7 other tools, fMRI
[10] doi:10.1162/imag.a.1252 [code]
Does the brain's E:I balance really shape long-range temporal correlations? Lessons learned from 3T MRI.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: tedana, fMRIPrep, AFNI, 2 other tools, fMRI, 6 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.