Skip to content
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

backport fix copy of dseg.tsv following templateflow update for LTS #421

Open
wants to merge 1 commit into
base: maint/0.7.x
Choose a base branch
from

Conversation

bpinsard
Copy link
Contributor

No description provided.

Comment on lines +250 to 255
dseg_tsv = str(
api.get('fsaverage', hemi=None, atlas=None, suffix='dseg', extension=['.tsv'])
)
_copy_any(dseg_tsv,
str(Path(output_dir) / 'smriprep' / 'desc-aseg_dseg.tsv'))
_copy_any(dseg_tsv,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need an associated PR against the fMRIPrep LTS branch. At least the Docker container pins the specific templateflow version, so this line either needs to be one that works for versions 0.7.1 and 24.1.0 or we'll need to check the version.

https://github.com/nipreps/fmriprep/blob/maint/20.2.x/docker/files/environment.yml#L202

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the valid query parameters changed in 24.1, I don't think we can do this reliably across versions with a single command. I would suggest for the LTS:

dseg_LUTs = api.get(OLD_PARAMS)
if isinstance(dseg_LUTs, list):
    dseg_LUTs = api.get(NEW_PARAMS)  # Requires tf 24.1+
if isinstance(dseg_LUTs, list):
    dseg_LUTs = dseg_LUTs[0]
dseg_tsv = str(dseg_LUTs)

@bpinsard
Copy link
Contributor Author

I am not sure why both files are present in templateflow/tpl-fsaverage. Is that because of CI cache/precomputed inputs ?

FileNotFoundError: [Errno 2] No such file or directory: "[PosixPath('/home/smriprep/.cache/templateflow/tpl-fsaverage/tpl-fsaverage_dseg.tsv'), PosixPath('/home/smriprep/.cache/templateflow/tpl-fsaverage/tpl-fsaverage_seg-aparc_dseg.tsv')]"

@effigies
Copy link
Member

TBH, I'm not sure. I think we need to hack around it in any case.

@oesteban You might know off the top of your head why this happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants