help > questions on conditions setup and contrasts
Showing 1-3 of 3 posts
Display:
Results per page:
Sep 21, 2022  12:09 PM | Samantha Baldi
questions on conditions setup and contrasts
Dear Alfonso, 

I have some (probably very basic) questions on how to correctly set up different conditions and contrasts using conn_batch.m.

Study design: 9 subjects underwent TMS on 3 different days. Each day, they had 1 resting-state scan before TMS ("PRE"), and 2 resting-state scans after TMS ("POST1","POST2"), for a total of 9 resting-state scans per subject. 

1) SETUP: from reading the forum and the conn_batch_workshop_nyudataset.m example, I set up the conditions as follow: 


batch.Setup.conditions.names=[{'rest'}, sesh{:}]; 

 for ncond=1,for nsub=1:NSUBJECTS,for nses=1:NSESSIONS

batch.Setup.conditions.onsets{ncond}{nsub}{nses}=0; batch.Setup.conditions.durations{ncond}{nsub}{nses}=inf;

end;end;end
for ncond=1:NSESSIONS 
for nsub=1:NSUBJECTS
for nses=1:NSESSIONS
batch.Setup.conditions.onsets{1+ncond}{nsub}{nses}=[];
batch.Setup.conditions.durations{1+ncond}{nsub}{nses}=[];
end
for nses=ncond
batch.Setup.conditions.onsets{1+ncond}{nsub}{nses}=0;
batch.Setup.conditions.durations{1+ncond}{nsub}{nses}=inf;
end
end
end

I then however have 10 conditions instead of 9, and all subsequent steps generate 10 files per subject. I wonder whether this is correct? Is the 'rest' condition necessary? What does it represent? Is it just a file with all 9 sessions concatenated that I can ignore?

2) DENOISING: I set up the denoising step as follow:

batch.Denoising.filter=[0.01, 0.10]; 
batch.Denoising.detrending=2;
batch.Denoising.confounds.names={'White Matter','CSF','realignment','scrubbing'};
batch.Denoising.confounds.dimensions={5,5,12,};
batch.Denoising.confounds.deriv={0,0,0,0};

Should I however leave the confounds to the default, thus also including 'Effect of *' ? 

3) SECOND-LEVEL CONTRASTS: When setting up second-level contrasts, can I investigate specific conditions only without having to specify and then 0 all the others? 
e.g. batch.Results.between_conditions.effect_names={'sham_pre','sham_post_run1'}; 
batch.Results.between_conditions.contrast=[1 -1; -1 1];

Thanks in advance for the help!

Best, 
Samantha
Sep 26, 2022  10:09 PM | Alfonso Nieto-Castanon - Boston University
RE: questions on conditions setup and contrasts
Dear Samantha,

Regarding (1), yes, those look perfectly fine, and you are right that your 'rest' condition is just going to be using the data concatenated across all sessions, so you can safely simply ignore it in your analyses.

Regarding (2) that is perfectly fine as well, for resting state analyses, the 'effect of *' conditions are simply correcting for potential short transients at the beginning of each run, so if your scanner is (probably) already removing the first few scans or if you have checked your data and do not see any indications of potential ramping effects at the beginning of your runs, then it is perfectly fine to skip those 'effect of *' regressors during denoising.

And regarding (3), yes, it is perfectly fine to simply enter a subset (not all) of conditions in your second-level analyses instead of having to enter all conditions and fill with 0's their corresponding contrast values (the two ways of doing those analyses should produce exactly the same results)

Best
Alfonso

Originally posted by Samantha Baldi:
Dear Alfonso, 

I have some (probably very basic) questions on how to correctly set up different conditions and contrasts using conn_batch.m.

Study design: 9 subjects underwent TMS on 3 different days. Each day, they had 1 resting-state scan before TMS ("PRE"), and 2 resting-state scans after TMS ("POST1","POST2"), for a total of 9 resting-state scans per subject. 

1) SETUP: from reading the forum and the conn_batch_workshop_nyudataset.m example, I set up the conditions as follow: 


batch.Setup.conditions.names=[{'rest'}, sesh{:}]; 

 for ncond=1,for nsub=1:NSUBJECTS,for nses=1:NSESSIONS

batch.Setup.conditions.onsets{ncond}{nsub}{nses}=0; batch.Setup.conditions.durations{ncond}{nsub}{nses}=inf;

end;end;end
for ncond=1:NSESSIONS 
for nsub=1:NSUBJECTS
for nses=1:NSESSIONS
batch.Setup.conditions.onsets{1+ncond}{nsub}{nses}=[];
batch.Setup.conditions.durations{1+ncond}{nsub}{nses}=[];
end
for nses=ncond
batch.Setup.conditions.onsets{1+ncond}{nsub}{nses}=0;
batch.Setup.conditions.durations{1+ncond}{nsub}{nses}=inf;
end
end
end

I then however have 10 conditions instead of 9, and all subsequent steps generate 10 files per subject. I wonder whether this is correct? Is the 'rest' condition necessary? What does it represent? Is it just a file with all 9 sessions concatenated that I can ignore?

2) DENOISING: I set up the denoising step as follow:

batch.Denoising.filter=[0.01, 0.10]; 
batch.Denoising.detrending=2;
batch.Denoising.confounds.names={'White Matter','CSF','realignment','scrubbing'};
batch.Denoising.confounds.dimensions={5,5,12,};
batch.Denoising.confounds.deriv={0,0,0,0};

Should I however leave the confounds to the default, thus also including 'Effect of *' ? 

3) SECOND-LEVEL CONTRASTS: When setting up second-level contrasts, can I investigate specific conditions only without having to specify and then 0 all the others? 
e.g. batch.Results.between_conditions.effect_names={'sham_pre','sham_post_run1'}; 
batch.Results.between_conditions.contrast=[1 -1; -1 1];

Thanks in advance for the help!

Best, 
Samantha
Sep 27, 2022  12:09 PM | Samantha Baldi
RE: questions on conditions setup and contrasts
Dear Alfonso, 

thank you for the clarifications!

I have some further questions about second-level contrasts between conditions, but for single-subject analyses.
I came across a few useful posts on the forum that provide a code for seed-to-voxel functional connectivity maps (https://github.com/lrq3000/csg_mri_pipel...), and I adapted this script to apply the same method and function to other connectivity measures (e.g. LCOR, ALFF). I am also interested in ROI-to-ROI functional connectivity.

I wonder is this the best approach to follow? Is there maybe any way to adapt the conn_module function to single-subject analysis?
Or, following the script above, how can I apply other thresholding methods than conn_fdr (e.g. any of those that can be accessed via the results explorer window for population-level second-level analyses)? 

Thank you in advance!
Best, 
Samantha