-
Notifications
You must be signed in to change notification settings - Fork 532
fsl.MotionOutliers fails to run when inputs.threshold is set #1427
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
Comments
This may be because fsl_motion_outliers is not correctly creating the text file containing the motion confounds. With FSL 5.0.9, the following command correctly creates the motion_confound.txt file:
Whereas the following command does not:
So perhaps this is a bug in FSL 5.0.9, an issue specific to my NIfTI image, or something wrong with my installation. |
@beausievers - both commands work for me on a linux centos 7.2 platform with fsl 5.0.9. perhaps its something specific to your my_epi.nii file or your fsl installation?
|
@satra After doing some more testing and getting help on the FSL list, it looks like fsl_motion_outliers is not guaranteed to create an output text file. If the NIfTI image contains no timepoints above the threshold, fsl_motion_outliers will terminate with no output. Creates output:
Does not create output:
I am not super familiar with the NiPype internals, so apologies if this comment belies my novice status, but my intuition is that a NiPype Node using fsl.MotionOutliers should take this possibility into account instead of throwing a FileNotFoundError when no timepoints are above the threshold. |
@beausievers - thanks for the feedback. it should be taken care of within nipype. as a first pass can you change this line: https://github.com/nipy/nipype/blob/master/nipype/interfaces/fsl/utils.py#L2048 to:
first to see if this helps. if so, would you be willing to submit a pull-request for this change? we can guide you. |
@beausievers - thank you. one more check. if running as interface: res = interface.run() res.outputs.out_file should be if running in a workflow: check the report.rst file to see if the output_file output is undefined. |
@satra res.outputs.out_file is not |
@beausievers - thanks for taking a look - yes - this will require a bit of work on our part. let me look into this tomorrow. now one issue is that in the context of a workflow having that output be sometimes defined and sometimes not may be an issue, depending on what it is connected to. |
fsl.MotionOutliers throws a FileNotFoundError regarding a file in a temporary directory when inputs.threshold is set to a specific value. When inputs.threshold is not set, it runs just fine. This behavior persists for different values of inputs.metric.
Simple example:
Here is the traceback:
I'm running Mac OS 10.9.5, with FSL version 5.0.9.
nipype.get_info() output:
The text was updated successfully, but these errors were encountered: