Skip to content

Commit 0d25bbc

Browse files
committed
add design only option to cli
1 parent 5c45768 commit 0d25bbc

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

bidspm.m

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function bidspm(varargin)
5151
addParameter(args, 'preproc_dir', pwd, isFolder);
5252
addParameter(args, 'model_file', struct([]), isFileOrStruct);
5353
addParameter(args, 'roi_based', false, isLogical);
54+
addParameter(args, 'design_only', false, isLogical);
5455
% group level stats only
5556
addParameter(args, 'node_name', '', isChar);
5657

@@ -195,6 +196,7 @@ function bidspm(varargin)
195196
% stats
196197
opt.dir.preproc = args.Results.preproc_dir;
197198
opt.model.file = args.Results.model_file;
199+
opt.model.designOnly = args.Results.design_only;
198200

199201
opt = overrideRoiBased(opt, args);
200202

@@ -322,16 +324,27 @@ function stats(args)
322324
contrasts = ismember(action, {'stats', 'contrasts'});
323325
results = ismember(action, {'stats', 'contrasts', 'results'});
324326

327+
if ~opt.model.designOnly
328+
contrasts = false;
329+
results = false;
330+
end
331+
325332
if opt.glm.roibased.do
326333

327334
bidsFFX('specify', opt);
328-
bidsRoiBasedGLM(opt);
335+
if ~opt.model.designOnly
336+
bidsRoiBasedGLM(opt);
337+
end
329338

330339
else
331340

332341
if estimate
333342
if isSubjectLevel
334-
bidsFFX('specifyAndEstimate', opt);
343+
if opt.model.designOnly
344+
bidsFFX('specify', opt);
345+
else
346+
bidsFFX('specifyAndEstimate', opt);
347+
end
335348
else
336349
bidsRFX('RFX', opt, 'nodeName', nodeName);
337350
end

src/messages/bidspmHelp.m

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ function bidspmHelp()
136136
% 'space', {'individual', 'IXI549Space'}, ...
137137
% 'options', struct([]), ...,
138138
% 'roi_based', false, ...
139+
% 'design_only', false, ...
139140
% 'ignore', {}, ...
140141
% 'task', {}, ...
141142
% 'fwhm', 6)
@@ -153,16 +154,20 @@ function bidspmHelp()
153154
% *Optional parameters*
154155
%
155156
% :param roi_based:
156-
% :type roi_based: logical
157+
% :type roi_based: logical
157158
%
158159
% :param task:
159-
% :type task: cell string
160+
% :type task: cell string
160161
%
161-
% :param fwhm: smoothing lelvel of the preprocessed data
162-
% :type fwhm: positive scalar
162+
% :param fwhm: smoothing lelvel of the preprocessed data
163+
% :type fwhm: positive scalar
164+
%
165+
% :param design_only: to only run the model specification when at the group level
166+
% :type design_only: logical
167+
%
168+
% :param ignore: can be any of ``{'qa'}``
169+
% :type ignore: cell string
163170
%
164-
% :param ignore: can be any of ``{'qa'}``
165-
% :type ignore: cell string
166171
%
167172
% **low level calls**
168173
%

0 commit comments

Comments
 (0)