Skip to content
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

[FIX] make sure that multi task GLM can be run #1310

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions demos/openneuro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ data_ds000114_verbal: data_ds000114_fmriprep
cd inputs && datalad install ///openneuro/ds000114
cd inputs/ds000114-fmriprep && datalad get sub-0[1-2]/anat/*MNI*desc-preproc*.nii.gz -J 12
cd inputs/ds000114-fmriprep && datalad get sub-0[1-2]/ses-*/func/*MNI*_mask.nii.gz -J 12
cd inputs/ds000114-fmriprep && datalad get sub-0[1-2]/ses-*/func/*verb*MNI*desc-preproc*bold.nii.gz -J 12
cd inputs/ds000114-fmriprep && datalad get sub-0[1-2]/ses-*/func/*word*MNI*desc-preproc*bold.nii.gz -J 12
cd inputs/ds000114-fmriprep && datalad get sub-0[1-2]/ses-*/func/*overt*MNI*desc-preproc*bold.nii.gz -J 12

data_ds000114: data_ds000114_fmriprep
mkdir -p inputs
Expand Down
3 changes: 1 addition & 2 deletions demos/openneuro/ds000114_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
'model-ds000114_desc-testRetestLineBisection_smdl.json');
case 'verbal'
task = {'overtverbgeneration', ...
'overtwordrepetition', ...
'covertverbgeneration'};
'overtwordrepetition'};

opt = struct([]);

Expand Down
14 changes: 10 additions & 4 deletions src/batches/stats/setBatchSubjectLevelGLMSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,15 @@
spmSess = struct('scans', '', 'onsetsFile', '', 'counfoundMatFile', '');
spmSessCounter = 1;

opt_for_query = opt;

for iTask = 1:numel(opt.taskName)

opt.query.task = opt.taskName{iTask};
opt_for_query.query.task = opt_for_query.taskName{iTask};

for iSes = 1:nbSessions

[runs, nbRuns] = getInfo(BIDS, subLabel, opt, 'Runs', sessions{iSes});
[runs, nbRuns] = getInfo(BIDS, subLabel, opt_for_query, 'Runs', sessions{iSes});

for iRun = 1:nbRuns

Expand All @@ -116,7 +118,11 @@
logger('INFO', msg, 'options', opt, 'filename', mfilename());
end

spmSess(spmSessCounter).scans = getBoldFilenameForFFX(BIDS, opt, subLabel, iSes, iRun);
spmSess(spmSessCounter).scans = getBoldFilenameForFFX(BIDS, ...
opt_for_query, ...
subLabel, ...
iSes, ...
iRun);

runDuration = getRunDuration(opt, spmSess(spmSessCounter).scans, TR);

Expand All @@ -131,7 +137,7 @@

% get confounds
confoundsRegFile = getConfoundsRegressorFilename(BIDS, ...
opt, ...
opt_for_query, ...
subLabel, ...
sessions{iSes}, ...
runs{iRun});
Expand Down
Loading