DSI Studio error

Summary of what happened:

I have been attempting to run qsiprep on a single subject with a single session. The DWI was collected according to the ABCD multishell protocol and contains an EPI fieldmap for distortion correction. I’ve never run into this issue before, so any advice would be greatly appreciated. Thanks!

Command used (and if a helper script was used, a link to the helper script or the command generated):

singularity run --cleanenv \
    -B ${OUTPUT_DIR}:/derivatives:ro,${OUTPUT_DIR}:/out,${WORK_DIR}:${WORK_DIR},${FS_LICENSE}:/opt/freesurfer/license.txt     /wynton/group/rsl/utils/software/qsiprep-${VERSION}.sif \
    /derivatives/nii /out participant \
    --fs-license-file /opt/freesurfer/license.txt \
    --output-resolution 1.7 \
    --work-dir ${WORK_DIR} \
    --unringing-method mrdegibbs --denoise-method dwidenoise --nthreads ${ncpus} \
    --participant_label ${subjectID} \
    --separate_all_dwis \
    --omp-nthreads $((NTHREADS - 2)) \
    -v -v

Version:

0.19.1

Environment (Docker, Singularity / Apptainer, custom installation):

Singularity container on HPC

Data formatted according to a validatable standard? Please provide the output of the validator:

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
	1: [ERR] Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder. (code: 1 - NOT_INCLUDED)
		./sub-PR06/ses-QB3/fmap/sub-PR06_ses-QB3_dir-PA_epi.bval
			Evidence: sub-PR06_ses-QB3_dir-PA_epi.bval
		./sub-PR06/ses-QB3/fmap/sub-PR06_ses-QB3_dir-PA_epi.bvec
			Evidence: sub-PR06_ses-QB3_dir-PA_epi.bvec

	Please visit https://neurostars.org/search?q=NOT_INCLUDED for existing conversations about this issue.

	1: [WARN] The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification. (code: 101 - README_FILE_MISSING)

	Please visit https://neurostars.org/search?q=README_FILE_MISSING for existing conversations about this issue.


        Summary:                  Available Tasks:        Available Modalities: 
        44 Files, 697.72MB                                T1w                   
        4 - Subjects                                      dwi                   
        3 - Sessions                                      fieldmap              

Relevant log outputs (up to 20 lines):


 ***********************************
240417-17:07:11,744 nipype.workflow ERROR:
	 could not run node: qsiprep_wf.single_subject_PR06_wf.dwi_preproc_ses_QB3_dir_AP_wf.pre_hmc_wf.dwi_qc_wf.raw_gqi
240417-17:07:11,755 nipype.workflow INFO:
	 crashfile: /out/qsiprep/sub-PR06/log/20240417-145519_45476ef6-464b-4024-b760-86fc3c98a6c4/crash-20240417-152220-subanerjee-raw_gqi-8635c759-eb49-4cb2-839d-1003b50b20c9.txt
240417-17:07:11,757 nipype.workflow ERROR:
	 could not run node: qsiprep_wf.single_subject_PR06_wf.dwi_finalize_ses_QB3_dir_AP_wf.transform_dwis_t1.calculate_qc.raw_gqi
240417-17:07:11,769 nipype.workflow INFO:
	 crashfile: /out/qsiprep/sub-PR06/log/20240417-145519_45476ef6-464b-4024-b760-86fc3c98a6c4/crash-20240417-170507-subanerjee-raw_gqi-1433d6b2-e296-4f81-8899-b803127ade22.txt
240417-17:07:11,774 nipype.workflow ERROR:
	 could not run node: qsiprep_wf.single_subject_PR06_wf.dwi_finalize_ses_QB3_dir_AP_wf.final_denoise_wf.calculate_qc.raw_gqi
240417-17:07:11,786 nipype.workflow INFO:
	 crashfile: /out/qsiprep/sub-PR06/log/20240417-145519_45476ef6-464b-4024-b760-86fc3c98a6c4/crash-20240417-170639-subanerjee-raw_gqi-c06b5cd6-ff1e-4cba-804a-ed3669b9d8cb.txt
240417-17:07:11,788 nipype.workflow INFO:
	 ***********************************
QSIPrep failed: 3 raised. Re-raising first.
RuntimeError: Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/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 raw_gqi.

Cmdline:
	dsi_studio --action=rec --method=4 --align_acpc=0 --check_btable=0 --dti_no_high_b=1 --source=/scratch/282809.1.member.q/qsiprep_1_sub-PR06/qsiprep_wf/single_subject_PR06_wf/dwi_preproc_ses_QB3_dir_AP_wf/pre_hmc_wf/dwi_qc_wf/raw_gqi/sub-PR06_ses-QB3_dir-AP_dwi_merged.src.gz --num_fiber=3 --thread_count=-2 --other_output=all --record_odf=1 --r2_weighted=0 --param0=1.2500 --thread_count=-2
Stdout:
	e[1;34mDSI Studio version: Chen"ι™³" Aug  1 2023e[0m
	β”‚ DSI Studio version: Chen"ι™³"
	β”‚ action=rec
	β”‚ source=/scratch/282809.1.member.q/qsiprep_1_sub-PR06/qsiprep_wf/single_subject_PR06_wf/dwi_preproc_ses_QB3_dir_AP_wf/pre_hmc_wf/dwi_qc_wf/raw_gqi/sub-PR06_ses-QB3_dir-AP_dwi_merged.src.gz
	β”‚ loop=/scratch/282809.1.member.q/qsiprep_1_sub-PR06/qsiprep_wf/single_subject_PR06_wf/dwi_preproc_ses_QB3_dir_AP_wf/pre_hmc_wf/dwi_qc_wf/raw_gqi/sub-PR06_ses-QB3_dir-AP_dwi_merged.src.gz
	β”œβ”€e[1;34mrun rece[0m
	β”‚ β”œβ”€e[1;34mopen SRC file sub-PR06_ses-QB3_dir-AP_dwi_merged.src.gze[0m
	β”‚ β”‚ └─1.984 s
	β”‚ β”œβ”€e[1;34mreconstruction parameters:e[0m
	β”‚ β”‚ β”‚ method=4
	β”‚ β”‚ β”‚ odf_resolving=0
	β”‚ β”‚ β”‚ record_odf=1
	β”‚ β”‚ β”‚ dti_no_high_b=1
	β”‚ β”‚ β”‚ check_btable=0
	β”‚ β”‚ β”‚ other_output=all
	β”‚ β”‚ β”‚ r2_weighted=0
	β”‚ β”‚ β”‚ thread_count=-2
	β”‚ β”‚ β”‚ param0=1.2500
	β”‚ β”‚ β”‚ param1=3000
	β”‚ β”‚ β”‚ param2=0.05
	β”‚ β”‚ β”‚ template 0:"ICBM152_adult.QA.nii"
	β”‚ β”‚ β”‚ template 1:"C57BL6_mouse.QA.nii"
	β”‚ β”‚ β”‚ template 2:"dHCP_neonate.QA.nii"
	β”‚ β”‚ β”‚ template 3:"INDI_rhesus.QA.nii"
	β”‚ β”‚ β”‚ template 4:"Pitt_marmoset.QA.nii"
	β”‚ β”‚ β”‚ template 5:"WHS_SD_rat.QA.nii"
	β”‚ β”‚ β”‚ template=0
	β”‚ β”‚ └─0 ms
	β”‚ β”œβ”€e[1;34mspecify maske[0m
	β”‚ β”‚ β”‚ mask=1
	β”‚ β”‚ └─1 ms
	β”‚ β”œβ”€e[1;34mpreprocessinge[0m
	β”‚ β”‚ β”‚ preprocessing=0
	β”‚ β”‚ β”‚ motion_correction=0
	β”‚ β”‚ └─0 ms
	β”‚ β”œβ”€e[1;34madditional processing stepse[0m
	β”‚ β”‚ β”‚ align_acpc=0
	β”‚ β”‚ └─0 ms
	β”‚ β”œβ”€e[1;34minitializinge[0m
	β”‚ β”‚ └─7 ms
	β”‚ β”‚ e[1;31mERROR:std::bad_alloce[0m
	β”‚ └─2.017 s
	└─2.024 s
	e[1;31mWarning: --num_fiber is not used/recognized. Did you mean --template ?e[0m
	e[1;31mWarning: --thread_count is not used/recognized. Did you mean --other_image ?e[0m
Stderr:

Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 429, in aggregate_outputs
	    predicted_outputs = self._list_outputs()  # Predictions from _list_outputs
	  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/interfaces/dsi_studio.py", line 291, in _list_outputs
	    assert len(results) == 1
	AssertionError



The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/miniconda/bin/qsiprep", line 8, in <module>
    sys.exit(main())
  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/cli/run.py", line 677, in main
    qsiprep_wf.run(**plugin_settings)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/workflows.py", line 638, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/base.py", line 224, in run
    raise error from cause
RuntimeError: 3 raised. Re-raising first.


_____

Hi @suneelbanerjee,

Can you see if this was fixed in 0.20.0? And if not, is the error specific to certain subjects or happening for everyone?

Best,
Steven

Hey Steven,

Thanks for the prompt response. Regarding version 0.20.0, it seems that something about the BIDS Validator is changed, and it throws a fatal error if I try to input my fieldmaps the same way as shown in the validator output here.

This seems to only be happening for one subject, as I have run all the rest (separately) with the same code with no problems.

Hi @suneelbanerjee,

It looks like the error is still there above:

Can you explain why your fmaps need bval and bvec files?

Best,
Steven

These fmap bvals and bvecs just got added to the bids spec recently and won’t be recognized by the older bids validator in 0.19. You can skip bids validation in the qsiprep run if you’ve validated the bids outside of qsiprep.

2 Likes

In 0.19.1, it raises the BIDS-format error and still runs, but in 0.20.0, it does not. The fmaps are reverse phase-encoded and are not all b-0s. See here for a previous discussion with Matt about that: How to get qsiprep to detect fieldmaps? Β· Issue #644 Β· PennLINC/qsiprep Β· GitHub

Thanks, Matt! Let me turn off bids-validation and re-run this with version 0.20.0.