poldracklab / tacc-openneuro

0 stars 1 forks source link

ds004299-fmriprep: "Exception raised while executing Node topup" #71

Open jbwexler opened 1 year ago

jbwexler commented 1 year ago

I ran four subjects and this occurred for one:

> Node: fmriprep_23_0_wf.single_subject_104_wf.fmap_preproc_wf.wf_auto_00000.topup
> Working directory: /scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf
> /wf_auto_00000/topup
> 
> Node inputs:
> 
> args = <undefined>
> config = /opt/conda/lib/python3.9/site-packages/sdcflows/data/flirtsch/b02b0.cnf
> encoding_direction = ['z', 'z', 'z-', 'z-']
> encoding_file = <undefined>
> environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
> estmov = <undefined>
> fwhm = <undefined>
> in_file = /scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_
> 00000/to_las/sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS.nii.gz
> interp = <undefined>
> max_iter = <undefined>
> minmet = <undefined>
> numprec = <undefined>
> out_base = <undefined>
> out_corrected = <undefined>
> out_field = <undefined>
> out_jac_prefix = jac
> out_logfile = <undefined>
> out_mat_prefix = xfm
> out_warp_prefix = warpfield
> output_type = NIFTI_GZ
> readout_times = [0.0299247, 0.0299247, 0.0299247, 0.0299247]
> reg_lambda = <undefined>
> regmod = <undefined>
> regrid = <undefined>
> scale = <undefined>
> splineorder = <undefined>
> ssqlambda = <undefined>
> subsamp = <undefined>
> warp_res = <undefined>
> 
> Traceback (most recent call last):
>   File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
>     result["result"] = node.run(updatehash=updatehash)
>   File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
>     result = self._run_interface(execute=True)
>   File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
>     return self._run_command(execute)
>   File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
>     raise NodeExecutionError(msg)
> nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node topup.
> 
> Cmdline:
>         topup --config=/opt/conda/lib/python3.9/site-packages/sdcflows/data/flirtsch/b02b0.cnf --datain=/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/topup/sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS_encfile.txt --imain=/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/to_las/sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS.nii.gz --out=sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS_base --iout=sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS_corrected.nii.gz --fout=sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS_field.nii.gz --jacout=jac --logout=sub-104_ses-1_dir-pa_run-02_epi_average_regrid003_merged_sliced_volregLAS_topup.lo
> g --rbmout=xfm --dfout=warpfield
> Stdout:
> 
> Stderr:
>         Error occurred when preparing to run topup
>         Exception thrown with message: Topup: msg=TopupScan::TopupScan: third element of pevec must be zero
> Traceback:
>         Traceback (most recent call last):
>           File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
>             setattr(outputs, key, val)
>           File "/opt/conda/lib/python3.9/site-packages/traits/trait_types.py", line 2699, in validate
>             return TraitListObject(self, object, name, value)
>           File "/opt/conda/lib/python3.9/site-packages/traits/trait_list_object.py", line 582, in __init__
>             super().__init__(
>           File "/opt/conda/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in __init__
>             super().__init__(self.item_validator(item) for item in iterable)
>           File "/opt/conda/lib/python3.9/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
>             super().__init__(self.item_validator(item) for item in iterable)
>           File "/opt/conda/lib/python3.9/site-packages/traits/trait_list_object.py", line 865, in _item_validator
>             return trait_validator(object, self.name, value)
>           File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
>             value = super(File, self).validate(objekt, name, value, return_pathlike=True)
>           File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
>             self.error(objekt, name, str(value))
>           File "/opt/conda/lib/python3.9/site-packages/traits/base_trait_handler.py", line 74, in error
>             raise TraitError(
>         traits.trait_errors.TraitError: Each element of the 'out_jacs' trait of a TOPUPOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/topup/jac_01.nii.gz' <class 'str'> was specified.
> 
>         During handling of the above exception, another exception occurred:
> 
>         Traceback (most recent call last):
>           File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 400, in run
>             outputs = self.aggregate_outputs(runtime)
>           File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
>             raise FileNotFoundError(msg)
>         FileNotFoundError: No such file or directory '['/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/topup/jac_01.nii.gz', '/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/topup/jac_02.nii.gz', '/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/topup/jac_03.nii.gz', '/scratch1/03201/jbwexler/work_dir/fmriprep/ds004299_sub-104/fmriprep_23_0_wf/single_subject_104_wf/fmap_preproc_wf/wf_auto_00000/topup/jac_04.nii.gz']' for output 'out_jacs' of a TOPUP interface
effigies commented 1 year ago

Looks like inconsistent data. The images are LSP with PhaseEncodingDirection j/j-. When we reorient to LAS, the PhaseEncodingDirection becomes k/k-, which topup can't handle. But they're also labeled dir-ap/dir-pa, so something's gone wrong in the curation.

We could have sdcflows detect these cases and drop them rather than get to the point of crashing. Then it would fall back to SyN-SDC.

jbwexler commented 1 year ago

Holding off on this dataset for now until Paul inspects it.