Skip to content

FSL 6.0 mcflirt mean_reg.nii.gz naming error? #2925

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

Closed
iamdamion opened this issue Apr 30, 2019 · 4 comments · Fixed by #3029
Closed

FSL 6.0 mcflirt mean_reg.nii.gz naming error? #2925

iamdamion opened this issue Apr 30, 2019 · 4 comments · Fixed by #3029
Milestone

Comments

@iamdamion
Copy link

Summary

Mcflirt node crashed workflow with the following error:

TraitError: The trait 'mean_img' of a MCFLIRTOutputSpec instance is an existing file name, but the path '/NIPYPE_TEST_DATA/Preproc/mcflirt/22_corrected_mcf.nii.gz_mean_reg.nii.gz' does not exist.

The path is fine, the file name is wrong. The correct file name is 22_corrected_mcf_mean_reg.nii.gz without the extra nii.gz at the end.

If I run the command.txt command in the terminal, it works fine. The only help I found online was someone that said it was fixed by installing FSL 5, so they assumed it was looking for how older versions of FSL named the file. The issue is the extra nii.gz, but not sure where it comes from.

Platform details:

{'commit_hash': '%h',
 'commit_source': 'archive substitution',
 'networkx_version': '2.2',
 'nibabel_version': '2.4.0',
 'nipype_version': '1.1.9',
 'numpy_version': '1.16.2',
 'pkg_path': '/Users/dvd296/miniconda2/envs/fmri/lib/python2.7/site-packages/nipype',
 'scipy_version': '1.2.1',
 'sys_executable': '/Users/dvd296/miniconda2/envs/fmri/bin/python',
 'sys_platform': 'darwin',
 'sys_version': '2.7.15 | packaged by conda-forge | (default, Feb 27 2019, 20:44:16) \n[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]',
 'traits_version': '5.0.0'}

Execution environment

Choose one

  • My python environment outside container
@kimsin98
Copy link
Contributor

I tried using Nipype with FSL 6.0 and can confirm this TraitError. Running the command without nipype results in the more sensible file name without 2nd nii.gz.

I could fix this for FSL 6.0, but I am not sure how Nipype would like to maintain compatibility with multiple versions of FSL.

@effigies
Copy link
Member

It would be good to verify whether this is a bug in FSL 5 that we're accommodating or a bug in nipype.

@kimsin98
Copy link
Contributor

kimsin98 commented Sep 9, 2019

Not sure if I can call it a 'bug', but mcflirt in FSL 5 always produces {...}_mcf.nii.gz_mean_reg.nii.gz as mean_img. Nipype is accommodating this quirk.

This error also occurs with stat_imgs: nii.gz_{variance,sigma}.nii.gz

Considering that more people will be using FSL 6 as time passes, the file checks should definitely be fixed. The question is how to keep compatibility with FSL 5. Is there a way to query FSL version during the Trait check?

@effigies
Copy link
Member

effigies commented Sep 9, 2019

There are always a number of ways to do these things. One example you could take is #1811, where we created a modified input specification that would be selected if the version was new enough.

(Note that it's now a bit different.)

There's also a nipype.interfaces.fsl.Info class that should behave equivalently to nipype.interfaces.freesurfer.Info.

There are other options that involve determining the version when it's time to run the interface, but those will generally be more opaque to read.

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 a pull request may close this issue.

3 participants