Fmriprep-docker caused Participant_id_pattern and NIFTI_TO_SMALL error

Hello, I’m really new to neuroimaging and I’m trying to use fmriprep-docker preprocess my data. After running fmriprep-docker on folder

fmriprep-docker D:\study_notes\dartbrain\data\Localizer D:\study_notes\dartbrain\data\preproc participant --participant_label sub-S01 --write-graph --fs-no-reconall --notrack --fs-license-file D:\study_notes\dartbrain\license\license.txt --work-dir D:\study_notes\dartbrain\data\work

I got error

1: [ERR] This file is too small to contain the minimal NIfTI header. (code: 36 - NIFTI_TOO_SMALL)
2: [ERR] Participant_id column labels must consist of the pattern "sub-<subject_id>". (code: 212 - PARTICIPANT_ID_PATTERN)
                        @ line: 1
                        Evidence: Column headers: participant_id,........

I’m pretty confused about this. I searched it on Google but the info is limited. How can I solve this problem? Thanks!


A few things would help:

  1. What version of fMRIPrep are you using?
  2. Is D:\study_notes\dartbrain\data\Localizer a BIDS-valid dataset?
  3. If you have FSL installed, can you run fslinfo on one/both of those files and print the output?
  4. Is this error subject specific or occurs on everyone?
  5. For the sake of testing, can you either temporarily relocate the phenotype stuff casuing errors or alternatively add a text file called .bidsignore in the root BIDS directory, containing phenotype/?


1, fMRIPrep v21.0.1
2, The description of the dataset said that they have “fixed a few issues with BIDS formatting and have also performed preprocessing using fmriprep.” However, I checked the dataset with BIDS Validator, the validator said the dataset isn’t a valid BIDS dataset and give me the same errors as above. For convenience, here is the link to the dataset:

How did you download the dataset? And hopefully my 5th point will address the phenotype error.

Sure! So I downloaded the dataset by using datalad.api for python. The specific codes are

localizer_path = 'D:\study_notes\dartbrain\Localizer'
dl.clone(source='', path=localizer_path)
ds = dl.Dataset(localizer_path)
result = ds.get(os.path.join(localizer_path, 'sub-S01'))
result = ds.get(glob.glob(os.path.join(localizer_path, '*.json')))
result = ds.get(glob.glob(os.path.join(localizer_path, '*.tsv')))
result = ds.get(glob.glob(os.path.join(localizer_path, 'phenotype')))

file_list = glob.glob(os.path.join(localizer_path, '*', 'fmriprep', 'sub*'))
for f in file_list[:20]:
    result = ds.get(f)

I relocated the phenotype and the participant_id problems are addressed. Thanks.

What are the sizes (like memory storage) of these .nii.gz files? I’m wondering if you only have the datalad identifiers and not the full file. Have you been able to run fslinfo On these files?

Yeah you are right! Some files are not the full files. I’m not familiar with the file types of neuroimaging data so I didn’t think about that.
Just wondering how long will the preprocessing be? I only run the command on the sub_S01 which contains no more than 10 files but it has been run for more than half-hour. It stucks one file. Is that reasonable? How can I pause the process and correct the file if one file is not the full file? THX!

Run times vary based on the computation resources available, data per subject, and if you’ve already run fmriprep for that subject. It is not uncommon for preprocessing to take up to a day. As long as you reuse work directories, fmriprep will begin where the last job left off if you restart the job.