Iโm working with the nipype_tutorial notebooks, and have hit a snag in the preprocessing workflow with mcflirt. The error seems to be that sub-01_ses-test_task-fingerfootlips_bold_roi_mcf_mean_reg.nii
is not being created by mcflirt
. When I run the command.txt from the command line, it runs fine. So I believe it might be a file naming issue, but Iโm not sure about that, or how to proceed.
The problem also might stem from my converting absolute paths as used in the docker, to paths that work on my machine. E.g. /output
becomes '/Volumes/Data/Research/fmri/nipype_tutorial/output'
.
(Iโm not using the Docker image because I will need to deploy these notebooks at my Uni, and Docker will not be available.)
Hereโs a gist of the output of preproc.run('MultiProc', plugin_args={'n_procs': 1})
.
Hereโs the output of nipypecli crash notebooks/crash-20220329-...
:
File: /Volumes/Data/Research/fmri/nipype_tutorial/notebooks/crash-20220329-071020-john-mcflirt.b0-14e26bcd-f616-46d9-919a-6efb1027e35d.pklz
Node: preproc.mcflirt
Working directory: /Volumes/Data/Research/fmri/nipype_tutorial/output/workingdir/preproc/_subject_id_01_task_name_fingerfootlips/mcflirt
Node inputs:
args = <undefined>
bins = <undefined>
cost = <undefined>
dof = <undefined>
environ = {'FSLOUTPUTTYPE': 'NIFTI'}
in_file = /Volumes/Data/Research/fmri/nipype_tutorial/output/workingdir/preproc/_subject_id_01_task_name_fingerfootlips/extract/sub-01_ses-test_task-fingerfootlips_bold_roi.nii
init = <undefined>
interpolation = <undefined>
mean_vol = True
out_file = <undefined>
output_type = NIFTI
ref_file = <undefined>
ref_vol = <undefined>
rotation = <undefined>
save_mats = <undefined>
save_plots = True
save_rms = <undefined>
scaling = <undefined>
smooth = <undefined>
stages = <undefined>
stats_imgs = <undefined>
use_contour = <undefined>
use_gradient = <undefined>
Traceback:
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 521, in run
result = self._run_interface(execute=True)
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 639, in _run_interface
return self._run_command(execute)
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 750, in _run_command
raise NodeExecutionError(
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node mcflirt.
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 454, in aggregate_outputs
setattr(outputs, key, val)
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
value = super(File, self).validate(objekt, name, value, return_pathlike=True)
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
self.error(objekt, name, str(value))
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: The 'mean_img' trait of a MCFLIRTOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/Volumes/Data/Research/fmri/nipype_tutorial/output/workingdir/preproc/_subject_id_01_task_name_fingerfootlips/mcflirt/sub-01_ses-test_task-fingerfootlips_bold_roi_mcf_mean_reg.nii' <class 'str'> was specified.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 401, in run
outputs = self.aggregate_outputs(runtime)
File "/usr/local/Caskroom/miniconda/base/envs/nipype/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 461, in aggregate_outputs
raise FileNotFoundError(msg)
FileNotFoundError: No such file or directory '/Volumes/Data/Research/fmri/nipype_tutorial/output/workingdir/preproc/_subject_id_01_task_name_fingerfootlips/mcflirt/sub-01_ses-test_task-fingerfootlips_bold_roi_mcf_mean_reg.nii' for output 'mean_img' of a MCFLIRT interface
Not sure what might be helpful, so here are these:
$FSLDIR/etc/fslversion 6.0.5.1:57b01774
nipypecli version 1.7.0
macOS 12.3 (21E230)
Python 3.9.5