Optimising 7T-fMRI for Imaging Regions of Magnetic Susceptibility.
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] § 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] § 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] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_SE.sh, lines 47–131 · score 0.92 · dDespike, dTshift, dAllineate, brain mask, AFNI, ANTs
- [4] § Methods › Data Analysis › Preprocessing ↔ sub_7Tpilot_ME.sh, lines 47–92 · score 0.84 · dDespike, dTshift, dAllineate, AFNI, FSL, dvolreg
- [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] § 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] § 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] § 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] § 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] § 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] § 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] § 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] § Results › Region‐of‐Interest Analysis › Univariate Analysis ↔ secondlevel_glm_roi.m, lines 1549–1624 · score 0.68 · MBodd, LIFGpt, LpMTG, LvATL, interaction, RITG
- [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] § 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] § 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] § Results › Region‐of‐Interest Analysis ↔ secondlevel_glm_roi.m, lines 232–291 · score 0.61 · LmMTG, LIFGpt, LpMTG, LvATL, LTP, LFP
- [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] § 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] § 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] § Results › Excluded Participants ↔ motion_outliers.m, the whole file · a weak match · score 0.57 · absolute translation, absolute rotation, motion, volumes
- [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
- addpath('/group/mlr-lab/AH/Projects/spm12/');
- addpath('/group/mlr-lab/AH/Projects/toolboxes/');
- addpath('/group/mlr-lab/AH/Projects/toolboxes/Violinplot/');
- addpath('/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/riksneurotools-master/Util');
- % the above line adds the function roi_extract.m to path. Before using this
- % % function, check that lines 195-196 read:
- % ROI(nr,s).mean = nanmean(d,2);
- % ROI(nr,s).median = nanmedian(d,2);
- addpath('/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts');
- root = ['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/derivatives'];
- cd(root);
- % exclusions: 013 and 017 for excessive head motion, and 004 because the
- % pTx run was not acquired.
- subs=[{'001'},{'002'},{'003'},{'005'},{'006'},{'007'},{'008'},{'009'},{'010'},{'011'},{'012'},{'014'},{'015'},{'016'},{'017'},{'018'},{'019'}];
- %% comparing pTx to SESB
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from con images (expressing model fit)
- imgs = cell(1,length(subs));
- con = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/con_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_ptx8ms/con_0003.nii'];
- end
- % extract data from each ROI
- con.Datafiles = imgs;
- con.output_raw = 1;
- con.ROIfiles=R.ROIfiles;
- con.ROI = roi_extract(con);
- % extract ROIs from spmT images (expressing model precision)
- imgs = cell(1,length(subs));
- spmT = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/spmT_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_ptx8ms/spmT_0003.nii'];
- end
- % extract data from each ROI
- spmT.Datafiles = imgs;
- spmT.output_raw = 1;
- spmT.ROIfiles=R.ROIfiles;
- spmT.ROI = roi_extract(spmT);
- %remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(imgs{1,1})
- % for each ROI
- for n=1:length(con.ROIfiles)
- % find NaNs in the contrast
- x=isnan(con.ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data and the corresponding values
- % from the spmT data
- con.ROI(n,s).rawdata(:,ind)=[];
- spmT.ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con.ROI(n,s).XYZ(:,ind)=[];
- spmT.ROI(n,s).XYZ(:,ind)=[];
- % extract the mean and median for each ROI (for each contrast)
- con_collate_median{n}(s,:)=con.ROI(n,s).median';
- con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
- spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
- spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
- end
- end
- end
- % violin plot - con images
- roiname=[{'LvATL'},{'RITG'},{'LpMTG'},{'LIFGpt'}];
- cond={'SESB';'pTx'};
- figure;
- colours = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- % for every ROI
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,2,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i});
- ylabel('Contrast value','FontSize',20);
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark pink, pTx = purple
- v(1,1).ViolinColor = colours(7,:);
- v(1,2).ViolinColor = colours(4,:);
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,2,1);
- ax2 = subplot(2,2,2);
- ax3 = subplot(2,2,3);
- ax4 = subplot(2,2,4);
- linkaxes([ax1,ax2,ax3,ax4],'y')
- % violin plots - spmT images
- figure;
- % for every ROI
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,2,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i});
- ylabel('spmT value','FontSize',20);
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark pink, pTx = purple
- v(1,1).ViolinColor = colours(7,:);
- v(1,2).ViolinColor= colours(4,:);
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,2,1);
- ax2 = subplot(2,2,2);
- ax3 = subplot(2,2,3);
- ax4 = subplot(2,2,4);
- linkaxes([ax1,ax2,ax3,ax4],'y')
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % SESB > pTx
- % conduct paired t-test on con values
- [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,2)],[con_collate_median{1,n}(:,1)],'tail','left');
- % get p-values
- con_p_val(1,n)=tmp2;
- % also get t-values
- con_t_val(1,n)=tmp4.tstat;
- % repeat for spmT values
- [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,2)],[spmT_collate_median{1,n}(:,1)],'tail','left');
- spmT_p_val(1,n)=tmp2;
- spmT_t_val(1,n)=tmp4.tstat;
- % pTx > SESB
- [tmp1,tmp2,tmp3,tmp4]=ttest([con_collate_median{1,n}(:,1)],[con_collate_median{1,n}(:,2)],'tail','left');
- con_p_val(2,n)=tmp2;
- con_t_val(2,n)=tmp4.tstat;
- [tmp1,tmp2,tmp3,tmp4]=ttest([spmT_collate_median{1,n}(:,1)],[spmT_collate_median{1,n}(:,2)],'tail','left');
- spmT_p_val(2,n)=tmp2;
- spmT_t_val(2,n)=tmp4.tstat;
- end
- %% 2x2 Factorial design - echo and band
- 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
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from con images (expressing model fit)
- imgs = cell(1,length(subs));
- con = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/con_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB/con_0003.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/con_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/con_0003.nii'];
- end
- % extract data from each ROI
- con.Datafiles = imgs;
- con.output_raw = 1;
- con.ROIfiles=R.ROIfiles;
- con.ROI = roi_extract(con);
- % extract ROIs from spmT images (expressing model precision)
- imgs = cell(1,length(subs));
- spmT = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/spmT_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB/spmT_0003.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/spmT_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/spmT_0003.nii'];
- end
- % extract data from each ROI
- spmT.Datafiles = imgs;
- spmT.output_raw = 1;
- spmT.ROIfiles=R.ROIfiles;
- spmT.ROI = roi_extract(spmT);
- %remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(imgs{1,1})
- % for each ROI
- for n=1:length(con.ROIfiles)
- % find NaNs in the contrast
- x=isnan(con.ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data and the corresponding values
- % from the spmT data
- con.ROI(n,s).rawdata(:,ind)=[];
- spmT.ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con.ROI(n,s).XYZ(:,ind)=[];
- spmT.ROI(n,s).XYZ(:,ind)=[];
- % extract the mean and median for each ROI (for each contrast)
- con_collate_median{n}(s,:)=con.ROI(n,s).median';
- con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
- spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
- spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
- end
- end
- end
- % violin plot - con images
- roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
- cond={'SESB';'SEMB';'MESB';'MEMB'};
- figure;
- a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,4,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('Contrast value','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
- v(1,1).ViolinColor = a(7,:);
- v(1,2).ViolinColor = a(5,:);
- v(1,3).ViolinColor = a(2,:);
- v(1,4).ViolinColor = a(1,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,4,1);
- ax2 = subplot(2,4,2);
- ax3 = subplot(2,4,3);
- ax4 = subplot(2,4,4);
- ax5 = subplot(2,4,5);
- ax6 = subplot(2,4,6);
- ax7 = subplot(2,4,7);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
- % violin plots - spmT images
- figure;
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,4,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('spmT value','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
- v(1,1).ViolinColor = a(7,:);
- v(1,2).ViolinColor = a(5,:);
- v(1,3).ViolinColor = a(2,:);
- v(1,4).ViolinColor = a(1,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,4,1);
- ax2 = subplot(2,4,2);
- ax3 = subplot(2,4,3);
- ax4 = subplot(2,4,4);
- ax5 = subplot(2,4,5);
- ax6 = subplot(2,4,6);
- ax7 = subplot(2,4,7);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
- % statistics - anova
- for i=1:length(con.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo', 'Band'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMB-SESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_con{i}=ranova(rm, 'withinmodel', 'Echo*Band');
- % get p-values
- 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)];
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo', 'Band'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMB-SESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_spmT{i}=ranova(rm, 'withinmodel', 'Echo*Band');
- % get p-values
- 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)];
- end
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % ME > SE
- [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');
- % get p-values
- con_p_val(1,n)=tmp2;
- % also get t-values
- con_t_val(1,n)=tmp4.tstat;
- % repeat for spmT values
- [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');
- spmT_p_val(1,n)=tmp2;
- spmT_t_val(1,n)=tmp4.tstat;
- % SE > ME
- [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');
- con_p_val(2,n)=tmp2;
- con_t_val(2,n)=tmp4.tstat;
- [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');
- spmT_p_val(2,n)=tmp2;
- spmT_t_val(2,n)=tmp4.tstat;
- % MB > SB
- [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');
- con_p_val(3,n)=tmp2;
- con_t_val(3,n)=tmp4.tstat;
- [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');
- spmT_p_val(3,n)=tmp2;
- spmT_t_val(3,n)=tmp4.tstat;
- % SB > MB
- [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');
- con_p_val(4,n)=tmp2;
- con_t_val(4,n)=tmp4.tstat;
- [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');
- spmT_p_val(4,n)=tmp2;
- spmT_t_val(4,n)=tmp4.tstat;
- % Interaction
- [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');
- con_p_val(5,n)=tmp2;
- con_t_val(5,n)=tmp4.tstat;
- [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');
- spmT_p_val(5,n)=tmp2;
- spmT_t_val(5,n)=tmp4.tstat;
- end
- %% Effect of denoising
- 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
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from con images (expressing model fit)
- imgs = cell(1,length(subs));
- con = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/con_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB_dn/con_0003.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/con_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_dn/con_0003.nii'];
- end
- % extract data from each ROI
- con.Datafiles = imgs;
- con.output_raw = 1;
- con.ROIfiles=R.ROIfiles;
- con.ROI = roi_extract(con);
- % extract ROIs from spmT images (expressing model precision)
- imgs = cell(1,length(subs));
- spmT = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/spmT_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB_dn/spmT_0003.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB/spmT_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_dn/spmT_0003.nii'];
- end
- % extract data from each ROI
- spmT.Datafiles = imgs;
- spmT.output_raw = 1;
- spmT.ROIfiles=R.ROIfiles;
- spmT.ROI = roi_extract(spmT);
- %remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(imgs{1,1})
- % for each ROI
- for n=1:length(con.ROIfiles)
- % find NaNs in the contrast
- x=isnan(con.ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data and the corresponding values
- % from the spmT data
- con.ROI(n,s).rawdata(:,ind)=[];
- spmT.ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con.ROI(n,s).XYZ(:,ind)=[];
- spmT.ROI(n,s).XYZ(:,ind)=[];
- % extract the mean and median for each ROI (for each contrast)
- con_collate_median{n}(s,:)=con.ROI(n,s).median';
- con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
- spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
- spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
- end
- end
- end
- % violin plot - con images
- roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
- cond={'MESB';'MESBdn';'MEMB';'MEMBdn'};
- figure;
- a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,4,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('Contrast value','FontSize',16)
- % Set violin colours, which should be consistent across all plots in
- % the paper. MESB = orange; MESBdn = yellow; MEMB = dark blue; MEMBdn =
- % pale blue
- v(1,1).ViolinColor = a(2,:);
- v(1,2).ViolinColor = a(3,:);
- v(1,3).ViolinColor = a(1,:);
- v(1,4).ViolinColor = a(6,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,4,1);
- ax2 = subplot(2,4,2);
- ax3 = subplot(2,4,3);
- ax4 = subplot(2,4,4);
- ax5 = subplot(2,4,5);
- ax6 = subplot(2,4,6);
- ax7 = subplot(2,4,7);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
- % violin plots - spmT images
- figure;
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,4,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('spmT value','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. MESB = orange; MESBdn = yellow; MEMB = dark blue; MEMBdn =
- % pale blue
- v(1,1).ViolinColor = a(2,:);
- v(1,2).ViolinColor = a(3,:);
- v(1,3).ViolinColor = a(1,:);
- v(1,4).ViolinColor = a(6,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,4,1);
- ax2 = subplot(2,4,2);
- ax3 = subplot(2,4,3);
- ax4 = subplot(2,4,4);
- ax5 = subplot(2,4,5);
- ax6 = subplot(2,4,6);
- ax7 = subplot(2,4,7);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
- % statistics - anova
- for i=1:length(con.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Band','denoisedEcho'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMBdn-MESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_con{i}=ranova(rm, 'withinmodel', 'Band*denoisedEcho');
- % get p-values
- 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)];
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Band','denoisedEcho'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMBdn-MESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_spmT{i}=ranova(rm, 'withinmodel', 'Band*denoisedEcho');
- % get p-values
- 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)];
- end
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % standard > denoised
- [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');
- con_p_val(1,n)=tmp2;
- con_t_val(1,n)=tmp4.tstat;
- [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');
- spmT_p_val(1,n)=tmp2;
- spmT_t_val(1,n)=tmp4.tstat;
- % denoised > standard
- [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');
- con_p_val(2,n)=tmp2;
- con_t_val(2,n)=tmp4.tstat;
- [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');
- spmT_p_val(2,n)=tmp2;
- spmT_t_val(2,n)=tmp4.tstat;
- % Interaction
- [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');
- con_p_val(3,n)=tmp2;
- con_t_val(3,n)=tmp4.tstat;
- [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');
- spmT_p_val(3,n)=tmp2;
- spmT_t_val(3,n)=tmp4.tstat;
- end
- %% Odd volumes
- 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
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from con images (expressing model fit)
- imgs = cell(1,length(subs));
- con = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/con_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB_odd/con_0003.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/con_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_odd/con_0003.nii'];
- end
- % extract data from each ROI
- con.Datafiles = imgs;
- con.output_raw = 1;
- con.ROIfiles=R.ROIfiles;
- con.ROI = roi_extract(con);
- % extract ROIs from spmT images (expressing model precision)
- imgs = cell(1,length(subs));
- spmT = struct();
- for s=1:length(subs)
- imgs{s}{1} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SESB/spmT_0003.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_SEMB_odd/spmT_0003.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MESB/spmT_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni/sub-',subs{s},'/6sm_MEMB_odd/spmT_0003.nii'];
- end
- % extract data from each ROI
- spmT.Datafiles = imgs;
- spmT.output_raw = 1;
- spmT.ROIfiles=R.ROIfiles;
- spmT.ROI = roi_extract(spmT);
- %remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(imgs{1,1})
- % for each ROI
- for n=1:length(con.ROIfiles)
- % find NaNs in the contrast
- x=isnan(con.ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data and the corresponding values
- % from the spmT data
- con.ROI(n,s).rawdata(:,ind)=[];
- spmT.ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con.ROI(n,s).XYZ(:,ind)=[];
- spmT.ROI(n,s).XYZ(:,ind)=[];
- % extract the mean and median for each ROI (for each contrast)
- con_collate_median{n}(s,:)=con.ROI(n,s).median';
- con_collate_mean{n}(s,:)=con.ROI(n,s).mean';
- spmT_collate_median{n}(s,:)=spmT.ROI(n,s).median';
- spmT_collate_mean{n}(s,:)=spmT.ROI(n,s).mean';
- end
- end
- end
- % violin plot - con images
- roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
- cond={'SESB';'SEMBodd';'MESB';'MEMBodd'};
- figure;
- a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,3,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('Contrast value','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
- v(1,1).ViolinColor = a(7,:);
- v(1,2).ViolinColor = a(5,:);
- v(1,3).ViolinColor = a(2,:);
- v(1,4).ViolinColor = a(1,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,3,1);
- ax2 = subplot(2,3,2);
- ax3 = subplot(2,3,3);
- ax4 = subplot(2,3,4);
- ax5 = subplot(2,3,5);
- ax6 = subplot(2,3,6);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'y')
- % violin plots - spmT images
- figure;
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,3,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('spmT value','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
- v(1,1).ViolinColor = a(7,:);
- v(1,2).ViolinColor = a(5,:);
- v(1,3).ViolinColor = a(2,:);
- v(1,4).ViolinColor = a(1,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,3,1);
- ax2 = subplot(2,3,2);
- ax3 = subplot(2,3,3);
- ax4 = subplot(2,3,4);
- ax5 = subplot(2,3,5);
- ax6 = subplot(2,3,6);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'y')
- % statistics - anova
- for i=1:length(con.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo','oddBand'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMBodd-SESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_con{i}=ranova(rm, 'withinmodel', 'Echo*oddBand');
- % get p-values
- 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)];
- % get data from that ROI and make it into a table
- tmp=spmT_collate_median{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo','oddBand'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMBodd-SESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_spmT{i}=ranova(rm, 'withinmodel', 'Echo*oddBand');
- % get p-values
- 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)];
- end
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % SB > MBodd
- [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');
- con_p_val(1,n)=tmp2;
- con_t_val(1,n)=tmp4.tstat;
- [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');
- spmT_p_val(1,n)=tmp2;
- spmT_t_val(1,n)=tmp4.tstat;
- % MBodd > SB
- [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');
- con_p_val(2,n)=tmp2;
- con_t_val(2,n)=tmp4.tstat;
- [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');
- spmT_p_val(2,n)=tmp2;
- spmT_t_val(2,n)=tmp4.tstat;
- % Interaction
- [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');
- con_p_val(3,n)=tmp2;
- con_t_val(3,n)=tmp4.tstat;
- [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');
- spmT_p_val(3,n)=tmp2;
- spmT_t_val(3,n)=tmp4.tstat;
- end
- %% Exploratory MVPA
- % Comparing pTx to SESB
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from beta images
- cond={'SESB';'ptx8ms'};
- imgs = cell(1,length(subs));
- con_mvpa = struct();
- % for each protocol
- for c = 1:length(cond)
- % for each participant
- for s = 1:length(subs)
- % setup beta image structure
- imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
- imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
- imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
- imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
- imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
- imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
- imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
- imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
- imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
- imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
- imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
- imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
- imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
- imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
- imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
- imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
- imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
- imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
- imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
- imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
- imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
- end
- % extract data from each ROI and store in one big struct
- field = cond{c};
- con_mvpa.(field).Datafiles = imgs;
- con_mvpa.(field).output_raw = 1;
- con_mvpa.(field).ROIfiles = R.ROIfiles;
- con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
- end
- % remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % find NaNs in the beta images
- x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data
- con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
- end
- end
- end
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % extract data (this matrix is beta images x nonzero voxels)
- x=con_mvpa.(field).ROI(n,s).rawdata;
- % Each block (12 semantic and 12 control) is one row of x.
- % Calculate cosine distance between each pair of blocks (This
- % is stored as the upper triangle of the similarity matrix).
- con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
- % convert zeros in the matrix to NaNs
- con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
- % calculate the mean dissimilarity between pairs of blocks in
- % the same condition (i.e. mean dissimilarity between pairs of
- % semantic blocks or pairs of control blocks)
- 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)]);
- % calculate the mean dissimilarity between pairs of blocks in
- % different conditions (i.e. mean dissimilarity between one
- % semantic block and one control block)
- con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
- % calculate the difference in means
- 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];
- % collate results
- con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
- end
- end
- end
- % violin plot - beta images
- roiname=[{'LvATL'},{'RITG'},{'LpMTG'},{'LIFGpt'}];
- cond={'SESB';'pTx'};
- figure;
- colours = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- % for every ROI
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,2,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i});
- ylabel('Difference in cosine distance','FontSize',20);
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark pink, pTx = purple
- v(1,1).ViolinColor = colours(7,:);
- v(1,2).ViolinColor= colours(4,:);
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,2,1);
- ax2 = subplot(2,2,2);
- ax3 = subplot(2,2,3);
- ax4 = subplot(2,2,4);
- linkaxes([ax1,ax2,ax3,ax4],'y')
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % SESB > pTx
- % conduct paired t-test on con values
- [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,2)],[con_mvpa_collate_mean{1,n}(:,1)],'tail','left');
- % get p-values
- con_mvpa_p_val(1,n)=tmp2;
- % also get t-values
- con_mvpa_t_val(1,n)=tmp4.tstat;
- % pTx > SESB
- [tmp1,tmp2,tmp3,tmp4]=ttest([con_mvpa_collate_mean{1,n}(:,1)],[con_mvpa_collate_mean{1,n}(:,2)],'tail','left');
- con_mvpa_p_val(2,n)=tmp2;
- con_mvpa_t_val(2,n)=tmp4.tstat;
- end
- % 2x2 factorial design - echo and band
- clear con_mvpa con_mvpa_collate_mean con_mvpa_p_val con_mvpa_t_val
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from beta images
- cond={'SESB';'SEMB';'MESB';'MEMB'};
- imgs = cell(1,length(subs));
- con_mvpa = struct();
- % for each protocol
- for c = 1:length(cond)
- % for each participant
- for s = 1:length(subs)
- % setup beta image structure
- imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
- imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
- imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
- imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
- imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
- imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
- imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
- imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
- imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
- imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
- imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
- imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
- imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
- imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
- imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
- imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
- imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
- imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
- imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
- imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
- imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
- end
- % extract data from each ROI and store in one big struct
- field = cond{c};
- con_mvpa.(field).Datafiles = imgs;
- con_mvpa.(field).output_raw = 1;
- con_mvpa.(field).ROIfiles = R.ROIfiles;
- con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
- end
- % remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % find NaNs in the beta images
- x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data
- con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
- end
- end
- end
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % extract data (this matrix is beta images x nonzero voxels)
- x=con_mvpa.(field).ROI(n,s).rawdata;
- % Each block (12 semantic and 12 control) is one row of x.
- % Calculate cosine distance between each pair of blocks (This
- % is stored as the upper triangle of the similarity matrix).
- con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
- % convert zeros in the matrix to NaNs
- con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
- % calculate the mean dissimilarity between pairs of blocks in
- % the same condition (i.e. mean dissimilarity between pairs of
- % semantic blocks or pairs of control blocks)
- 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)]);
- % calculate the mean dissimilarity between pairs of blocks in
- % different conditions (i.e. mean dissimilarity between one
- % semantic block and one control block)
- con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
- % calculate the difference in means
- 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];
- % collate results
- con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
- end
- end
- end
- % violin plot - beta images
- roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
- cond={'SESB';'SEMB';'MESB';'MEMB'};
- figure;
- a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,4,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('Difference in cosine distance','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
- v(1,1).ViolinColor = a(7,:);
- v(1,2).ViolinColor = a(5,:);
- v(1,3).ViolinColor = a(2,:);
- v(1,4).ViolinColor = a(1,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,4,1);
- ax2 = subplot(2,4,2);
- ax3 = subplot(2,4,3);
- ax4 = subplot(2,4,4);
- ax5 = subplot(2,4,5);
- ax6 = subplot(2,4,6);
- ax7 = subplot(2,4,7);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
- % statistics - anova
- for i=1:7
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo', 'Band'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMB-SESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_mvpa{i}=ranova(rm, 'withinmodel', 'Echo*Band');
- % get p-values
- 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)];
- end
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % ME > SE
- [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');
- % get p-values
- con_mvpa_p_val(1,n)=tmp2;
- % also get t-values
- con_mvpa_t_val(1,n)=tmp4.tstat;
- % SE > ME
- [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');
- con_mvpa_p_val(2,n)=tmp2;
- con_mvpa_t_val(2,n)=tmp4.tstat;
- % MB > SB
- [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');
- con_mvpa_p_val(3,n)=tmp2;
- con_mvpa_t_val(3,n)=tmp4.tstat;
- % SB > MB
- [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');
- con_mvpa_p_val(4,n)=tmp2;
- con_mvpa_t_val(4,n)=tmp4.tstat;
- % Interaction
- [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');
- con_mvpa_p_val(5,n)=tmp2;
- con_mvpa_t_val(5,n)=tmp4.tstat;
- end
- % Effect of denoising
- clear con_mvpa con_mvpa_collate_mean con_mvpa_p_val con_mvpa_t_val
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{7}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from beta images
- cond={'MESB';'MESB_dn';'MEMB';'MEMB_dn'};
- imgs = cell(1,length(subs));
- con_mvpa = struct();
- % for each protocol
- for c = 1:length(cond)
- % for each participant
- for s = 1:length(subs)
- % setup beta image structure
- imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
- imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
- imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
- imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
- imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
- imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
- imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
- imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
- imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
- imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
- imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
- imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
- imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
- imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
- imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
- imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
- imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
- imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
- imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
- imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
- imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
- end
- % extract data from each ROI and store in one big struct
- field = cond{c};
- con_mvpa.(field).Datafiles = imgs;
- con_mvpa.(field).output_raw = 1;
- con_mvpa.(field).ROIfiles = R.ROIfiles;
- con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
- end
- % remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % find NaNs in the beta images
- x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data
- con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
- end
- end
- end
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % extract data (this matrix is beta images x nonzero voxels)
- x=con_mvpa.(field).ROI(n,s).rawdata;
- % Each block (12 semantic and 12 control) is one row of x.
- % Calculate cosine distance between each pair of blocks (This
- % is stored as the upper triangle of the similarity matrix).
- con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
- % convert zeros in the matrix to NaNs
- con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
- % calculate the mean dissimilarity between pairs of blocks in
- % the same condition (i.e. mean dissimilarity between pairs of
- % semantic blocks or pairs of control blocks)
- 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)]);
- % calculate the mean dissimilarity between pairs of blocks in
- % different conditions (i.e. mean dissimilarity between one
- % semantic block and one control block)
- con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
- % calculate the difference in means
- 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];
- % collate results
- con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
- end
- end
- end
- % violin plots - beta images
- roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LFP'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
- cond={'MESB';'MESBdn';'MEMB';'MEMBdn'};
- figure;
- a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,4,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('Difference in cosine distance','FontSize',16)
- % Set violin colours, which should be consistent across all plots in
- % the paper. MESB = orange; MESBdn = yellow; MEMB = dark blue; MEMBdn =
- % pale blue
- v(1,1).ViolinColor = a(2,:);
- v(1,2).ViolinColor = a(3,:);
- v(1,3).ViolinColor = a(1,:);
- v(1,4).ViolinColor = a(6,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,4,1);
- ax2 = subplot(2,4,2);
- ax3 = subplot(2,4,3);
- ax4 = subplot(2,4,4);
- ax5 = subplot(2,4,5);
- ax6 = subplot(2,4,6);
- ax7 = subplot(2,4,7);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6,ax7],'y')
- % statistics - anova
- for i=1:7
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Band','denoisedEcho'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMBdn-MESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_mvpa{i}=ranova(rm, 'withinmodel', 'Band*denoisedEcho');
- % get p-values
- 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)];
- end
- % statistics - post-hoc t-tests
- for n=1:length(R.ROIfiles)
- % standard > denoised
- [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');
- con_mvpa_p_val(1,n)=tmp2;
- con_mvpa_t_val(1,n)=tmp4.tstat;
- % denoised > standard
- [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');
- con_mvpa_p_val(2,n)=tmp2;
- con_mvpa_t_val(2,n)=tmp4.tstat;
- % Interaction
- [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');
- con_mvpa_p_val(3,n)=tmp2;
- con_mvpa_t_val(3,n)=tmp4.tstat;
- end
- % Odd volumes
- clear con_mvpa con_mvpa_collate_mean con_mvpa_p_val con_mvpa_t_val
- % setup ROIs. Plot the cluster-corrected main effect (all conditions set to
- % 1) and use only ROIs that overlap with this main effect (comment out
- % those that do not).
- R = struct();
- R.ROIfiles{1}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--51_9_-36.nii'];% temporalpole
- R.ROIfiles{2}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--42_-24_-27.nii']; % vATL
- R.ROIfiles{3}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-45_-33_-21.nii'];% rITG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--3_57_-15.nii'];% frontal pole
- R.ROIfiles{4}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--48_-21_-9.nii'];% mMTG
- R.ROIfiles{5}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--55_-43_-7.nii'];% pMTG
- R.ROIfiles{6}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8--54_27_6.nii'];% IFGptri
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-51_-27_-3.nii'];% rSTG
- % R.ROIfiles{n}=['/imaging/projects/cbu/wbic-p00567-7Tmultiecho/main/scripts/HumphreysPNAS2015/PNAS_semantic_sphere_8-60_0_33.nii'];%r PCG
- % extract ROIs from beta images
- cond={'SESB';'SEMB_odd';'MESB';'MEMB_odd'};
- imgs = cell(1,length(subs));
- con_mvpa = struct();
- % for each protocol
- for c = 1:length(cond)
- % for each participant
- for s = 1:length(subs)
- % setup beta image structure
- imgs{s}{1} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0001.nii'];
- imgs{s}{2} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0002.nii'];
- imgs{s}{3} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0003.nii'];
- imgs{s}{4} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0004.nii'];
- imgs{s}{5} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0005.nii'];
- imgs{s}{6} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0006.nii'];
- imgs{s}{7} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0007.nii'];
- imgs{s}{8} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0008.nii'];
- imgs{s}{9} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0009.nii'];
- imgs{s}{10} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0010.nii'];
- imgs{s}{11} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0011.nii'];
- imgs{s}{12} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0012.nii'];
- imgs{s}{13} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0013.nii'];
- imgs{s}{14} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0014.nii'];
- imgs{s}{15} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0015.nii'];
- imgs{s}{16} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0016.nii'];
- imgs{s}{17} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0017.nii'];
- imgs{s}{18} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0018.nii'];
- imgs{s}{19} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0019.nii'];
- imgs{s}{20} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0020.nii'];
- imgs{s}{21} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0021.nii'];
- imgs{s}{22} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0022.nii'];
- imgs{s}{23} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0023.nii'];
- imgs{s}{24} = [root,'/GLM/first_mni_mvpa/sub-',subs{s},'/6sm_',cond{c},'/beta_0024.nii'];
- end
- % extract data from each ROI and store in one big struct
- field = cond{c};
- con_mvpa.(field).Datafiles = imgs;
- con_mvpa.(field).output_raw = 1;
- con_mvpa.(field).ROIfiles = R.ROIfiles;
- con_mvpa.(field).ROI = roi_extract(con_mvpa.(field));
- end
- % remove NaN voxels from data
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % find NaNs in the beta images
- x=isnan(con_mvpa.(field).ROI(n,s).rawdata(1,:));
- % get indices of these NaNs
- ind=find(x);
- % remove the NaNs from the data
- con_mvpa.(field).ROI(n,s).rawdata(:,ind)=[];
- % remove the coordinates of the NaNs from the matrix of
- % coordinates, so that everything lines up
- con_mvpa.(field).ROI(n,s).XYZ(:,ind)=[];
- end
- end
- end
- % for each participant
- for s=1:length(subs)
- % for each protocol
- for c=1:length(cond)
- % for each ROI
- for n=1:length(R.ROIfiles)
- field = cond{c};
- % extract data (this matrix is beta images x nonzero voxels)
- x=con_mvpa.(field).ROI(n,s).rawdata;
- % Each block (12 semantic and 12 control) is one row of x.
- % Calculate cosine distance between each pair of blocks (This
- % is stored as the upper triangle of the similarity matrix).
- con_mvpa.(field).ROI(n,s).dissimilarity=triu(squareform(pdist(x,'cosine')));
- % convert zeros in the matrix to NaNs
- con_mvpa.(field).ROI(n,s).dissimilarity(con_mvpa.(field).ROI(n,s).dissimilarity==0)=nan;
- % calculate the mean dissimilarity between pairs of blocks in
- % the same condition (i.e. mean dissimilarity between pairs of
- % semantic blocks or pairs of control blocks)
- 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)]);
- % calculate the mean dissimilarity between pairs of blocks in
- % different conditions (i.e. mean dissimilarity between one
- % semantic block and one control block)
- con_mvpa.(field).ROI(n,s).mvpa_between_mean=nanmean(reshape(con_mvpa.(field).ROI(n,s).dissimilarity([1:12],[13:24]),[],1));
- % calculate the difference in means
- 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];
- % collate results
- con_mvpa_collate_mean{n}(s,c)=con_mvpa.(field).ROI(n,s).mvpa_comparison_mean;
- end
- end
- end
- % violin plot - con images
- roiname=[{'LTP'},{'LvATL'},{'RITG'},{'LmMTG'},{'LpMTG'},{'LIFGpt'}];
- cond={'SESB';'SEMBodd';'MESB';'MEMBodd'};
- figure;
- a = get(gca,'colororder'); % colours: 1 = dark blue, 2 = orange, 3 = yellow, 4 = purple, 5 = green, 6 = pale blue, 7 = dark pink/red
- for i=1:length(R.ROIfiles)
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % make a violin plot
- subplot(2,3,i);
- v=violinplot(tmp);
- % set title and y-axis label
- title(roiname{1,i},'FontSize',20);
- ylabel('Difference in cosine distance','FontSize',16)
- % Set violin colours, which should be consistent across all plots in the paper. SESB = dark red; SEMB = green; MESB = orange; MEMB = dark blue
- v(1,1).ViolinColor = a(7,:);
- v(1,2).ViolinColor = a(5,:);
- v(1,3).ViolinColor = a(2,:);
- v(1,4).ViolinColor = a(1,:);
- % set axis font size
- set(gca,'FontSize',16)
- end
- % make the plots a standard size
- set(gcf,'PaperUnits','centimeters','PaperSize',[20 40])
- % make the axes of all subplots match
- ax1 = subplot(2,3,1);
- ax2 = subplot(2,3,2);
- ax3 = subplot(2,3,3);
- ax4 = subplot(2,3,4);
- ax5 = subplot(2,3,5);
- ax6 = subplot(2,3,6);
- linkaxes([ax1,ax2,ax3,ax4,ax5,ax6],'y')
- clear anova_mvpa anova_mvpa_p
- % statistics - anova
- for i=1:6
- % get data from that ROI and make it into a table
- tmp=con_mvpa_collate_mean{1,i};
- tmp=array2table(tmp,'VariableNames',cond);
- % setup
- w = table(categorical([1 1 2 2].'), categorical([1 2 1 2].'), 'VariableNames', {'Echo','oddBand'});
- % fit repeated measures model
- rm = fitrm(tmp, 'MEMBodd-SESB ~ 1', 'WithinDesign', w);
- % run anova
- anova_mvpa{i}=ranova(rm, 'withinmodel', 'Echo*oddBand');
- % get p-values
- 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)];
- end
- % statistics - post-hoc t-tests
- for n=1:6
- % SB > MBodd
- [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');
- con_mvpa_p_val(1,n)=tmp2;
- con_mvpa_t_val(1,n)=tmp4.tstat;
- % MBodd > SB
- [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');
- con_mvpa_p_val(2,n)=tmp2;
- con_mvpa_t_val(2,n)=tmp4.tstat;
- % Interaction
- [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');
- con_mvpa_p_val(3,n)=tmp2;
- con_mvpa_t_val(3,n)=tmp4.tstat;
- end
secondlevel_glm_roi.m at commit b286716, no license · at the source
Overview
- MRC Cognition and Brain Sciences Unit University of Cambridge Cambridge UK
- Wolfson Brain Imaging Centre University of Cambridge Cambridge UK
- Department of Psychology University of Wisconsin‐Madison Madison Wisconsin USA
- Institute of Cognitive Neuroscience University College London London UK
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
b2867168d5b684fbd203dd84b9406431edc38e6b, 24 March 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
122 files
- 00_convert_to_BIDS.sh, Shell, 84 lines
- 01_anat_proc.sh, Shell, 33 lines
- MC_MAP4SL_extracontrols.
m , MATLAB, 1,002 lines - MC_sliceLeakage_extract_
ROIs_all.m , MATLAB, 160 lines, 1 match - MC_sliceLeakage_find_mas
ks_all.m , MATLAB, 79 lines, 2 matches - NIfTI_20140122/
affine.m , MATLAB, 554 lines - NIfTI_20140122/
bipolar.m , MATLAB, 94 lines - NIfTI_20140122/
bresenham_line3d.m , MATLAB, 189 lines - NIfTI_20140122/
clip_nii.m , MATLAB, 115 lines - NIfTI_20140122/
collapse_nii_scan.m , MATLAB, 260 lines - NIfTI_20140122/
expand_nii_scan.m , MATLAB, 48 lines - NIfTI_20140122/
extra_nii_hdr.m , MATLAB, 255 lines - NIfTI_20140122/
flip_lr.m , MATLAB, 84 lines - NIfTI_20140122/
get_nii_frame.m , MATLAB, 164 lines - NIfTI_20140122/
load_nii.m , MATLAB, 198 lines - NIfTI_20140122/
load_nii_ext.m , MATLAB, 207 lines - NIfTI_20140122/
load_nii_hdr.m , MATLAB, 280 lines - NIfTI_20140122/
load_nii_img.m , MATLAB, 392 lines - NIfTI_20140122/
load_untouch0_nii_hdr.m , MATLAB, 200 lines - NIfTI_20140122/
load_untouch_header_only , MATLAB, 187 lines.m - NIfTI_20140122/
load_untouch_nii.m , MATLAB, 191 lines - NIfTI_20140122/
load_untouch_nii_hdr.m , MATLAB, 217 lines - NIfTI_20140122/
load_untouch_nii_img.m , MATLAB, 468 lines - NIfTI_20140122/
make_ana.m , MATLAB, 210 lines - NIfTI_20140122/
make_nii.m , MATLAB, 256 lines - NIfTI_20140122/
mat_into_hdr.m , MATLAB, 83 lines - NIfTI_20140122/
pad_nii.m , MATLAB, 142 lines - NIfTI_20140122/
reslice_nii.m , MATLAB, 321 lines - NIfTI_20140122/
rri_file_menu.m , MATLAB, 179 lines - NIfTI_20140122/
rri_orient.m , MATLAB, 106 lines - NIfTI_20140122/
rri_orient_ui.m , MATLAB, 251 lines - NIfTI_20140122/
rri_select_file.m , MATLAB, 636 lines - NIfTI_20140122/
rri_xhair.m , MATLAB, 92 lines - NIfTI_20140122/
rri_zoom_menu.m , MATLAB, 33 lines - NIfTI_20140122/
save_nii.m , MATLAB, 286 lines - NIfTI_20140122/
save_nii_ext.m , MATLAB, 38 lines - NIfTI_20140122/
save_nii_hdr.m , MATLAB, 227 lines - NIfTI_20140122/
save_untouch0_nii_hdr.m , MATLAB, 219 lines - NIfTI_20140122/
save_untouch_header_only , MATLAB, 71 lines.m - NIfTI_20140122/
save_untouch_nii.m , MATLAB, 232 lines - NIfTI_20140122/
save_untouch_nii_hdr.m , MATLAB, 207 lines - NIfTI_20140122/
save_untouch_slice.m , MATLAB, 580 lines - NIfTI_20140122/
unxform_nii.m , MATLAB, 40 lines - NIfTI_20140122/
verify_nii_ext.m , MATLAB, 45 lines - NIfTI_20140122/
view_nii.m , MATLAB, 4,873 lines - NIfTI_20140122/
view_nii_menu.m , MATLAB, 480 lines - NIfTI_20140122/
xform_nii.m , MATLAB, 521 lines - accuracy_and_rt_outliers
.m , MATLAB, 101 lines - behavioural_statistics.m
, MATLAB, 144 lines - cor2mni.m, MATLAB, 35 lines
- ernst_angle_calculations
.m , MATLAB, 479 lines - firstlevel_glm.m, MATLAB, 335 lines, 1 match
- firstlevel_glm_ernst.m, MATLAB, 186 lines, 1 match
- firstlevel_glm_mvpa.m, MATLAB, 275 lines, 1 match
- firstlevel_glm_native.m, MATLAB, 156 lines
- get_label.m, MATLAB, 39 lines
- heuristics_main.py, Python, 82 lines
- make_contour_map.m, MATLAB, 50 lines
- make_design_matrix.m, MATLAB, 13 lines
- make_design_matrix_mvpa.
m , MATLAB, 101 lines - make_mean_EPI.sh, Shell, 23 lines
- matlab/
crop/ , MATLAB, 89 linescrop_images.m - matlab/
crop/ , MATLAB, 147 linesnii_clip2bb.m - matlab/
crop/ , MATLAB, 150 linesnii_setOrigin12x.m - matlab/
crop/ , MATLAB, 38 linesnii_ungz.m - matlab/
mp2rage_proc.m , MATLAB, 135 lines, 1 match - matlab/
mp2rage_scripts/ , MATLAB, 38 linesDemoCalculateM0estimate. m - matlab/
mp2rage_scripts/ , MATLAB, 33 linesDemoCalculateT1estimate. m - matlab/
mp2rage_scripts/ , MATLAB, 42 linesDemoCalculateT1estimate_ PSJ.m - matlab/
mp2rage_scripts/ , MATLAB, 62 linesDemoForR1Correction.m - matlab/
mp2rage_scripts/ , MATLAB, 40 lines, 1 matchDemoRemoveBackgroundNois e.m - matlab/
mp2rage_scripts/ , MATLAB, 42 linesfunc/ B1mappingSa2RAGElookupta ble.m - matlab/
mp2rage_scripts/ , MATLAB, 81 linesfunc/ MP2RAGE_lookuptable.m - matlab/
mp2rage_scripts/ , MATLAB, 145 linesfunc/ MPRAGEfunc.m - matlab/
mp2rage_scripts/ , MATLAB, 96 linesfunc/ Orthoview.m - matlab/
mp2rage_scripts/ , MATLAB, 163 linesfunc/ RobustCombination.m - matlab/
mp2rage_scripts/ , MATLAB, 242 linesfunc/ T1B1correctpackage.m - matlab/
mp2rage_scripts/ , MATLAB, 301 linesfunc/ T1B1correctpackageTFL.m - matlab/
mp2rage_scripts/ , MATLAB, 68 lines, 1 matchfunc/ T1M0estimateMP2RAGE.m - matlab/
mp2rage_scripts/ , MATLAB, 55 lines, 1 matchfunc/ T1estimateMP2RAGE.m - matlab/
mp2rage_scripts/ , MATLAB, 9 linesfunc/ figureJ.m - matlab/
mp2rage_scripts/ , MATLAB, 64 linesfunc/ plotMP2RAGEproperties.m - matlab/
mp2rage_scripts/ , MATLAB, 207 linesnii_func/ load_nii_ext.m - matlab/
mp2rage_scripts/ , MATLAB, 280 linesnii_func/ load_nii_hdr.m - matlab/
mp2rage_scripts/ , MATLAB, 200 linesnii_func/ load_untouch0_nii_hdr.m - matlab/
mp2rage_scripts/ , MATLAB, 191 linesnii_func/ load_untouch_nii.m - matlab/
mp2rage_scripts/ , MATLAB, 217 linesnii_func/ load_untouch_nii_hdr.m - matlab/
mp2rage_scripts/ , MATLAB, 468 linesnii_func/ load_untouch_nii_img.m - matlab/
mp2rage_scripts/ , MATLAB, 38 linesnii_func/ save_nii_ext.m - matlab/
mp2rage_scripts/ , MATLAB, 219 linesnii_func/ save_untouch0_nii_hdr.m - matlab/
mp2rage_scripts/ , MATLAB, 232 linesnii_func/ save_untouch_nii.m - matlab/
mp2rage_scripts/ , MATLAB, 207 linesnii_func/ save_untouch_nii_hdr.m - matlab/
mp2rage_scripts/ , MATLAB, 45 linesnii_func/ verify_nii_ext.m - matlab/
mp2rage_scripts/ , MATLAB, 46 linesremovebackgroundnoise.m - matlab/
mp2rage_scripts/ , MATLAB, 31 linesspm_imcalc_exp.m - mni2cor.m, MATLAB, 39 lines
- motion_outliers.m, MATLAB, 55 lines, 1 match
- riksneurotools-master/
GLM/ , MATLAB, 677 linescheck_pooled_error.m - riksneurotools-master/
GLM/ , MATLAB, 352 linesfMRI_GLM_efficiency.m - riksneurotools-master/
GLM/ , MATLAB, 431 linesfMRI_multitrial_GLMs.m - riksneurotools-master/
GLM/ , MATLAB, 147 linesglm.m - riksneurotools-master/
GLM/ , MATLAB, 192 linesrepanova.m - riksneurotools-master/
GLM/ , MATLAB, 685 linesrsfMRI_GLM.m - riksneurotools-master/
GLM/ , MATLAB, 207 linest_matrix.m - riksneurotools-master/
SPM/ , MATLAB, 359 linesbatch_spm_anova.m - riksneurotools-master/
Util/ , MATLAB, 229 linesroi_extract.m - secondlevel_glm.m, MATLAB, 460 lines, 1 match
- secondlevel_glm_roi.m, MATLAB, 1,624 lines, 4 matches
- slice_leakage_apply_tran
sforms.sh , Shell, 39 lines - slice_leakage_make_volum
e_mask.m , MATLAB, 10 lines - slice_leakage_statistics
.m , MATLAB, 408 lines - slice_out.py, Python, 3 lines
- sub_7Tpilot_ME.sh, Shell, 173 lines, 3 matches
- sub_7Tpilot_ME_and_SE.sh
, Shell, 33 lines - sub_7Tpilot_ME_and_SE_sl
ice_leakage.sh , Shell, 32 lines - sub_7Tpilot_ME_slice_lea
kage.sh , Shell, 147 lines, 1 match - sub_7Tpilot_SE.sh, Shell, 135 lines, 2 matches
- sub_7Tpilot_SE_slice_lea
kage.sh , Shell, 105 lines - sub_job.sh, Shell, 54 lines
- sub_matlabjob.sh, Shell, 19 lines
- tSNR.sh, Shell, 37 lines
- README.md, Text, 1 line
mrc-cbu/riksneurotools
f8b948f0dd465a1af2deedebd050b195ec077a83, 26 January 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
19 files
- Conn/
connectivity_stats.m , MATLAB, 244 lines - Conn/
dcor_dc.m , MATLAB, 28 lines - Conn/
dcor_uc.m , MATLAB, 44 lines - Conn/
rsfMRI_GLM.m , MATLAB, 685 lines - GLM/
check_pooled_error.m , MATLAB, 677 lines - GLM/
fMRI_GLM_efficiency.m , MATLAB, 352 lines - GLM/
fMRI_multitrial_GLMs.m , MATLAB, 368 lines - GLM/
glm.m , MATLAB, 147 lines - GLM/
repanova.m , MATLAB, 192 lines - GLM/
rsfMRI_GLM.m , MATLAB, 685 lines - GLM/
t_matrix.m , MATLAB, 207 lines - MEEG/
detect_ICA_artefacts.m , MATLAB, 339 lines - MEEG/
fuse_lfp.m , MATLAB, 395 lines - MEEG/
get_vertices_fmri.m , MATLAB, 105 lines - MEEG/
get_vertices_xyz.m , MATLAB, 77 lines - SPM/
batch_spm_anova.m , MATLAB, 361 lines - Util/
roi_extract.m , MATLAB, 229 lines - LICENSE, License, 674 lines
- README.md, Text, 35 lines
DrMichaelLindner/MAP4SL
84572d4713df513a6d78cb5c829c1e91288a6138, 7 November 2018Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
3 files
- MAP4SL.m, MATLAB, 918 lines
- LICENSE.txt, License, 397 lines
- README.md, Text, 93 lines
mrc-cbu.cam.ac.uk/publications/opendata
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://
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://
BibTeX
@article{frisby2026optim
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/
url = {https://
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/
VL - 47
IS - 11
SP - e70621
SN - 1065-9471
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"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":
"volume": "47",
"issue": "11",
"page": "e70621",
"DOI": "10.1002/
"PMID": "42574053",
"PMCID": "PMC13456059",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://
"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 communicationsIn 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: NeuronIn 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 mappingIn 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 communicationsIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 4 repositories of the authors' code, each at its verified commit and with its license, 139 scripts, and 22 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:14abe9eff0779890…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
