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

McFlirt incorrect output filename expected #3566

Open
stebo85 opened this issue Apr 26, 2023 · 3 comments
Open

McFlirt incorrect output filename expected #3566

stebo85 opened this issue Apr 26, 2023 · 3 comments

Comments

@stebo85
Copy link
Contributor

stebo85 commented Apr 26, 2023

Summary

The mcflirt node crashes when .inputs.stats_imgs = True

when using FSL 6.0.5.1:57b01774 because

it expects the output filename to be: BASEFILENAME_variance.nii.gz

but FSL outputs: BASEFILENAME.nii.gz_variance.nii.gz

There is a switch here that seems to fix this:

# FSL <6.0 outputs have .nii.gz_variance.nii.gz as extension

There it seems that this is a behavior for older FSL versions below 6.0.0. Is anyone else getting this in newer versions as well? Should this version switch be adapted to include newer versions as well?

Actual behavior

FSL 6.0.5.1:57b01774 outputs: BASEFILENAME.nii.gz_variance.nii.gz
Nipype expects BASEFILENAME_variance.nii.gz

Expected behavior

Nipype should expect: BASEFILENAME.nii.gz_variance.nii.gz

How to replicate the behavior

mcflirt_run1 = fsl.MCFLIRT()
mcflirt_run1.inputs.ref_vol = 0
mcflirt_run1.inputs.save_mats = True
mcflirt_run1.inputs.save_plots = True

#error when stats_img = True -> works with False because image is not expected
mcflirt_run1.inputs.stats_imgs = True

mcflirt_run1.inputs.in_file = 'bold.nii.gz'
mcflirt_run1.inputs.out_file = 'mcflirt_bold.nii.gz'

mcflirt_run1.run()

Script/Workflow details

Please put URL to code or code here (if not too long).

Platform details:

{'commit_hash': '%h',
 'commit_source': 'archive substitution',
 'networkx_version': '2.8.8',
 'nibabel_version': '4.0.2',
 'nipype_version': '1.8.5',
 'numpy_version': '1.23.5',
 'pkg_path': '/opt/conda/lib/python3.10/site-packages/nipype',
 'scipy_version': '1.9.3',
 'sys_executable': '/opt/conda/bin/python',
 'sys_platform': 'linux',
 'sys_version': '3.10.4 | packaged by conda-forge | (main, Mar 24 2022, '
                '17:38:57) [GCC 10.3.0]',
 'traits_version': '6.4.1'}
@stebo85
Copy link
Contributor Author

stebo85 commented Apr 27, 2023

@kimsin98 - it looks like you added this if condition in 2019 - did you get a different behaviour with versions newer than 6.0.0?

@kimsin98
Copy link
Contributor

I think this was added when FSL 6.0 was pretty new. If more recent versions changed outputs again, they should be fixed!

#2925
https://neurostars.org/t/output-files-issue-with-mcflirt-nipype-1-2-0/4840

@effigies
Copy link
Member

effigies commented Jul 5, 2023

@stebo85 Please feel free to submit a PR.

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

No branches or pull requests

3 participants