-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UK24] Reproduction #161
[UK24] Reproduction #161
Conversation
@bclenet: This PR includes pseudo-code to reproduce the preprocessing and the subject-level statistical analysis (the group level should be identical to other SPM team). Can I leave it to you to translate this onto nipype? Happy to help if youb have any questions on the parametrization done in the matlabbatch. Thanks! |
I am keeping notes of some thoughts I had after completing the batch: Part of the reproduction that we could adapt:
Things to check if the correlations are not as expected:
|
% no-loss-nor-gain block-task regressor a single extra parametric | ||
% modulation regressor was added to model the parametric size of the | ||
% reaction time. | ||
% All parametric modulation regressors were mean centered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the mean value computed for each run, or one for all runs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bclenet 'mean centering' should be done automatically as part of the design (this is an option in the model). I can't open Matlab (no more licenses) but I'll check as soon as I can :)
matlabbatch{end+1}.spm.stats.fmri_spec.dir = '<UNDEFINED>'; | ||
matlabbatch{end}.spm.stats.fmri_spec.timing.units = 'secs'; | ||
matlabbatch{end}.spm.stats.fmri_spec.timing.RT = '<UNDEFINED>'; | ||
matlabbatch{end}.spm.stats.fmri_spec.timing.fmri_t = 16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of these parameters (fmri_t
and fmri_t0
) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I should have removed from the matlabbatch as this is just the default value.
For info (as this might be useful for other parameters), each parameter of fMRI specification is described in this file: https://github.com/spm/spm12/blob/main/config/spm_cfg_fmri_spec.m (and in correspondant spm_cfg_xxx
for each of the matlabbatch modules).
% Below we should include the 'onset' values from sub-001_task-MGT_run-01_events | ||
% for which we have participant_response=accept (either weakly or strongly) | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(2).onset = '<UNDEFINED>'; | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(2).duration = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the duration should be 4, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think you are right!
% Below we should include the 'RT' values from sub-001_task-MGT_run-01_events | ||
% for which we have participant_response=reject (either weakly or strongly) | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(3).onset = '<UNDEFINED>'; | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(3).duration = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the duration should be 4, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, same!
|
||
% 4 - Functional MRI volume realignment: first realigning all 4 'sbref' | ||
% images to the one acquired before the first run; followed by realignment | ||
% of all volumes in a particular run to the first image in that run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, first image in that run
does not refer to the sbref file, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Though the first image in the run and the sbref should be very close.
% for which we have participant_response=accept (either weakly or strongly) | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(2).pmod(2).param = '<UNDEFINED>'; | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(2).pmod(2).poly = 1; | ||
matlabbatch{end}.spm.stats.fmri_spec.sess.cond(2).orth = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find the corresponding parameter in nipype
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding this thread @bclenet! As far as I can tell here we are trying to keep the orthogonolisation which seems to be the default (it looks like it's the switching off that is not implemented yet). If that's true then we should be able to proceed.
Closing this PR, as the matlab code was ported to #179 |
This Pull Request is related to issue #60.
Changes proposed in this Pull Request:
Checklist:
main
branch