Hi there,
I’ve got a BIDS dataset with a bunch of different files and tried to name them to retain enough information so they would be unique, while maintaining BIDS format. However I’m getting a lot of errors about naming which myself/my lab mates don’t know how to fix.
Also there’s a second error about ‘volume counts’ that I don’t understand.
Any information or suggestions would be greatly appreciated
Data formatted according to a validatable standard? Please provide the output of the validator:
#### **Error 1: [Code 1] NOT_INCLUDED**
#### **sub-01S0301_ses-1_acq-e2ph_run-5_phasediff2.json** **2.665 KB | application/json**
Location: bidsdata/sub-01S0301/ses-1/fmap/sub-01S0301_ses-1_acq-e2ph_run-5_phasediff2.json
Reason: 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.
Evidence: sub-01S0301_ses-1_acq-e2ph_run-5_phasediff2.json
#### **sub-01S0301_ses-1_acq-e2ph_run-5_phasediff2.nii.gz** **1737.74 KB | application/x-gzip**
Location: bidsdata/sub-01S0301/ses-1/fmap/sub-01S0301_ses-1_acq-e2ph_run-5_phasediff2.nii.gz
Reason: 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.
Evidence: sub-01S0301_ses-1_acq-e2ph_run-5_phasediff2.nii.gz
#### **sub-01S0301_ses-1_run-4_acq-e1_magnitude1.json** **1.66 KB | application/json**
Location: bidsdata/sub-01S0301/ses-1/fmap/sub-01S0301_ses-1_run-4_acq-e1_magnitude1.json
Reason: 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.
Evidence: sub-01S0301_ses-1_run-4_acq-e1_magnitude1.json
- - - -
#### **Error 2: [Code 29] VOLUME_COUNT_MISMATCH**
"The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files.2 files"
#### **sub-01S0301_ses-1_acq-ep2d_run-11_dwi.nii.gz**
bidsdata/sub-01S0301/ses-1/dwi/sub-01S0301_ses-1_acq-ep2d_run-11_dwi.nii.gz
Reason:The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files.
#### **sub-01S0333_ses-2_acq-2mmb1000b2500_run-13_dwi.nii.gz**
bidsdata/sub-01S0333/ses-2/dwi/sub-01S0333_ses-2_acq-2mmb1000b2500_run-13_dwi.nii.gz
Reason:The number of volumes in this scan does not match the number of volumes in the corresponding .bvec and .bval files.
Screenshots / relevant information:
I included a “run-__” element because some of the files had all the same features except there was another number in them, so it’s not actually ‘run-15’ etc, it’s just the unique number that I could find in the dcm2niix names that would allow me to put all of them in a folder together while trying to maintain BIDS naming format.
Does anyone know if there are restrictions for what can be in ‘acq-____’ or for the numbers that follow phasediff, magnitude etc? (I used those because the dcm2niix names said ‘ph1’, ‘ph2’, … and ‘mag1’, ‘mag2’ etc.) I’ve looked at all the examples and I can’t figure it out.
Below is a screenshot of my files and the pasted BIDS-validator (online app) output. Thank you in advance for any help or information!
-Kaley
Hi Steven,
Thank you so much for your help! I implemented those things about naming. The volume matching I found was because of a missing .json file. However, even with this new naming I’m still getting a naming error for every single file I upload, that the naming specification is NOT_INCLUDED. I’ve read the whole bids specification and looked at every example dataset and I cannot figure out what is wrong. Any ideas?
You say you get that error for every file, but it looks like only 16 have errors, and there are more than 16 in the file list you provided. It would help if I could see the full BIDS validator output. Ideally you would use the command-line BIDS validator and return the output here as formatted code so it looks nice
like this (use </> button in the text editor)
I would take out any periods in your file names that are not for the file extension (e.g., acq-3.5mm). It also looks weird that you have a func and DWI file pair without a run label. Errors in fmap too: You have a magnitute.json/.nii.gz, but that has to be paired with a fieldmap.nii.gz (see case #3:Magnetic Resonance Imaging - Brain Imaging Data Structure v1.9.0). It looks like instead you should be following case #2 which needs magnitude1 and magnitude2.
Across the dataset I would consider only adding acquisition labels if they are not (e.g., acq-t2 for the T2 images) or misleading (e.g., acq-e2 for the phasediff image).
Hi Steven,
Thanks for this. I would send the bids-validator output but unfortunately I can’t install the command line tool in my env (don’t have sudo privileges) and I also can’t install a singularity/docker because my env doesn’t have that either. If it helps, i downloaded the error log from the online GUI and attached it. (*However the error logs are only for each subject folder-- when i try to use the GUI and upload my whole dataset, the tab crashes-- so ignore the folder errors, bc the way I do it, it doesn’t see the parent folder aka the subject folder and it thinks the files aren’t in the right subject)
I can use the online bids-validator GUI and the python tool, which I use to check the whole database:
from bids_validator import BIDSValidator
BIDSValidator().is_bids('/path/to/dataset')
I changed the decimals in my dataset. I took out extranneous details, so no duplicate meanings in the acq and only including run numbers where is necessary, for both dwi and func.
I changed also the fieldmap endings according to the case#2 specification, with magnitude and phase. Though I have also phase/magnitude 3 and 4 because my files will sometimes be e1, e2, e3 and e4. Hopefully that could still pass bids?
But still, even for really simple files, I’m getting naming errors:
When you run the BIDS validator, do you input the subject directory or the BIDS root directory? Based on the “0 subjects” in the image I imagine you are putting in the subject folder, you should do the root directory. You can also install the BIDS validator command line tool in a virtual environment (e.g., Anaconda).