Fmriprep error select_xfm node: MNIPediatricAsym:cohort-3' is not in list

Summary of what happened:

Error using MNIPediatricAsym:cohort-3 template with fMRIprep – ValueError: ‘MNIPediatricAsym:cohort-3’ is not in list. Exception raised while executing Node select_xfm.

I have had success using --output-spaces MNIPediatricAsym:res-1:cohort-3 with previous versions of fMRIprep (23.1.0, 20.2.3).

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

# Set directories
singularity_dir="/storage/group/klk37/default/sw"
bids_root_dir="/storage/group/klk37/default/R01_Marketing/bids"

# Run the job itself
unset PYTHONPATH

singularity run --cleanenv $singularity_dir/fmriprep-23.2.0.simg \
        $bids_root_dir/raw_data $bids_root_dir/derivatives/preprocessed/fmriprep_v2320 \
        participant \
        --participant_label 002 \
        --verbose \
        --output-spaces MNIPediatricAsym:res-1:cohort-3 \
        --fs-license-file $FS_LICENSE \
        --work-dir $bids_root_dir/code/fmriprep/sub-002/work_v2320


Version:

23.2.0

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

Singularity

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

         Making sure the input data is BIDS compliant (warnings can be ignored in most cases).
bids-validator@1.14.0
(node:1054779) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
        ^[[33m1: [WARN] The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification. (code: 101 - README_FILE_MISSING)^[[39m

^[[36m  Please visit https://neurostars.org/search?q=README_FILE_MISSING for existing conversations about this issue.^[[39m

        ^[[33m2: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)^[[39m

^[[36m  Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.^[[39m

        ^[[33m3: [WARN] The Name field of dataset_description.json is present but empty of visible characters. (code: 115 - EMPTY_DATASET_NAME)^[[39m

^[[36m  Please visit https://neurostars.org/search?q=EMPTY_DATASET_NAME for existing conversations about this issue.^[[39m

        ^[[34m^[[4mSummary:^[[24m^[[39m                 ^[[34m^[[4mAvailable Tasks:^[[24m^[[39m        ^[[34m^[[4mAvailable Modalities:^[[39m^[[24m
        809 Files, 6.34GB        foodview                MRI
        26 - Subjects            sst
        1 - Session


Relevant log outputs (up to 20 lines):

Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 344, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node select_xfm.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 429, in aggregate_outputs
	    predicted_outputs = self._list_outputs()  # Predictions from _list_outputs
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/niworkflows/interfaces/utility.py", line 217, in _list_outputs
	    index = self.inputs.keys.index(self.inputs.key)
	ValueError: 'MNIPediatricAsym:cohort-3' is not in list

Screenshots / relevant information:


Hi @bfuchs18,

This bug has been reported already here: 23.2.0a3: `template_iterator_wf.select_xfm` failing with `MNIPediatricAsym` when cohort specified · Issue #407 · nipreps/smriprep · GitHub . No fix for this at the moment unfortunately (have not had time to get to it, but you’re welcome to try to do it too!).

Best,
Steven

Got it, sorry I missed that! Thanks for the response

Hi @Steven

I have the same issue: ```ValueError: ‘MNIPediatricAsym:cohort-1’ is not in list``. Has this issue been solved or can I use other versions released before fmriprep 23.2.1.

Best,
Yunhong

Dear all,

I got the same issue using Docker installation:

Node Name: fmriprep_23_2_wf.sub_051_wf.template_iterator_wf.select_xfm

File: /out/sub-051/log/20240506-171704_1f3ab273-2f90-415d-915d-26ed87f284ad/crash-20240506-175755-root-select_xfm.a0-6a91170e-cb7e-424c-b96b-53541c60672e.txt
Working Directory: /Users/guedjc/fmriprep_23_2_wf/sub_051_wf/template_iterator_wf/_in_tuple_MNIPediatricAsymcohort-3.cohort3.res1/select_xfm
Inputs:
anat2std_xfm: ['/out/sub-051/ses-t0/anat/sub-051_ses-t0_from-T1w_to-MNIPediatricAsym_mode-image_xfm.h5', '/out/sub-051/ses-t0/anat/sub-051_ses-t0_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5']
key: MNIPediatricAsym:cohort-3
keys: ['MNIPediatricAsym', 'MNI152NLin2009cAsym']
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 344, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node select_xfm.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 429, in aggregate_outputs
	    predicted_outputs = self._list_outputs()  # Predictions from _list_outputs
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/niworkflows/interfaces/utility.py", line 217, in _list_outputs
	    index = self.inputs.keys.index(self.inputs.key)
	ValueError: 'MNIPediatricAsym:cohort-3' is not in list

Is there any solution to fix this issue?
Many thanks in advance,

Carole

Has anyone been able to solve this bug?

Many thanks in advance, Carole