QSIPrep on HCP-style Sequence: "Average" Denoise Strategy Not Working; SBRef not Recognized

Hello,

I am running QSIPrep 0.13 on a HCP-style sequence, in that it is multi-shelled, and has two runs that are the same acquisition parameters but in different phase-encoding directions. my QSIPrep command has the following parameters:

--use-syn-sdc --force-syn --distortion-group-merge average --mem-mb 19000 --unringing-method mrdegibbs --output_resolution 1.2 --recon-spec mrtrix_multishell_msmt

The code begins to run as expected, and all of the anatomical derivatives are made, but I get the following error in the DWI workflow:

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 434, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/qsiprep/interfaces/dwi_merge.py", line 159, in _run_interface
    " Found %d" % num_distortion_groups)
Exception: Unable to merge using strategy 'average': exactly two distortion groups must be present in data. Found 1

However, my dataset contains two DWI runs:
.
├── sub-XXXX_dir-AP_dwi.bval
├── sub-XXXX_dir-AP_dwi.bvec
├── sub-XXXX_dir-AP_dwi.json
├── sub-XXXX_dir-AP_dwi.nii.gz
├── sub-XXXX_dir-AP_sbref.json
├── sub-XXXX_dir-AP_sbref.nii.gz
├── sub-XXXX_dir-PA_dwi.bval
├── sub-XXXX_dir-PA_dwi.bvec
├── sub-XXXX_dir-PA_dwi.json
├── sub-XXXX_dir-PA_dwi.nii.gz
├── sub-XXXX_dir-PA_sbref.json
└── sub-XXXX_dir-PA_sbref.nii.gz

I see that QSIPrep does recognize there are multiple DWI runs, as it starts by combining all DWIs from the session. Maybe the initial combining of the runs is why it can’t recognize two versions later? Is syn-sdc overriding it? Also, the sbref files are not being recognized, as it says no sbref files were found for the subject when building the workflow. Any guidance would be appreciated.

Best,
Steven

Hi @Steven, you’re right that force-syn will override any other fieldmaps. We didn’t implement the same thing as fmriprep where it can additionally do both SyN and the original fieldmaps. I’d strongly recommend using the fieldmaps if you have them.

Also, we don’t use the sbref images at all. Instead we pull all the b=0 images from the dwi images and the fieldmap images and use the HCP-D method where the 3 “most representative” images from each distortion group are used in TOPUP.

One other off-topic comment - have you ever tried not using “average” method for concatenating? I know HCP uses average, but I don’t think this has a theory-based motivation. You can have twice as many samples if you just concatenate them and I’m sure averaging them changes the distribution of signal and noise that some reconstruction methods don’t expect. Many HCP users don’t know that the whole scheme is collected twice.

1 Like

Thanks for the quick response @mattcieslak! Good to know about the difference in behavior between fMRIPrep and not using sbref. Will update the code accordingly. I have used other options for concatenating before (not with this dataset in particular), just figured that doing the average now would save space and maybe speed up some of the next processing steps. If I disable syn-sdc, would I get the same SDC benefits of reverse PE acquisitions if I do not use the ‘average’ method?

You’ll have a much more stable and well-vetted SDC method (TOPUP) applied to your data if you get rid of the --use-syn-sdc and --force-syn options. The syn sdc workflow is really only for when you have no variability in phase encoding direction in the _dwis or in fmaps/.

2 Likes

Dear Steven:
hello, I met a similar question as you have described when conduct preprocess HCP styple DWI data via qsiprep pipeline. May I know have you use “average” in “–distortion-group-merge” or just discard “–distortion-group-merge” at last?
thank you very mush

suming