From da14a7b4fc1170d32f1ed8db9158e32090de6382 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 31 Oct 2020 22:29:57 +0100 Subject: [PATCH 1/5] update version.txt --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0714847acc87863b56b839dd545afa6f0709cd35 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 31 Oct 2020 22:30:26 +0100 Subject: [PATCH 2/5] update demo 1168 --- demos/openneuro/ds001168_getOption.m | 4 ++-- demos/openneuro/ds001168_run.m | 16 +++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) 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..de1c5594 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,9 @@ anatomicalQA(opt); bidsResliceTpmToFunc(opt); functionalQA(opt); -% -% bidsSmoothing(FWHM, opt); -% + +bidsSmoothing(FWHM, opt); + % bidsFFX('specifyAndEstimate', opt, FWHM); % bidsFFX('contrasts', opt, FWHM); % bidsResults(opt, FWHM, []); From 231c16459e08c4e39b75516df32f100e9c09a1df Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 1 Nov 2020 00:01:10 +0100 Subject: [PATCH 3/5] update demo ds 114 --- demos/openneuro/ds000001_run.m | 24 +++++++++++++++--------- demos/openneuro/ds000114_getOption.m | 2 ++ demos/openneuro/ds000114_run.m | 18 ++++++------------ demos/openneuro/ds001168_run.m | 1 + 4 files changed, 24 insertions(+), 21 deletions(-) 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..861115fe 100644 --- a/demos/openneuro/ds000114_getOption.m +++ b/demos/openneuro/ds000114_getOption.m @@ -19,6 +19,8 @@ opt.anatReference.type = 'T1w'; opt.anatReference.session = 2; + + opt.space = 'individual'; opt.model.file = fullfile(fileparts(mfilename('fullpath')), ... 'models', ... diff --git a/demos/openneuro/ds000114_run.m b/demos/openneuro/ds000114_run.m index c0fcbe27..ca8e05f2 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_run.m b/demos/openneuro/ds001168_run.m index de1c5594..f37e6503 100644 --- a/demos/openneuro/ds001168_run.m +++ b/demos/openneuro/ds001168_run.m @@ -38,6 +38,7 @@ bidsSmoothing(FWHM, opt); +% Not implemented yet % bidsFFX('specifyAndEstimate', opt, FWHM); % bidsFFX('contrasts', opt, FWHM); % bidsResults(opt, FWHM, []); From 637d36e2041bb5e451a009103fff4dc84837ec67 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 1 Nov 2020 00:49:35 +0100 Subject: [PATCH 4/5] fix visMotion demo --- demos/vismotion/batch.m | 50 ++++++++++++------- demos/vismotion/getOption.m | 5 +- .../models/model-visMotionLoc_smdl.json | 26 ++++++---- 3 files changed, 52 insertions(+), 29 deletions(-) diff --git a/demos/vismotion/batch.m b/demos/vismotion/batch.m index d57c8cd3..2f12161c 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"] } ] } From c26a07902826cb0046aca7e6c9213c875cbb3be5 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 1 Nov 2020 00:50:10 +0100 Subject: [PATCH 5/5] mh fix --- demos/openneuro/ds000114_getOption.m | 2 +- demos/openneuro/ds000114_run.m | 2 +- demos/vismotion/batch.m | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/openneuro/ds000114_getOption.m b/demos/openneuro/ds000114_getOption.m index 861115fe..4630dca9 100644 --- a/demos/openneuro/ds000114_getOption.m +++ b/demos/openneuro/ds000114_getOption.m @@ -19,7 +19,7 @@ opt.anatReference.type = 'T1w'; opt.anatReference.session = 2; - + opt.space = 'individual'; opt.model.file = fullfile(fileparts(mfilename('fullpath')), ... diff --git a/demos/openneuro/ds000114_run.m b/demos/openneuro/ds000114_run.m index ca8e05f2..bd682bbe 100644 --- a/demos/openneuro/ds000114_run.m +++ b/demos/openneuro/ds000114_run.m @@ -25,7 +25,7 @@ reportBIDS(opt); % bidsCopyRawFolder(opt, 1); -% +% % bidsSTC(opt); bidsSpatialPrepro(opt); diff --git a/demos/vismotion/batch.m b/demos/vismotion/batch.m index 2f12161c..b55f7004 100644 --- a/demos/vismotion/batch.m +++ b/demos/vismotion/batch.m @@ -18,7 +18,7 @@ reportBIDS(opt); bidsCopyRawFolder(opt, 1); -% +% % % preprocessing bidsSTC(opt); bidsSpatialPrepro(opt); @@ -49,7 +49,7 @@ % opt.model.file = fuufile(WD, ... % 'models', ... % 'model-motionDecodingMultivariate_smdl.json'); -% +% % bidsFFX('specifyAndEstimate', opt, funcFWHM); % bidsFFX('contrasts', opt, funcFWHM); % concatBetaImgTmaps(funcFWHM, opt);