Not Included Error: .bval and .bvec fmap files

This is cross-post from here.

My issue is that I have B0 images for my DWI data, but they don’t pass the BIDS validation, even when I include .bidsignore. I was wondering if there’s some underlying issue that I’m missing.

Thanks for the help.

1 Like

About the .bidsignore file–in your other post you show having included the files with " around the names. Try without the ", just :

sub-C01086/ses-01/fmap/sub-C01086_ses-01_run-05_epi.bval
sub-C01086/ses-01/fmap/sub-C01086_ses-01_run-05_epi.bvec

In my files I have had a similar issue because of a bug in the Siemens diffusion sequence. I believe the fmap folder does not expect any files with epi.bval or epi.vec ending, just the fieldmap. I think that your B0’s, if intended to be used as a fieldmap, should just be one volume, which doesn’t need accompanying .bval or .bvec files. In my case, these were generated because my fieldmap sequence accidentally ended up with several volumes and not just one. If this is your case too, I have some more (untested as yet) guidance on how you might try fixing your dataset.

1 Like

Thanks @Ursula_Tooley, removing the quotation marks did the trick! This is my first foray into DWI data, so I’m a bit unsure how this output would be affected in the processioning stream. Are you saying that instead of the .bvec and .bval files it should just be one file with _epi.nii.gz?

Yup, that’s my impression! I’m also not an expert on dwi so I hope others chime in as well, but I believe your B0 fieldmaps should just be single volumes. You can separate them from your DWI data, or if your fieldmaps are accidentally more than one volume, turn them into just one. If you have several B0s in a row in your fieldmap image that you want to combine into one fieldmap image, you can do something like 3dcalc -a 'fmap.nii.gz[0..N]' -expr '1*a' -prefix sub-C01086_ses-01_run-05_epi.nii.gz.

Does that make sense? Also this is all courtesy of @mattcieslak, who was generous enough to explain all this to me when I was trying to figure out what the heck was wrong with our TOPUP sequences.

1 Like

Ah, okay. There’s also a sub-C01086_ses-01_run-05_epi.nii.gz file (with 7 volumes) from my dicom -> bids conversion, which is what I was hoping to get, so I guess the .bvec and .bval files are unnecessary byproducts.

Thanks for bringing this to my attention. I’m also going to check with my MRI physicist about these and our diffusion sequences.

Yup! In case you have the problem we have, here’s the info I know:

The DTI TOPUP scan is giving the BIDS validator problems.
-The fmap has associated .bval and .bvec files which are not in the BIDS specification, because the TOPUP scan collects one b=0 and several b=1000, erroneously.
-Specifically, “It’s because the siemens diffusion sequence here requires at least one non-b0 image to run. There is no option for acquiring just a single b=0 volume at the moment. If you write your own sampling schemes, which is how we’ve been doing it, the scanner automatically adds a b=0 to the beginning of the sequence. So if you request a b=0 and one b>0 (required) you end up with 2 b=0 scans and a b>0 scan.”

Awesome, thanks for the info!

There is a a B0 fieldmap that creates phasediff/phases and magnitude images that should definitely not have bvals and bvecs. @dlevitas do you mean your fieldmaps are b=0 images that should be used in topup to distortion correct diffusion images? In that case @Ursula_Tooley’s approach with adding the bval/bvec files to .bidsignore is a good way to do it. If you’re preprocessing with qsiprep, the bval and bvec files in the fmap directory will be read and used to extract b=0 images for topup.

2 Likes

Hi @mattcieslak, yes, these are b=0 images for topup distortion correction. In that case I’ll keep the .bvec and .bval files but place their paths in .bidsignore.

FYI: We just were in a similar situation and tried to discard the first slice of the DICOM series during conversion to nifti. The output passes the bids-validator then, because no bval/bvec files are created and, given a correct IntendedFor key in the json, qsiprep picks up the fmap file for topup.