qsiprep icon indicating copy to clipboard operation
qsiprep copied to clipboard

issue when using "method":"lsr" with eddy

Open julfou81 opened this issue 4 years ago • 2 comments

Hi

I am using qsiprep v0.14.3 with singularity on HCP with cuda capabilities.

I wanted to use eddy_cuda with --resamp=lsr within qsiprep an I did so using the eddy_params.json file with "method" : "lsr" Everything went fine till the eddy steps, eddy produced the expected outputs but then qsiprep crashes with the following error:

	 [Node] Error on "qsiprep_wf.single_subject_01_wf.dwi_preproc_ses_01_wf.hmc_sdc_wf.split_eddy_lps" (/work/temp_data_Retinopathie/qsiprep_wf/single_subject_01_wf/dwi_preproc_ses_01_wf/hmc_sdc_wf/split_eddy_lps)
211204-01:17:21,312 nipype.workflow ERROR:
	 Node split_eddy_lps failed to run on host gpu008.cluster.
211204-01:17:21,315 nipype.workflow ERROR:
	 Saving crash info to /work/Retinopathie/derivatives/qsiprep/qsiprep/sub-01/log/20211203-230708_9b591276-e2b7-459b-95e9-504e8ed5cfbc/crash-20211204-011721-jsein-split_eddy_lps-9cb45ab5-83f9-4e46-9e5f-41ca4eaa456f.txt
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 428, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/qsiprep/interfaces/images.py", line 66, in _run_interface
    b0_paths = [split_dwi_files[idx] for idx in b0_indices]
  File "/usr/local/miniconda/lib/python3.7/site-packages/qsiprep/interfaces/images.py", line 66, in <listcomp>
    b0_paths = [split_dwi_files[idx] for idx in b0_indices]
IndexError: list index out of range

211204-01:17:23,310 nipype.workflow ERROR:
	 could not run node: qsiprep_wf.single_subject_01_wf.dwi_preproc_ses_02_wf.hmc_sdc_wf.split_eddy_lps
211204-01:17:23,312 nipype.workflow ERROR:
	 could not run node: qsiprep_wf.single_subject_01_wf.dwi_preproc_ses_01_wf.hmc_sdc_wf.split_eddy_lps

I believe this occured because eddy with --resamp=lsr produces only half the total number of volumes that was used as input. The workflow might need to be adapted to this new number of volumes:

  • either by concatenating two times the output set to get twice the number of volume again.
  • or adapting the script to take into account this new number of volumes. Note that would require to halve also the bval and the rotated bvecs files, as eddy with resamp=lsrdoes not produce those. A function would need to be created to average the rotated bvec file pairwise.

julfou81 avatar Dec 04 '21 10:12 julfou81

ah, very interesting! You are the first person I know of to try LSR with qsiprep. This may be a feature that gets added further down the road because I don't have any good test data for this use case. I think your intuition for what's causing this problem is spot on

mattcieslak avatar Dec 17 '21 14:12 mattcieslak

Thank you for your message! ok, good to know! For now I will use the --distortion-group-merge average for the dataset that we have that follow the HCP-style acquisition setting. In fact you had already implemented the function to average the bvecs with option. Nice.

julfou81 avatar Dec 17 '21 15:12 julfou81