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!
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
Hi! Have you solved the problem? Iâve got the same one Although I specify that not fieldmap is needed, it still looks for it and I get the same error.
This is an old issue, and it is hard to help with the limited amount of information you provided. Can you please make sure youâre using the most recent qsiprep version, and then if youâre still getting an error, open up a Software Support post and fill in all the information.
Hi Steven,
Actually, I have the same problem, and I used qsiprep_1_0_wf to analyze. When I checked my DWI Josn file, I found it didnât include the TotalReadoutTime. Below is my submission script.
Second, my datasets did not include fieldmap data and different phase encoding directions data, but I want to use the [Fieldmap-less estimation (experimental)] method to apply Susceptibility correction. So I add --use-syn-sdc, But I am so confused If I need to add command âignore fieldmaps? And if my script needs any correction. Looking forward to your reply.
Sincerely
You need TotalReadoutTime in your DWI json if you want to do any distortion correction. For the fieldmapless method, you do not need to ignore field maps unless you have files in the fmap folder you are trying to ignore.
I am so happy to receive your reply. Actually, I have reanalysis converted .dcm to NII data using heudiconv. But the DWI josn file didnât include the TotalReadoutTime. If I calculate the TotalReadoutTime and add it to my DWI josn file manually, is it possible?
Whatever, I read the neurostars other questions, and acquired the TotalReadoutTime = Echo spacing * (ReconMatrixPE - 1). But I checked my DWI josn file, and it also didnât include Echo spacing. So I asked Chatgpt (hope it is right), and it told me Echo Spacing= 1/Bandwidth Per Pixel Phase Encode. So now, I know
âPixelBandwidthâ: 1595,
âAcquisitionMatrixPEâ: 112.
And according the equation, the TotalReadoutTime is 1/1595*(112-1)=0.06959
Are my calculations correct?
Looking forward to your reply,
Sincerely
Yes if you calculate the TotalReadoutTime you can add it to your JSONS. I donât know well enough if that calculation is correct. But, I think for your purposes, you can just use one value for all your images (something reasonable like 20-50 ms), and see how that works. Just make sure the same value is used for all images.
Hi Steven! Thank you so much for your feedback. My problem is identical to @Yufeng_He, the issue is with the TotalReadoutTime which is absent in the json file.
Same solution should work for you too. Also qsiprep is now maintained under the pennlinc (not pennbbl) dockerhub repo. I recommend not using the latest tag and u stead using a numbered version so you donât unknowingly switch versions mid study.
@Steven, thank you so much, it was very helpful! I replaced pennbbl with pennlinc, indicated the version, and finally got the output for the âfiguresâ folder.
Regarding TotalReadoutTime: I manually set the TotalReadoutTime in my JSON file and it worked (unfortunately, I donât have parameters needed to calculate TotalReadoutTime, so I just picked an approximate number that other people use), e.g.