Qsiprep disregards disregards fieldmaps

Summary of what happened:

I have organised my data in BIDS format. In addition to my dWI image, I have acquired two field maps, one in j- (like my dwi data) and the other in j direction. I’ve run qsiprep as a singularity image with the command given below and it seems that it just disregards both fieldmaps. Also, it seems that topup was not run.

I can see why disregarding the fieldmap with the same direction like the dMRI data may be reasonable if the B0 from there are used instead, but why does qsiprep not use the one with the inverse polarity?

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

singularity run --cleanenv -B $BIDS_DIR,$W_DIR,$QSI_OUT,$SOFTWARE_DIRS /data/software/qsiprep-1.0.0rc1.sif $BIDS_DIR $QSI_OUT participant -w $W_DIR --participant-label <label> --skip-bids-validation --output-resolution 1.6 --fs-license-file $FS_LICENSE --resource-monitor --nthreads 16 --stop-on-first-crash

Version:

1.0.0rc2.dev0+g789be41.d20241119

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

Singularity container, created from Docker image according to instructions on web site.

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

BIDS validator gives no error message.

Relevant log outputs (up to 20 lines):

Diffusion data preprocessing

Any images with a b-value less than 100 s/mm^2 were treated as a b=0 image. MP-PCA denoising as implemented in MRtrix3’s dwidenoise(Veraart et al. 2016) was applied with a auto-voxel window. When phase data were available, this was done on complex-valued data. After MP-PCA, the mean intensity of the DWI series was adjusted so all the mean intensity of the b=0 images matched across eachseparate DWI scanning sequence. B1 field inhomogeneity was corrected using dwibiascorrect from MRtrix3 with the N4 algorithm (Tustison et al. 2010) after corrected images were resampled.

FSL (version None)’s eddy was used for head motion correction and Eddy current correction (Andersson and Sotiropoulos 2016). Eddy was configured with a q-space smoothing factor of 10, a total of 5 iterations, and 1000 voxels used to estimate hyperparameters. A linear first level model and a linear second level model were used to characterize Eddy current-related spatial distortion. q-space coordinates were forcefully assigned to shells. Field offset was attempted to be separated from subject movement. Shells were aligned post-eddy. Eddy’s outlier replacement was run (Andersson et al. 2016). Data were grouped by slice, only including values from slices determined to contain at least 250 intracerebral voxels. Groups deviating by more than 4 standard deviations from the prediction had their data replaced with imputed values. Final interpolation was performed using the jac method.

Screenshots / relevant information:

Both field maps are located in the /fmap directory and accopanied by .json files that have the correct β€œIntendedFor” attrivbute to linking them to the file in the /dwi directory:

.
β”œβ”€β”€ anat
β”‚   β”œβ”€β”€ sub-gr01_T1w.json
β”‚   └── sub-gr01_T1w.nii.gz
β”œβ”€β”€ dwi
β”‚   β”œβ”€β”€ sub-gr01_dwi.bval
β”‚   β”œβ”€β”€ sub-gr01_dwi.bvec
β”‚   β”œβ”€β”€ sub-gr01_dwi.json
β”‚   └── sub-gr01_dwi.nii.gz
└── fmap
    β”œβ”€β”€ sub-gr01_acq-invpol_epi.json
    β”œβ”€β”€ sub-gr01_acq-invpol_epi.nii.gz
    β”œβ”€β”€ sub-gr01_acq-norm_epi.json
    └── sub-gr01_acq-norm_epi.nii.gz

This is the relevant portion in the respective JSON files:

    "ImageOrientationText": "Tra>Cor(-15.0)",
    "InPlanePhaseEncodingDirectionDICOM": "COL",
    "ConversionSoftware": "dcm2niix",
    "ConversionSoftwareVersion": "v1.0.20220720",
    "Dcm2bidsVersion": "3.1.1",
    "IntendedFor": "bids::sub-gr01/dwi/sub-gr01_dwi.nii.gz"
}

Hi @t_p and welcome to neurostars!

Please provide the contents of the fmap jsons and the tree structure of a subject’s raw data directory.

Best,
Steven

Thank you for your response! I’ve added the requested information to my original post.

Hi @t_p,

QSIPrep does not accept the BIDS URI version of IntendedFor at the moment. Please use the older, relative path, version of IntendedFor instead by removing the bids://sub-grxx/ from the entries.

It will also help to show the phase encoding directions for the DWI and fmap.

Best,
Steven

1 Like

I wasn’t aware of that.–Thank you so much, removing this part of the path seems to have done the trick!