Qsiprep node inputs : bval_file, bvec_file <undefined>

Hi! I tried qsiprep with fs reconstruction done with freesurfer 7.3.1, and qsiprep 0.16.1.

However, all of my 45 subjects were encountered with crash log like below.

login3.stampede2(1069)$ cat crash-20221121-090623-tg881334-gather_inputs-f7d5ccf4-e07a-44f1-96b1-55a465528bfd.txt 
Node: qsiprep_wf.single_subject_NDARINV0Y8YJ2UR_wf.dwi_preproc_ses_2YearFollowUpYArm1_run_01_wf.hmc_sdc_wf.gather_inputs
Working directory: /out/tmp/qsiprep_wf/single_subject_NDARINV0Y8YJ2UR_wf/dwi_preproc_ses_2YearFollowUpYArm1_run_01_wf/hmc_sdc_wf/gather_inputs

Node inputs:

b0_threshold = 100
bval_file = <undefined>
bvec_file = <undefined>
dwi_file = <undefined>
epi_fmaps = <undefined>
original_files = <undefined>
raw_image_sdc = True
topup_max_b0s_per_spec = 3
topup_requested = False

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 gather_inputs.

Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 398, in run
	    runtime = self._run_interface(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/interfaces/eddy.py", line 76, in _run_interface
	    get_best_b0_topup_inputs_from(
	  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/interfaces/epi_fmap.py", line 204, in get_best_b0_topup_inputs_from
	    spec_lookup[unique_bids_file] = spec_line % spec['TotalReadoutTime']
	TypeError: must be real number, not NoneType

I checked that all the subjects have a valid BIDS file, and have bval and bvec files. However, the error log above shows that the node inputs for bval, bvec are . Is there something that I can do to fix this? Thank you in advance!

Hi,

This looks like the problem. Is TotalReadoutTime defined in your DWI json files?

While we’re at it, can you show the command you used to run QSIPrep, including any other parts of your submissions script that may be relevant?

Thanks,
Steven

1 Like

Thank you @Steven for your response!

The json file for the dwi was the following : {"registration_matrix_T1": [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]], "IntendedFor": "sub-NDARINV0ZTJ2432_ses-2YearFollowUpYArm1_run-01_dwi.nii", "RepetitionTime": 4.2, "EchoTime": 0.089, "FlipAngle": 90.0, "PhaseEncodingDirection": "i"} (it’s from ABCD, but I added “PhaseEncodingDirection” : “i”)

The whole command I ran was the following

#SBATCH -J qsiprep_icx-normal#name of the job #SBATCH -N 2  #24 sub per node, so for 128 subjects, 5.01 neede,d so doing 6  #how many nodes you need #SBATCH -n $1  #how many jobs 
#SBATCH -p icx-normal #skx-dev for faster allocation#flat-quadrant #the queue on stampede 2 to use
#SBATCH -o ./step3_shell_outputs/icx-normal_QSIPREP_preproc.o%j  #change according to you job name
#SBATCH -e ./step3_shell_outputs/icx-normal_QSIPREP_preproc.e%j #change according to you job name
#SBATCH -t 48:00:00
#SBATCH -n 1
#SBATCH -N 1
#SBATCH -c 160
##SBATCH –-mail-user=dyhan0316@gmail.com

echo "hi"

data_pth=/scratch/08834/tg881334/2019/2.BIDS/

sub_save_dir=/scratch/08834/tg881334/2019/5.qsiprep_results/
supp_dir=/work2/08834/tg881334/stampede2/CHA_preproc/CHA_preproc_supplementary_files
sing_img_dir=${supp_dir}/qsiprep-0.16.1.sif
fs_dir=/scratch/08834/tg881334/2019/4.FS_untar

module load tacc-singularity
#change nthreads per omp to like 4 
#infant when 4.5~5 등등
singularity run --cleanenv -B ${data_pth}/:/data:ro,${sub_save_dir}/:/out,${supp_dir}:/freesurfer,${fs_dir}:/fs_input ${sing_img_dir} /data /out participant -w /out/tmp --output_resolution 1.2 --denoise_after_combining --unringing_method mrdegibbs --b0_to_t1w_transform Affine --intramodal_template_transform SyN --fs-license-file /freesurfer/license.txt --skip_bids_validation --freesurfer-input /fs_input --recon-spec mrtrix_multishell_msmt_ACT-hsvs --omp-nthreads 4