Fmriprep anat folder files generating filenames that are not part of the BIDS specification

Hello. I have a multi-session dataset where participants obtain multiple T1w scans. Running fmriprep generates an anat/ folder with mean T1w images, however, the filenames it generates does not seem to pass the BIDS specification. Anyone know the reason why that is?

fmriprep v23.0.1
bids-validator v1.12.0

Log:

[ERR] 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 GitHub - bids-standard/bids-validator: Validator for the Brain Imaging Data Structure 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. (code: 1 - NOT_INCLUDED)
./sub-SID000002/anat/

                    Evidence: sub-SID000002_acq-MPRAGEXp3X08mm_desc-brain_mask.json
            ./sub-SID000002/anat/sub-SID000002_acq-MPRAGEXp3X08mm_desc-brain_mask.nii.gz
                    Evidence: sub-SID000002_acq-MPRAGEXp3X08mm_desc-brain_mask.nii.gz
            ./sub-SID000002/anat/sub-SID000002_acq-MPRAGEXp3X08mm_desc-preproc_T1w.json
                    Evidence: sub-SID000002_acq-MPRAGEXp3X08mm_desc-preproc_T1w.json
            ./sub-SID000002/anat/sub-SID000002_acq-MPRAGEXp3X08mm_desc-preproc_T1w.nii.gz
                    Evidence: sub-SID000002_acq-MPRAGEXp3X08mm_desc-preproc_T1w.nii.gz
            ... and 24255 more files having this issue (Use --verbose to see them all).

Similarly, fmriprep-generated /figures/ folders generates filenames with the ses- entity in it, which then gets flagged by the BIDS-validator as not matching the directory it is “supposed” to be in.

Log:

[ERR] Session label in the filename doesn’t match with the path of the file. File seems to be saved in incorrect session directory. (code: 65 - SESSION_LABEL_IN_FILENAME_DOESNOT_MATCH_DIRECTORY)
./sub-SID000002/figures/
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00000_desc-pepolar_fieldmap.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00005_desc-pepolar_fieldmap.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00005_desc-pepolar_fieldmap.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00007_desc-pepolar_fieldmap.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00007_desc-pepolar_fieldmap.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00010_desc-pepolar_fieldmap.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00010_desc-pepolar_fieldmap.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00015_desc-pepolar_fieldmap.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_acq-mb8_fmapid-auto00015_desc-pepolar_fieldmap.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-aroma_bold.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-aroma_bold.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-carpetplot_bold.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-carpetplot_bold.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-compcorvar_bold.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-compcorvar_bold.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-confoundcorr_bold.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-confoundcorr_bold.svg is saved in incorrect session directory as per ses-id in filename.
./sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-flirtbbr_bold.svg
Evidence: File: /sub-SID000002/figures/sub-SID000002_ses-01_task-movemap_acq-mb8_run-1_desc-flirtbbr_bold.svg is saved in incorrect session directory as per ses-id in filename.
… and 7656 more files having this issue (Use --verbose to see them all).

derivatives data (such as the ones created by fmriprep) are not “yet” validated by the bids validator, so the errors you are seeing are expected.

1 Like

Thank you @Remi-Gau! Unfortunately this seems to affect my ability to run BIDS apps that rely on pyBDIS (like your wonderful BIDSMReye!). In this same data, I am also getting [ERR] No BIDS compatible data found for at least one subject. (code: 67 - NO_VALID_DATA_FOUND_FOR_SUBJECT)
./sub-SID000002
./sub-SID000743
./sub-SID001567
./sub-SID001641
./sub-SID001651
./sub-SID001684
./sub-SID001804
./sub-SID001852
./sub-SID001907
./sub-SID002035

Even though there is data within each folder, BIDS-validator, and consequently pyBIDS doesn’t seem to think so.

Which version of bidsmreye are you using?

Asking because I think I have seen something that sounds similar in the past and I think I have fixed it so it may be a version issue.

I am currently using 0.3.1 @Remi-Gau

[f003z4j@polaris func]$ pip show bidsmreye
Name: bidsmreye
Version: 0.3.1
Summary: bids app using deepMReye to decode eye motion for fMRI time series data
Home-page: GitHub - cpp-lln-lab/bidsMReye: BIDS app using deepMReye to decode eye motion for fMRI time series data.
Author: Remi Gau
Author-email:
License: LGPL-3.0
Location: /dartfs-hpc/rc/home/j/f003z4j/miniconda3/envs/physio/deepmreye/lib/python3.9/site-packages
Requires: attrs, chevron, deepmreye, kaleido, pooch, pybids, rich, tqdm
Required-by:

1 Like