error encountered at eddy step when no T1w data are available
Opened this issue · 4 comments
Summary
I am getting an error when preprocessing dwi data with no T1w data using the latest qsiprep version.
I was able to successfully preprocess this dataset using qsiprep v0.19.1 but get an error using the latest version.
Additional details
- QSIPrep version: 0.21.5
- Docker version: 25.0.4
What were you trying to do?
I am trying to preprocess my dwi data.
What did you expect to happen?
I was expecting the preprocessing to complete successfully.
What actually happened?
I first got an error saying that no T1w images were found. Then I added --anat-modality none
to my command and got a different error (see below).
Reproducing the bug
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
result = self._run_interface(execute=True)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
return self._run_command(execute)
File "/opt/conda/envs/qsiprep/lib/python3.10/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 eddy.
Cmdline:
eddy_cuda10.2 --cnr_maps --estimate_move_by_susceptibility --field=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/topup/fieldmap_HZ --field_mat=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/topup_to_eddy_reg/topup_reg_image_flirt.mat --flm=quadratic --ff=10.0 --acqp=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/gather_inputs/eddy_acqp.txt --bvals=/data/sub-NDARAA932XZU/dwi/sub-NDARAA932XZU_dir-AP_dwi.bval --bvecs=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/pre_hmc_wf/merge_and_denoise_wf/conform_dwis01/sub-NDARAA932XZU_dir-AP_dwi_LAS.bvec --imain=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/pre_hmc_wf/merge_and_denoise_wf/dwi_denoise_dir_AP_dwi_wf/denoiser/sub-NDARAA932XZU_dir-AP_dwi_LAS_denoised.nii.gz --index=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/gather_inputs/eddy_index.txt --mask=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/transform_mask_to_eddy/topup_imain_corrected_avg_trans_mask_trans_flirt.nii.gz --interp=spline --data_is_shelled --json=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/pre_hmc_wf/merge_and_denoise_wf/merge_dwis/merged_metadata.json --resamp=jac --mporder=20 --niter=5 --nthr=1 --nvoxhp=1000 --out=/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/eddy/eddy_corrected --repol --residuals --slm=linear
Stdout:
Warning: In a future release the first argument will have to be "diffusion" when using eddy on diffusion data, i.e.
eddy diffusion --imain='my_ima' --acqp='my_acqp' ...
Warning: Writing of individual text files will be discontinued in favour of a single .json file in future versions
EddyInputError: --imain and --mask images must have the same dimensions
Terminating program
Stderr:
Traceback:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
setattr(outputs, key, val)
File "/opt/conda/envs/qsiprep/lib/python3.10/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/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
self.error(objekt, name, str(value))
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: The 'out_corrected' trait of an ExtendedEddyOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/eddy/eddy_corrected.nii.gz' <class 'str'> was specified.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 400, in run
outputs = self.aggregate_outputs(runtime)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
raise FileNotFoundError(msg)
FileNotFoundError: No such file or directory '/scratch/qsiprep_wf/single_subject_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/eddy/eddy_corrected.nii.gz' for output 'out_corrected' of a ExtendedEddy interface
I also tried using --dwi-only
and get a very similar error as above.
Here is what the error looks like in qsiprep 0.22.0:
EddyInputError: Mismatch between no of slices in multi-band structure and in image file.
Terminating program
Stderr:
Traceback:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
setattr(outputs, key, val)
File "/opt/conda/envs/qsiprep/lib/python3.10/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/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
self.error(objekt, name, str(value))
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: The 'out_corrected' trait of an ExtendedEddyOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/scratch/qsiprep_0_22_wf/sub_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/eddy/eddy_corrected.nii.gz' <class 'str'> was specified.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 400, in run
outputs = self.aggregate_outputs(runtime)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
raise FileNotFoundError(msg)
FileNotFoundError: No such file or directory '/scratch/qsiprep_0_22_wf/sub_NDARAA932XZU_wf/dwi_preproc_dir_AP_wf/hmc_sdc_wf/eddy/eddy_corrected.nii.gz' for output 'out_corrected' of a ExtendedEddy interface
240801-21:39:50,724 cli WARNING:
Errors occurred while generating reports for participants: NDARAA932XZU (1).
1
I re-ran this participant using qsiprep 0.19.1 and it completed successfully. I don't why I am getting a mismatch error in the later versions.
Hi @jhauneuro are you sure your data is bids valid and does it contain SliceTiming? We added the slice-to-volume correction in these recent versions, which will look at your slice timings from the json sidecars. These will have to match the number of slices or there will be an issue with slice to volume.
@mattcieslak yes, the json files were generated from the dicoms using dcm2niix. They show 82 slice times and the image dimensions are 128x128x82.
The data are also not multi-band so the error message doesn't make much sense to me.
I realized I had run 0.19.1 without intra-volume correction (eddy --mporder option). I reran 0.22.0 without intra-volume correction and this time it completed without error. The issue is likely related to the different image orientation of this dataset – It was acquired on a GE scanner with a sagittal slice acquisition and oriented PSR+.
For some reason qsiprep sometimes has difficulties with non-LAS+ oriented data (e.g., see issue #800 that I reported for this dataset, and also issue #793.
It would be nice to run intra-volume correction on this data since there is a lot of motion in this data.