Skip to content

Commit 44d3f3a

Browse files
authored
Merge pull request #1983 from mgxd/rf/default-output
FIX: Revert MNI152NLin2009cAsym as default BOLD output
2 parents 82b0a7f + 8d8f518 commit 44d3f3a

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

fmriprep/cli/run.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_parser():
129129
'option is not enabled, standard EPI-T1 coregistration is performed '
130130
'using the middle echo.')
131131
g_conf.add_argument(
132-
'--output-spaces', nargs='+', action=OutputReferencesAction, default=SpatialReferences(),
132+
'--output-spaces', nargs='*', action=OutputReferencesAction, default=SpatialReferences(),
133133
help="""\
134134
Standard and non-standard spaces to resample anatomical and functional images to. \
135135
Standard spaces may be specified by the form \
@@ -138,8 +138,8 @@ def get_parser():
138138
colon-separated parameters. \
139139
Non-standard spaces imply specific orientations and sampling grids. \
140140
Important to note, the ``res-*`` modifier does not define the resolution used for \
141-
the spatial normalization.
142-
For further details, please check out \
141+
the spatial normalization. To generate no BOLD outputs, use this option without specifying \
142+
any spatial references. For further details, please check out \
143143
https://fmriprep.readthedocs.io/en/%s/spaces.html""" % (currentv.base_version
144144
if is_release else 'latest'))
145145

@@ -718,7 +718,11 @@ def parse_spaces(opts):
718718
719719
"""
720720
spaces = opts.output_spaces
721-
spaces.checkpoint()
721+
if not spaces.references and not spaces.is_cached():
722+
spaces.add('MNI152NLin2009cAsym')
723+
724+
if not spaces.is_cached(): # spaces may be already checkpointed if users want no BOLD outputs
725+
spaces.checkpoint()
722726

723727
if opts.use_aroma:
724728
# Make sure there's a normalization to FSL for AROMA to use.
@@ -730,15 +734,7 @@ def parse_spaces(opts):
730734
spaces.add(('fsaverage', {'den': '164k'}))
731735
spaces.add(('MNI152NLin6Asym', {'res': vol_res}))
732736

733-
# These arguments implicitly signal expected output
734-
if not spaces.references:
735-
warnings.warn(
736-
"fMRIPrep will not generate preprocessed derivatives because "
737-
"none of `--output-spaces`, `--use-aroma`, or `--cifti-output` "
738-
"were set."
739-
)
740-
741-
# Add the default standard space (required by several sub-workflows)
737+
# Add the default standard space if not already present (required by several sub-workflows)
742738
if "MNI152NLin2009cAsym" not in spaces.get_spaces(nonstandard=False, dim=(3,)):
743739
spaces.add("MNI152NLin2009cAsym")
744740
return spaces

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ install_requires =
2424
nibabel >= 3.0.1
2525
nipype >=1.3.1
2626
nitime
27-
niworkflows @ git+https://github.com/poldracklab/niworkflows.git@edeea81352f3f2b276f11e42e7829e1c5a03770f
27+
niworkflows ~= 1.1.7
2828
numpy
2929
pandas
3030
psutil >=5.4

wrapper/fmriprep_docker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def merge_help(wrapper_help, target_help):
164164

165165
# Make sure we're not clobbering options we don't mean to
166166
overlap = set(w_flags).intersection(t_flags)
167-
expected_overlap = set(['h', 'version', 'w', 'output-spaces',
168-
'fs-license-file', 'fs-subjects-dir', 'use-plugin'])
167+
expected_overlap = set(['h', 'version', 'w', 'fs-license-file',
168+
'fs-subjects-dir', 'use-plugin'])
169169

170170
assert overlap == expected_overlap, "Clobbering options: {}".format(
171171
', '.join(overlap - expected_overlap))
@@ -249,7 +249,7 @@ def get_parser():
249249
g_wrap.add_argument('-w', '--work-dir', action='store', type=os.path.abspath,
250250
help='path where intermediate results should be stored')
251251
g_wrap.add_argument(
252-
'--output-spaces', nargs="+",
252+
'--output-spaces', nargs="*",
253253
help="""\
254254
Standard and non-standard spaces to resample anatomical and functional images to. \
255255
Standard spaces may be specified by the form \

0 commit comments

Comments
 (0)