BIDS validator error: ENTITY_NOT_IN_RULE

Hello everyone,

The scanning session includes three tasks (AST, MT, and SST, all with PA phase encoding) and a resting-state scan (PA phase encoding), as well as one topup scan (AP phase encoding) per task and the resting-state scan, for a total of four topup scans. My general goal is to set up the dataset correctly in BIDS format so I can preprocess it with fMRIPrep.

I am having trouble with the topup scans, which are located in the fmap folder. I want to use these scans for distortion correction, but I’m not exactly sure how to prepare them for fMRIPrep or how fMRIPrep applies the correction.

Current filenames in fmap are :
sub-1001_task-AST_acq-topup_dir-AP_epi.json
sub-1001_task-AST_acq-topup_dir-AP_epi.nii.gz
sub-1001_task-SST_acq-topup_dir-AP_epi.json
sub-1001_task-SST_acq-topup_dir-AP_epi.nii.gz
sub-1001_task-MT_acq-topup_dir-AP_epi.json
sub-1001_task-MT_acq-topup_dir-AP_epi.nii.gz
sub-1001_task-rest_acq-topup_dir-AP_epi.json
sub-1001_task-rest_acq-topup_dir-AP_epi.nii.gz

Each JSON contains the IntendedFor field pointing to the corresponding functional scan, for example SST:

"IntendedFor": [
  "func/sub-1001_task-SST_bold.nii"
]

I ran the BIDS validator via Docker, and get this error:
[ERROR] ENTITY_NOT_IN_RULE Entity not listed as required or optional for files with this suffix
/sub-1001/fmap/sub-1001_task-MT_acq-topup_dir-AP_epi.json - task not in rule rules.files.raw.fmap.pepolar
/sub-1001/fmap/sub-1001_task-MT_acq-topup_dir-AP_epi.nii.gz - task not in rule rules.files.raw.fmap.pepolar

  1. How can I fix this error?
  2. How should I prepare the data for fmriprep and how dies fmriporep apply the correction with the topup scans?

Thanks in advance!

Hi @tbn,

Fieldmaps do not use task-<> label.

Best,
Steven

Just to add onto that, to continue to distinguish these files, you could use acq-<label> or run-<index>. The acquisition label should indicate if there were distinct acquisition parameters, while run would indicate that the same parameters were used. Which task they were acquired for is encoded in the IntendedFor field.

I would not use acq-topup, as the PE-polar style of fieldmap is already indicated with the epi suffix.