Skip to content

Commit

Permalink
fix multi task (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau authored Aug 18, 2024
1 parent e3261be commit d7014f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
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

0 comments on commit d7014f0

Please sign in to comment.