Question about Susceptibility Distortion Correction (SDC) in fMRIPrep with Fieldmaps

Summary of what happened:

I am writing to clarify some questions regarding Susceptibility Distortion Correction (SDC) in fMRIPrep:

  1. If fieldmaps (fmap) are provided in a valid BIDS format, will fMRIPrep automatically detect and apply them for SDC? If not, what command-line option should I explicitly use to enable SDC?
  2. The fMRIPrep documentation states:
    β€œPlease note that all routines for susceptibility-derived distortion correction have been excised off of fMRIPrep for utilization on other projects (e.g., dMRIPrep). For more detailed documentation on SDC routines, check on www.nipreps.org/sdcflows.”*

Does this mean that fMRIPrep no longer implements SDC at all, or just that the implementation has been modularized and can still be invoked?

  1. I have fieldmaps available, but the final fMRIPrep report shows β€œSusceptibility distortion correction: None”. My file structure follows BIDS convention, so I am wondering why SDC was not applied.

Command used (and if a helper script was used, a link to the helper script or the command generated):

Here is the command I used:

#!/bin/bash
singularity run --cleanenv /home/hujian/HJ/soft/fmriprep.simg \
/home/preprocess/data \
/home/preprocess/out \
--nprocs 40 --omp-nthreads 1 \
--use-aroma --aroma-melodic-dimensionality -200 \
--output-spaces fsaverage5 MNI152NLin2009cAsym:res-2 \
--low-mem \
--write-graph \
--cifti-output 91k \
--fs-license /home/hujian/soft/freesurfer/license.txt \
-w /home/preprocess/out/temporal \
participant

Version:

Environment (Docker, Singularity / Apptainer, custom installation):

Singularity

Data formatted according to a validatable standard? Please provide the output of the validator:

  1. I added the following "IntendedFor" field to my fieldmap JSON:
"IntendedFor": [ 
    "bids::sub-0002/ses-01/func/sub-0002_ses-01_task-multi_run-1_bold.nii.gz", 
    "bids::sub-0002/ses-01/func/sub-0002_ses-01_task-multi_run-2_bold.nii.gz"   
]

But I received this validator error:

[ERR] 'IntendedFor' field needs to point to an existing file. (code: 37 - INTENDED_FOR)
./sub-0002/ses-01/fmap/sub-0002_ses-01_dir-AP_epi.nii.gz
Evidence: bids::sub-0002/ses-01/func/sub-0002_ses-01_task-multi_run-1_bold.nii.gz
./sub-0002/ses-01/fmap/sub-0002_ses-01_dir-AP_epi.nii.gz
Evidence: bids::sub-0002/ses-01/func/sub-0002_ses-01_task-multi_run-2_bold.nii.gz

However, the files do exist at the specified locations. Could you please clarify the correct format for the IntendedFor field when using absolute BIDS URIs?

Relevant log outputs (up to 20 lines):

PASTE LOG OUTPUT HERE

Screenshots / relevant information:


Hi @cjxjoy and welcome to neurostars!

In the future please use the Software Support post template which helps organize your post and asks for relevant information. You can see I edited in for you this time, and there is still missing information you can provide by editing your post. You can also see that I have edited your code/terminal text accordingly with the </> button in the text editor. Please use that for future code/terminal text.

No, you need to use IntendedFor or B0FieldIdentifier/B0FieldSource method (keep in mind if both are specified, fMRIPrep will default to the B0 metadata even if it is incorrect).

No, it just means all of the SDC code is in a different repo, called SDCFlows (GitHub - nipreps/sdcflows: Susceptibility Distortion Correction (SDC) workflows for EPI MR schemes). SDCFlows is used by fMRIPrep.

It appears based on your error that IntendedFor was not set correctly.

Please provide the tree directory structure of this subject, and the contents of the fieldmap jsons.

Best,
Steven

Thank you very much for your detailed explanation. Regarding the path issue, I have resolved it by referring to the example on the BIDS website. Thanks again!

Hello @Steven ,
I am having the same issue. I see: Susceptibility distortion correction: None even though my IntendedFor field is correct.
Although I do not get any error regarding β€œfile not found”

My code:

bids_root_dir=/home/lotlikar/EXSD_MRI_dataAnalyses
subj=EXSD02
nthreads=6
mem=24 #gb
container=docker #docker or singularity
workdir=/home/lotlikar/WorkingDir

#Begin:

#Convert virtual memory from gb to mb
mem=`echo "${mem//[!0-9]/}"` #remove gb at end
mem_mb=`echo $(((mem*1000)-5000))` #reduce some memory for buffer space during pre-processing

#export FSL license 
export FS_LICENSE=home/lotlikar/EXSD_MRI_dataAnalyses/code/license.txt

#Run fmriprep
  fmriprep-docker $bids_root_dir/ $bids_root_dir/derivatives/ \
    participant \
    --participant-label $subj \
    --md-only-boilerplate \
    --fs-license-file license.txt \
    --output-spaces MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
	--write-graph\
	--bids-filter-file /home/lotlikar/EXSD_MRI_dataAnalyses/code/T2SessionfMRIprep.json \
    --mem_mb $mem_mb \
	--skip-bids-validation\
	--ignore slicetiming\
	-w $workdir```

For task-bold, I am using fmap , acq-2mm, dir AP and PA. Here is the IntendedFor field from the fmap’s JSON file. Its same for both the directions

"IntendedFor": [
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-Block1_bold.nii.gz",
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-Block2_bold.nii.gz",
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-Block3_bold.nii.gz",
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-Block4_bold.nii.gz",
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-Block5_bold.nii.gz"
    ]

Next, I also have a task-rest bold. I am using acq-3mm, dir AP and PA. Its IntendedFor field is:

IntendedFor": [
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-rest_echo-1_bold.nii.gz",
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-rest_echo-2_bold.nii.gz",
        "bids::sub-EXSD02/ses-T2/func/sub-EXSD02_ses-T2_task-rest_echo-3_bold.nii.gz"
    ]

Tree directory:

β”œβ”€β”€ ses-T0
β”‚   β”œβ”€β”€ anat
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-FIL_T1w.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-FIL_T1w.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-FIL_T2w.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-FIL_T2w.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-ORIG_T1w.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-ORIG_T1w.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-ORIG_T2w.json
β”‚   β”‚   └── sub-EXSD02_ses-T0_acq-ORIG_T2w.nii.gz
β”‚   β”œβ”€β”€ fmap
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-3mm_dir-AP_epi.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-3mm_dir-AP_epi.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T0_acq-3mm_dir-PA_epi.json
β”‚   β”‚   └── sub-EXSD02_ses-T0_acq-3mm_dir-PA_epi.nii.gz
β”‚   └── func
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-01_echo-1_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-01_echo-1_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-01_echo-2_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-01_echo-2_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-01_echo-3_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-01_echo-3_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-02_echo-1_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-02_echo-1_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-02_echo-2_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-02_echo-2_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T0_task-rest_run-02_echo-3_bold.json
β”‚       └── sub-EXSD02_ses-T0_task-rest_run-02_echo-3_bold.nii.gz
β”œβ”€β”€ ses-T1
β”‚   β”œβ”€β”€ anat
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-FIL_T1w.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-FIL_T1w.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-FIL_T2w.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-FIL_T2w.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-ORIG_T1w.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-ORIG_T1w.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-ORIG_T2w.json
β”‚   β”‚   └── sub-EXSD02_ses-T1_acq-ORIG_T2w.nii.gz
β”‚   β”œβ”€β”€ fmap
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-3mm_dir-AP_epi.json
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-3mm_dir-AP_epi.nii.gz
β”‚   β”‚   β”œβ”€β”€ sub-EXSD02_ses-T1_acq-3mm_dir-PA_epi.json
β”‚   β”‚   └── sub-EXSD02_ses-T1_acq-3mm_dir-PA_epi.nii.gz
β”‚   └── func
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T1_task-rest_echo-1_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T1_task-rest_echo-1_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T1_task-rest_echo-2_bold.json
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T1_task-rest_echo-2_bold.nii.gz
β”‚       β”œβ”€β”€ sub-EXSD02_ses-T1_task-rest_echo-3_bold.json
β”‚       └── sub-EXSD02_ses-T1_task-rest_echo-3_bold.nii.gz
└── ses-T2
    β”œβ”€β”€ anat
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-FIL_T1w.json
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-FIL_T1w.nii.gz
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-FIL_T2w.json
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-FIL_T2w.nii.gz
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-ORIG_T1w.json
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-ORIG_T1w.nii.gz
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-ORIG_T2w.json
    β”‚   └── sub-EXSD02_ses-T2_acq-ORIG_T2w.nii.gz
    β”œβ”€β”€ fmap
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-2mm_dir-AP_epi.json
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-2mm_dir-AP_epi.nii.gz
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-2mm_dir-PA_epi.json
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-2mm_dir-PA_epi.nii.gz
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-3mm_dir-AP_epi.json
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-3mm_dir-AP_epi.nii.gz
    β”‚   β”œβ”€β”€ sub-EXSD02_ses-T2_acq-3mm_dir-PA_epi.json
    β”‚   └── sub-EXSD02_ses-T2_acq-3mm_dir-PA_epi.nii.gz
    └── func
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block1_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block1_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block2_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block2_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block3_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block3_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block4_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block4_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block5_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-Block5_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-rest_echo-1_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-rest_echo-1_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-rest_echo-2_bold.json
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-rest_echo-2_bold.nii.gz
        β”œβ”€β”€ sub-EXSD02_ses-T2_task-rest_echo-3_bold.json
        └── sub-EXSD02_ses-T2_task-rest_echo-3_bold.nii.gz

Hi @Madhura_Lotlikar,

What version of fmriprep are you using? And what is the BIDS validation report? Are fmaps in your BIDS filter file?

Best,
Steven

Hi Steven,
fMRIPrep 23.2.0. There are no errors in BIDS validation report, some warnings,

and yes, fmaps are in my BIDS filter file.

{
  "t1w": {
    "datatype": "anat",
    "session": "T2",
    "suffix": "T1w"
  },
  "bold": {
    "datatype": "func",
    "session": "T2",
    "suffix": "bold"
  },
  "fmap": {
    "datatype": "fmap",
    "session": "T2",
    "suffix": "epi"
  },
  "t2w": {
    "datatype": "anat",
    "session": "T2",
    "suffix": "T2w"
  }
}

Hi @Steven
I ran the bids validator in the command line and got the following errors:


        [ERROR] MISSING_DATASET_DESCRIPTION A dataset_description.json file is required in the root of the dataset


        Please visit https://neurostars.org/search?q=MISSING_DATASET_DESCRIPTION for existing conversations about this issue.

        [ERROR] NOT_INCLUDED 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.
                /bids-validator

        Please visit https://neurostars.org/search?q=NOT_INCLUDED for existing conversations about this issue.

        [ERROR] INVALID_LOCATION The file has a valid name, but is located in an invalid directory.
                /ses-T0/func/sub-EXSD02_ses-T0_task-rest_run-02_echo-3_bold.nii.gz - Expected location: /sub-EXSD02/ses-T0/
                /ses-T0/func/sub-EXSD02_ses-T0_task-rest_run-02_echo-2_bold.json - Expected location: /sub-EXSD02/ses-T0/

                72 more files with the same issue

        Please visit https://neurostars.org/search?q=INVALID_LOCATION for existing conversations about this issue.

        [ERROR] SIDECAR_KEY_REQUIRED A data file's JSON sidecar is missing a key listed as required.
                TaskName
                /ses-T0/func/sub-EXSD02_ses-T0_task-rest_run-02_echo-3_bold.nii.gz - Field description: Name of the task.
No two tasks should have the same name.
The task label included in the filename MAY be derived from this `"TaskName"` field
by removing all non-alphanumeric or `+` characters (that is, all except those matching `[0-9a-zA-Z+]`),
and potentially replacing spaces with `+` to ease readability.
For example `"TaskName"` `"faces n-back"` or `"head nodding"` could correspond to task labels
`faces+n+back` or `facesnback` and `head+nodding` or `headnodding`, respectively.

                /ses-T0/func/sub-EXSD02_ses-T0_task-rest_run-01_echo-2_bold.nii.gz - Field description: Name of the task.
No two tasks should have the same name.
The task label included in the filename MAY be derived from this `"TaskName"` field
by removing all non-alphanumeric or `+` characters (that is, all except those matching `[0-9a-zA-Z+]`),
and potentially replacing spaces with `+` to ease readability.
For example `"TaskName"` `"faces n-back"` or `"head nodding"` could correspond to task labels
`faces+n+back` or `facesnback` and `head+nodding` or `headnodding`, respectively.


                10 more files with the same issue

I am not sure about invalid directory.

Hi @Madhura_Lotlikar,

That may be too old to accept the BIDS-URI style of IntendedFor. The relative path version of IntendedFor (i.e. remove bids::sub-xxxx/ from all entries) should be backwards compatible, or you can upgrade fMRIPrep to incorporate other pipeline improvements (25.2.0 was released today).

I would also fix the validator errors before processing. Make sure to use the most recent validator GitHub - bids-standard/bids-validator: Validator for the Brain Imaging Data Structure

Best,
Steven

Hi Steven,
So you think it’s because of the old fmriprep version? I have updated it now and I hope that it will work.

Thank you.

Hi @Steven
After updating to the latest version, I have been running into a new error now. I removed the bids-filter-file argument and added the --session-label

RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=28.4.0 -it -v /home/lotlikar/EXSD_MRI_dataAnalyses/code/license.txt:/opt/freesurfer/license.txt:ro -v /home/lotlikar/EXSD_MRI_dataAnalyses:/data:ro -v /home/lotlikar/EXSD_MRI_dataAnalyses/derivatives:/out -v /home/lotlikar/WorkingDir:/scratch nipreps/fmriprep:25.2.0 /data /out participant --participant-label EXSD02 --md-only-boilerplate --nthreads 6 --stop-on-first-crash --write-graph --session-label T2 --mem_mb 19000 --skip-bids-validation --ignore slicetiming -w /scratch --output-spaces MNI152NLin2009cAsym:res-2
Traceback (most recent call last):
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/upath/_protocol.py", line 51, in _fsspec_protocol_equals
    o0 = _fsspec_registry_map[p0]
         ~~~~~~~~~~~~~~~~~~~~^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/collections/__init__.py", line 1015, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/collections/__init__.py", line 1007, in __missing__
    raise KeyError(key)
KeyError: 'bids'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/.pixi/envs/fmriprep/bin/fmriprep", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/cli/run.py", line 40, in main
    parse_args()
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/cli/parser.py", line 920, in parse_args
    config.from_dict({})
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/config.py", line 745, in from_dict
    execution.load(settings, init=initialize('execution'), ignore=ignore)
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/config.py", line 245, in load
    cls.init()
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/config.py", line 512, in init
    cls._layout = BIDSLayout(
                  ^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/bids/layout/layout.py", line 187, in __init__
    _indexer(self)
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/bids/layout/index.py", line 160, in __call__
    self._index_metadata()
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/bids/layout/index.py", line 474, in _index_metadata
    target = self._layout._root.joinpath(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/upath/implementations/local.py", line 166, in joinpath
    if not compatible_protocol("", *other):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/upath/_protocol.py", line 118, in compatible_protocol
    if other_protocol and not _fsspec_protocol_equals(other_protocol, protocol):
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/upath/_protocol.py", line 53, in _fsspec_protocol_equals
    raise ValueError(f"Protocol not known: {p0}")
ValueError: Protocol not known: bids
fMRIPrep: Please report errors to https://github.com/nipreps/fmriprep/issues```

Did you fix the dataset_description.json as indicated by your original validation errors?

Yes @Steven I did. Not sure why it was running before and not anymore

What is the current BIDS validation status with the newest version?

Has an error: (only pasting the first 2 file names. But this error is repeated for all files with resting state bold)

A data file's JSON sidecar is missing a key listed as required.
/sub-EXSD02/ses-T0/func/sub-EXSD02_ses-T0_task-rest_run-02_echo-3_bold.nii.gz (Field description: Name of the task. No two tasks should have the same name. The task label included in the filename MAY be derived from this `"TaskName"` field by removing all non-alphanumeric or `+` characters (that is, all except those matching `[0-9a-zA-Z+]`), and potentially replacing spaces with `+` to ease readability. For example `"TaskName"` `"faces n-back"` or `"head nodding"` could correspond to task labels `faces+n+back` or `facesnback` and `head+nodding` or `headnodding`, respectively. )
/sub-EXSD02/ses-T0/func/sub-EXSD02_ses-T0_task-rest_run-01_echo-2_bold.nii.gz (Field description: Name of the task. No two tasks should have the same name. The task label included in the filename MAY be derived from this `"TaskName"` field by removing all non-alphanumeric or `+` characters (that is, all except those matching `[0-9a-zA-Z+]`), and potentially replacing spaces with `+` to ease readability. For example `"TaskName"` `"faces n-back"` or `"head nodding"` could correspond to task labels `faces+n+back` or `facesnback` and `head+nodding` or `headnodding`, respectively. )

But I just tested if it is working with a slightly older version by passing the argument:
–image nipreps/fmriprep:25.1.4 \ and using the --bids-fiter-file argument for a session.

It runs and does not throw any errors.

However, I would like to use the newest version as it allows --session-label usage.

Sounds like a bug; you should post on the fmriprep github repo.

1 Like