Skip to content
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
24 changes: 15 additions & 9 deletions demos/openneuro/ds000001_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 2 additions & 0 deletions demos/openneuro/ds000114_getOption.m
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
18 changes: 6 additions & 12 deletions demos/openneuro/ds000114_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -44,4 +38,4 @@

bidsFFX('specifyAndEstimate', opt, FWHM);
bidsFFX('contrasts', opt, FWHM);
bidsResults(opt, FWHM, []);
bidsResults(opt, FWHM);
4 changes: 2 additions & 2 deletions demos/openneuro/ds001168_getOption.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 6 additions & 11 deletions demos/openneuro/ds001168_run.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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, []);
50 changes: 32 additions & 18 deletions demos/vismotion/batch.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
5 changes: 3 additions & 2 deletions demos/vismotion/getOption.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 17 additions & 9 deletions demos/vismotion/models/model-visMotionLoc_smdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
Expand All @@ -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"]
}
]
}
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.3
v0.1.0