Skip to content

Commit 82190e9

Browse files
committed
fix: dseg.tsv files were always copied from fsaverage, even with --fs-no-reconall
1 parent 0b8ee43 commit 82190e9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

fmriprep/cli/run.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,14 @@ def before_send(event, hints):
440440
sentry_sdk.capture_exception(e)
441441
raise
442442
else:
443-
from templateflow import api
444-
from niworkflows.utils.misc import _copy_any
445-
dseg_tsv = str(api.get('fsaverage', suffix='dseg', extensions=['.tsv']))
446-
_copy_any(dseg_tsv,
447-
str(Path(output_dir) / 'fmriprep' / 'desc-aseg_dseg.tsv'))
448-
_copy_any(dseg_tsv,
449-
str(Path(output_dir) / 'fmriprep' / 'desc-aparcaseg_dseg.tsv'))
443+
if opts.run_reconall:
444+
from templateflow import api
445+
from niworkflows.utils.misc import _copy_any
446+
dseg_tsv = str(api.get('fsaverage', suffix='dseg', extensions=['.tsv']))
447+
_copy_any(dseg_tsv,
448+
str(Path(output_dir) / 'fmriprep' / 'desc-aseg_dseg.tsv'))
449+
_copy_any(dseg_tsv,
450+
str(Path(output_dir) / 'fmriprep' / 'desc-aparcaseg_dseg.tsv'))
450451
logger.log(25, 'fMRIPrep finished without errors')
451452
finally:
452453
# Generate reports phase

0 commit comments

Comments
 (0)