Skip to content

Commit 0d5d1db

Browse files
authored
Merge pull request #149 from Remi-Gau/dev
[FIX] update demos
2 parents 4a23f71 + c26a079 commit 0d5d1db

File tree

9 files changed

+84
-64
lines changed

9 files changed

+84
-64
lines changed

demos/openneuro/ds000001_run.m

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,27 @@
1212
WD = fileparts(mfilename('fullpath'));
1313

1414
% we add all the subfunctions that are in the sub directories
15-
addpath(fullfile(WD, '..'));
16-
addpath(genpath(fullfile(WD, '..', 'src')));
17-
addpath(genpath(fullfile(WD, '..', 'lib')));
15+
addpath(genpath(fullfile(WD, '..', '..', 'src')));
16+
addpath(genpath(fullfile(WD, '..', '..', 'lib')));
1817

1918
%% Set options
2019
opt = ds000001_getOption();
2120

2221
checkDependencies();
2322

24-
%% Run batches
25-
isMVPA = 0;
23+
reportBIDS(opt);
24+
25+
bidsCopyRawFolder(opt, 1);
26+
27+
bidsSTC(opt);
2628

27-
% bidsCopyRawFolder(opt, 1);
2829
bidsSpatialPrepro(opt);
30+
31+
anatomicalQA(opt);
32+
2933
bidsSmoothing(FWHM, opt);
30-
% bidsFFX('specifyAndEstimate', opt, FWHM, isMVPA);
31-
% bidsFFX('contrasts', opt, FWHM, isMVPA);
32-
% bidsResults(opt, FWHM, [], isMVPA);
34+
35+
% Not implemented yet
36+
% bidsFFX('specifyAndEstimate', opt, FWHM);
37+
% bidsFFX('contrasts', opt, FWHM);
38+
% bidsResults(opt, FWHM);

demos/openneuro/ds000114_getOption.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
opt.anatReference.type = 'T1w';
2121
opt.anatReference.session = 2;
2222

23+
opt.space = 'individual';
24+
2325
opt.model.file = fullfile(fileparts(mfilename('fullpath')), ...
2426
'models', ...
2527
'model-ds000114-linebisection_smdl.json');

demos/openneuro/ds000114_run.m

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,21 @@
1212
WD = fileparts(mfilename('fullpath'));
1313

1414
% we add all the subfunctions that are in the sub directories
15-
addpath(fullfile(WD, '..'));
16-
addpath(genpath(fullfile(WD, '..', 'src')));
17-
addpath(genpath(fullfile(WD, '..', 'lib')));
15+
addpath(genpath(fullfile(WD, '..', '..', 'src')));
16+
addpath(genpath(fullfile(WD, '..', '..', 'lib')));
1817

1918
%% Set options
2019
opt = ds000114_getOption();
2120

22-
% the line below allows to run preprocessing in "native" space.
23-
% - use realign and unwarp
24-
% - don't do normalization
25-
opt.space = 'individual';
26-
2721
checkDependencies();
2822

2923
%% Run batches
3024

3125
reportBIDS(opt);
3226

33-
bidsCopyRawFolder(opt, 1);
34-
35-
bidsSTC(opt);
27+
% bidsCopyRawFolder(opt, 1);
28+
%
29+
% bidsSTC(opt);
3630

3731
bidsSpatialPrepro(opt);
3832

@@ -44,4 +38,4 @@
4438

4539
bidsFFX('specifyAndEstimate', opt, FWHM);
4640
bidsFFX('contrasts', opt, FWHM);
47-
bidsResults(opt, FWHM, []);
41+
bidsResults(opt, FWHM);

demos/openneuro/ds001168_getOption.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
opt.anatReference.type = 'T1w';
2121
opt.anatReference.session = 1;
2222

23-
opt.ignoreFieldmaps = false;
23+
opt.space = 'individual';
2424

2525
%% DO NOT TOUCH
2626
opt = checkOptions(opt);
27-
% saveOptions(opt);
27+
saveOptions(opt);
2828

2929
end

demos/openneuro/ds001168_run.m

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@
1212
WD = fileparts(mfilename('fullpath'));
1313

1414
% we add all the subfunctions that are in the sub directories
15-
addpath(fullfile(WD, '..'));
16-
addpath(genpath(fullfile(WD, '..', 'src')));
17-
addpath(genpath(fullfile(WD, '..', 'lib')));
15+
addpath(genpath(fullfile(WD, '..', '..', 'src')));
16+
addpath(genpath(fullfile(WD, '..', '..', 'lib')));
1817

1918
%% Set options
2019
opt = ds001168_getOption();
2120

22-
% the line below allows to run preprocessing in "native" space.
23-
% - use realign and unwarp
24-
% - don't do normalization
25-
opt.space = 'individual';
26-
2721
checkDependencies();
2822

2923
%% Run batches
@@ -41,9 +35,10 @@
4135
anatomicalQA(opt);
4236
bidsResliceTpmToFunc(opt);
4337
functionalQA(opt);
44-
%
45-
% bidsSmoothing(FWHM, opt);
46-
%
38+
39+
bidsSmoothing(FWHM, opt);
40+
41+
% Not implemented yet
4742
% bidsFFX('specifyAndEstimate', opt, FWHM);
4843
% bidsFFX('contrasts', opt, FWHM);
4944
% bidsResults(opt, FWHM, []);

demos/vismotion/batch.m

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,49 @@
77
WD = fileparts(mfilename('fullpath'));
88

99
% we add all the subfunctions that are in the sub directories
10-
addpath(fullfile(WD, '..'));
11-
addpath(genpath(fullfile(WD, '..', 'src')));
12-
addpath(genpath(fullfile(WD, '..', 'lib')));
10+
addpath(genpath(fullfile(WD, '..', '..', 'src')));
11+
addpath(genpath(fullfile(WD, '..', '..', 'lib')));
1312

1413
%% Run batches
1514
opt = getOption();
1615

1716
checkDependencies();
1817

19-
% copy raw folder into derivatives folder
20-
% BIDS_copyRawFolder(opt, 1)
18+
reportBIDS(opt);
2119

22-
% preprocessing
23-
% BIDS_STC(opt);
24-
% BIDS_SpatialPrepro(opt);
25-
% BIDS_Smoothing(6, opt);
20+
bidsCopyRawFolder(opt, 1);
21+
%
22+
% % preprocessing
23+
bidsSTC(opt);
24+
bidsSpatialPrepro(opt);
25+
26+
% Quality control
27+
anatomicalQA(opt);
28+
29+
% Not implemented yet
30+
% bidsResliceTpmToFunc(opt);
31+
% functionalQA(opt);
32+
33+
funcFWHM = 6;
34+
bidsSmoothing(funcFWHM, opt);
2635

2736
% subject level Univariate
28-
% BIDS_FFX(1, 6, opt);
29-
% BIDS_FFX(2, 6, opt);
37+
bidsFFX('specifyAndEstimate', opt, funcFWHM);
38+
bidsFFX('contrasts', opt, funcFWHM);
3039

3140
% group level univariate
32-
BIDS_RFX(1, 6, 6);
33-
BIDS_RFX(2, 6, 6);
41+
conFWHM = 6;
42+
bidsRFX('smoothContrasts', funcFWHM, conFWHM, opt);
3443

35-
BIDS_Results(6, 6, opt, 0);
44+
% Not implemented yet
45+
% bidsRFX('RFX', funcFWHM, conFWHM, opt);
3646

47+
% Not implemented yet
3748
% subject level multivariate
38-
% isMVPA=1;
39-
% BIDS_FFX(1, 6, opt, isMVPA);
40-
% BIDS_FFX(2, 6, opt, isMVPA);
41-
% make4Dmaps(6,opt)
49+
% opt.model.file = fuufile(WD, ...
50+
% 'models', ...
51+
% 'model-motionDecodingMultivariate_smdl.json');
52+
%
53+
% bidsFFX('specifyAndEstimate', opt, funcFWHM);
54+
% bidsFFX('contrasts', opt, funcFWHM);
55+
% concatBetaImgTmaps(funcFWHM, opt);

demos/vismotion/getOption.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
opt.taskName = 'visMotion';
1414

1515
% The directory where the data are located
16-
opt.dataDir = '/home/remi/BIDS/visMotion/derivatives/';
16+
opt.dataDir = '/home/remi/gin/CPP_visMotion/raw';
17+
opt.derivativesDir = '/home/remi/Documents';
1718

1819
% specify the model file that contains the contrasts to compute
1920
opt.model.file = ...
20-
'/home/remi/github/CPP_BIDS_SPM_pipeline/model-visMotionLoc_smdl.json';
21+
'/home/remi/github/CPP_BIDS_SPM_pipeline/demos/vismotion/models/model-visMotionLoc_smdl.json';
2122

2223
% specify the result to compute
2324
% Contrasts.Name has to match one of the contrast defined in the model json file

demos/vismotion/models/model-visMotionLoc_smdl.json

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55
"task": "visMotion"
66
},
77
"Steps": [
8+
{
9+
"Level": "run",
10+
"Model": {
11+
"X": [
12+
"trial_type.VisMot",
13+
"trial_type.VisStat",
14+
"trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z"
15+
]
16+
}
17+
},
818
{
919
"Level": "subject",
1020
"Model": {
1121
"X": [
12-
"trial_type.Vis_U",
13-
"trial_type.Vis_D",
14-
"trial_type.Vis_R",
15-
"trial_type.Vis_L",
16-
"trial_type.Aud_U",
17-
"trial_type.Aud_D",
18-
"trial_type.Aud_L",
19-
"trial_type.Aud_R",
22+
"trial_type.VisMot",
23+
"trial_type.VisStat",
2024
"trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z"
2125
]
2226
},
@@ -42,7 +46,11 @@
4246
},
4347
{
4448
"Level": "dataset",
45-
"AutoContrasts": ["trial_type.VisMot", "trial_type.VisStat", "VisMot_gt_VisStat", "VisStat_gt_VisMot"]
49+
"AutoContrasts": [
50+
"trial_type.VisMot",
51+
"trial_type.VisStat",
52+
"VisMot_gt_VisStat",
53+
"VisStat_gt_VisMot"]
4654
}
4755
]
4856
}

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.3
1+
v0.1.0

0 commit comments

Comments
 (0)