Skip to content

[FIX] Require recent templateflow, select correct aparc dseg.tsv #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2024
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies = [
"packaging",
"pybids >= 0.11.1",
"pyyaml",
"templateflow >= 0.6",
"templateflow >= 24.1",
]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ sqlalchemy==2.0.28
# via pybids
svgutils==0.3.4
# via niworkflows
templateflow==24.0.0
templateflow==24.2.0
# via niworkflows
threadpoolctl==3.3.0
# via scikit-learn
Expand Down
11 changes: 10 additions & 1 deletion smriprep/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,16 @@ def _warn_redirect(message, category, filename, lineno, file=None, line=None):
from niworkflows.utils.misc import _copy_any
from templateflow import api

dseg_tsv = str(api.get('fsaverage', suffix='dseg', extension=['.tsv']))
dseg_tsv = str(
api.get(
'fsaverage',
hemi=None,
atlas=None,
segmentation='aparc',
suffix='dseg',
extension=['.tsv'],
)
)
_copy_any(dseg_tsv, str(Path(output_dir) / 'smriprep' / 'desc-aseg_dseg.tsv'))
_copy_any(dseg_tsv, str(Path(output_dir) / 'smriprep' / 'desc-aparcaseg_dseg.tsv'))
logger.log(25, 'sMRIPrep finished without errors')
Expand Down