diff --git a/demos/openneuro/ds000001_run.m b/demos/openneuro/ds000001_run.m index a8b7f066..02b53077 100644 --- a/demos/openneuro/ds000001_run.m +++ b/demos/openneuro/ds000001_run.m @@ -12,21 +12,27 @@ WD = fileparts(mfilename('fullpath')); % we add all the subfunctions that are in the sub directories -addpath(fullfile(WD, '..')); -addpath(genpath(fullfile(WD, '..', 'src'))); -addpath(genpath(fullfile(WD, '..', 'lib'))); +addpath(genpath(fullfile(WD, '..', '..', 'src'))); +addpath(genpath(fullfile(WD, '..', '..', 'lib'))); %% Set options opt = ds000001_getOption(); checkDependencies(); -%% Run batches -isMVPA = 0; +reportBIDS(opt); + +bidsCopyRawFolder(opt, 1); + +bidsSTC(opt); -% bidsCopyRawFolder(opt, 1); bidsSpatialPrepro(opt); + +anatomicalQA(opt); + bidsSmoothing(FWHM, opt); -% bidsFFX('specifyAndEstimate', opt, FWHM, isMVPA); -% bidsFFX('contrasts', opt, FWHM, isMVPA); -% bidsResults(opt, FWHM, [], isMVPA); + +% Not implemented yet +% bidsFFX('specifyAndEstimate', opt, FWHM); +% bidsFFX('contrasts', opt, FWHM); +% bidsResults(opt, FWHM); diff --git a/demos/openneuro/ds000114_getOption.m b/demos/openneuro/ds000114_getOption.m index 816f0561..4630dca9 100644 --- a/demos/openneuro/ds000114_getOption.m +++ b/demos/openneuro/ds000114_getOption.m @@ -20,6 +20,8 @@ opt.anatReference.type = 'T1w'; opt.anatReference.session = 2; + opt.space = 'individual'; + opt.model.file = fullfile(fileparts(mfilename('fullpath')), ... 'models', ... 'model-ds000114-linebisection_smdl.json'); diff --git a/demos/openneuro/ds000114_run.m b/demos/openneuro/ds000114_run.m index c0fcbe27..bd682bbe 100644 --- a/demos/openneuro/ds000114_run.m +++ b/demos/openneuro/ds000114_run.m @@ -12,27 +12,21 @@ WD = fileparts(mfilename('fullpath')); % we add all the subfunctions that are in the sub directories -addpath(fullfile(WD, '..')); -addpath(genpath(fullfile(WD, '..', 'src'))); -addpath(genpath(fullfile(WD, '..', 'lib'))); +addpath(genpath(fullfile(WD, '..', '..', 'src'))); +addpath(genpath(fullfile(WD, '..', '..', 'lib'))); %% Set options opt = ds000114_getOption(); -% the line below allows to run preprocessing in "native" space. -% - use realign and unwarp -% - don't do normalization -opt.space = 'individual'; - checkDependencies(); %% Run batches reportBIDS(opt); -bidsCopyRawFolder(opt, 1); - -bidsSTC(opt); +% bidsCopyRawFolder(opt, 1); +% +% bidsSTC(opt); bidsSpatialPrepro(opt); @@ -44,4 +38,4 @@ bidsFFX('specifyAndEstimate', opt, FWHM); bidsFFX('contrasts', opt, FWHM); -bidsResults(opt, FWHM, []); +bidsResults(opt, FWHM); diff --git a/demos/openneuro/ds001168_getOption.m b/demos/openneuro/ds001168_getOption.m index 2f0ce7b8..1183b3ca 100644 --- a/demos/openneuro/ds001168_getOption.m +++ b/demos/openneuro/ds001168_getOption.m @@ -20,10 +20,10 @@ opt.anatReference.type = 'T1w'; opt.anatReference.session = 1; - opt.ignoreFieldmaps = false; + opt.space = 'individual'; %% DO NOT TOUCH opt = checkOptions(opt); - % saveOptions(opt); + saveOptions(opt); end diff --git a/demos/openneuro/ds001168_run.m b/demos/openneuro/ds001168_run.m index 305e1a10..f37e6503 100644 --- a/demos/openneuro/ds001168_run.m +++ b/demos/openneuro/ds001168_run.m @@ -12,18 +12,12 @@ WD = fileparts(mfilename('fullpath')); % we add all the subfunctions that are in the sub directories -addpath(fullfile(WD, '..')); -addpath(genpath(fullfile(WD, '..', 'src'))); -addpath(genpath(fullfile(WD, '..', 'lib'))); +addpath(genpath(fullfile(WD, '..', '..', 'src'))); +addpath(genpath(fullfile(WD, '..', '..', 'lib'))); %% Set options opt = ds001168_getOption(); -% the line below allows to run preprocessing in "native" space. -% - use realign and unwarp -% - don't do normalization -opt.space = 'individual'; - checkDependencies(); %% Run batches @@ -41,9 +35,10 @@ anatomicalQA(opt); bidsResliceTpmToFunc(opt); functionalQA(opt); -% -% bidsSmoothing(FWHM, opt); -% + +bidsSmoothing(FWHM, opt); + +% Not implemented yet % bidsFFX('specifyAndEstimate', opt, FWHM); % bidsFFX('contrasts', opt, FWHM); % bidsResults(opt, FWHM, []); diff --git a/demos/vismotion/batch.m b/demos/vismotion/batch.m index d57c8cd3..b55f7004 100644 --- a/demos/vismotion/batch.m +++ b/demos/vismotion/batch.m @@ -7,35 +7,49 @@ WD = fileparts(mfilename('fullpath')); % we add all the subfunctions that are in the sub directories -addpath(fullfile(WD, '..')); -addpath(genpath(fullfile(WD, '..', 'src'))); -addpath(genpath(fullfile(WD, '..', 'lib'))); +addpath(genpath(fullfile(WD, '..', '..', 'src'))); +addpath(genpath(fullfile(WD, '..', '..', 'lib'))); %% Run batches opt = getOption(); checkDependencies(); -% copy raw folder into derivatives folder -% BIDS_copyRawFolder(opt, 1) +reportBIDS(opt); -% preprocessing -% BIDS_STC(opt); -% BIDS_SpatialPrepro(opt); -% BIDS_Smoothing(6, opt); +bidsCopyRawFolder(opt, 1); +% +% % preprocessing +bidsSTC(opt); +bidsSpatialPrepro(opt); + +% Quality control +anatomicalQA(opt); + +% Not implemented yet +% bidsResliceTpmToFunc(opt); +% functionalQA(opt); + +funcFWHM = 6; +bidsSmoothing(funcFWHM, opt); % subject level Univariate -% BIDS_FFX(1, 6, opt); -% BIDS_FFX(2, 6, opt); +bidsFFX('specifyAndEstimate', opt, funcFWHM); +bidsFFX('contrasts', opt, funcFWHM); % group level univariate -BIDS_RFX(1, 6, 6); -BIDS_RFX(2, 6, 6); +conFWHM = 6; +bidsRFX('smoothContrasts', funcFWHM, conFWHM, opt); -BIDS_Results(6, 6, opt, 0); +% Not implemented yet +% bidsRFX('RFX', funcFWHM, conFWHM, opt); +% Not implemented yet % subject level multivariate -% isMVPA=1; -% BIDS_FFX(1, 6, opt, isMVPA); -% BIDS_FFX(2, 6, opt, isMVPA); -% make4Dmaps(6,opt) +% opt.model.file = fuufile(WD, ... +% 'models', ... +% 'model-motionDecodingMultivariate_smdl.json'); +% +% bidsFFX('specifyAndEstimate', opt, funcFWHM); +% bidsFFX('contrasts', opt, funcFWHM); +% concatBetaImgTmaps(funcFWHM, opt); diff --git a/demos/vismotion/getOption.m b/demos/vismotion/getOption.m index f0897b52..978fd724 100644 --- a/demos/vismotion/getOption.m +++ b/demos/vismotion/getOption.m @@ -13,11 +13,12 @@ opt.taskName = 'visMotion'; % The directory where the data are located - opt.dataDir = '/home/remi/BIDS/visMotion/derivatives/'; + opt.dataDir = '/home/remi/gin/CPP_visMotion/raw'; + opt.derivativesDir = '/home/remi/Documents'; % specify the model file that contains the contrasts to compute opt.model.file = ... - '/home/remi/github/CPP_BIDS_SPM_pipeline/model-visMotionLoc_smdl.json'; + '/home/remi/github/CPP_BIDS_SPM_pipeline/demos/vismotion/models/model-visMotionLoc_smdl.json'; % specify the result to compute % Contrasts.Name has to match one of the contrast defined in the model json file diff --git a/demos/vismotion/models/model-visMotionLoc_smdl.json b/demos/vismotion/models/model-visMotionLoc_smdl.json index 36468a79..012d17a4 100644 --- a/demos/vismotion/models/model-visMotionLoc_smdl.json +++ b/demos/vismotion/models/model-visMotionLoc_smdl.json @@ -5,18 +5,22 @@ "task": "visMotion" }, "Steps": [ + { + "Level": "run", + "Model": { + "X": [ + "trial_type.VisMot", + "trial_type.VisStat", + "trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z" + ] + } + }, { "Level": "subject", "Model": { "X": [ - "trial_type.Vis_U", - "trial_type.Vis_D", - "trial_type.Vis_R", - "trial_type.Vis_L", - "trial_type.Aud_U", - "trial_type.Aud_D", - "trial_type.Aud_L", - "trial_type.Aud_R", + "trial_type.VisMot", + "trial_type.VisStat", "trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z" ] }, @@ -42,7 +46,11 @@ }, { "Level": "dataset", - "AutoContrasts": ["trial_type.VisMot", "trial_type.VisStat", "VisMot_gt_VisStat", "VisStat_gt_VisMot"] + "AutoContrasts": [ + "trial_type.VisMot", + "trial_type.VisStat", + "VisMot_gt_VisStat", + "VisStat_gt_VisMot"] } ] } diff --git a/version.txt b/version.txt index 8ce995b8..9ff151c5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v0.0.3 \ No newline at end of file +v0.1.0 \ No newline at end of file