Skip to content

nipype naming checking cause an issue despite data being BIDS valid #3605

@miltoncamacho

Description

@miltoncamacho

What happened?

This is not a big problem but the naming used for some tests is supposed to be bids valid.

260205-21:39:56,518 nipype.workflow INFO:
	 Setting up fieldmap "sub_3325_ses_1a_task_partlycloudy_acq_PC+HyperMEPI+RPE" (EstimatorType.PEPOLAR) with <sub-3325_ses-1a_acq-spin+echo_dir-AP_epi.nii.gz, sub-3325_ses-1a_acq-spin+echo_dir-PA_epi.nii.gz>
Process Process-2:
Traceback (most recent call last):
  File "/app/.pixi/envs/fmriprep/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/app/.pixi/envs/fmriprep/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/cli/workflow.py", line 116, in build_workflow
    retval['workflow'] = init_fmriprep_wf()
                         ^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 108, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id, sessions, name=wf_name)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 871, in init_single_subject_wf
    bold_wf = init_bold_wf(
              ^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/bold/base.py", line 191, in init_bold_wf
    workflow = Workflow(name=_get_wf_name(bold_file, 'bold'))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/niworkflows/engine/workflows.py", line 47, in __init__
    super().__init__(name, base_dir)
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/engine/workflows.py", line 58, in __init__
    super().__init__(name, base_dir)
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/engine/base.py", line 35, in __init__
    self.name = name
    ^^^^^^^^^
  File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/engine/base.py", line 51, in name
    raise ValueError('[Workflow|Node] name "%s" is not valid.' % name)
ValueError: [Workflow|Node] name "bold_ses_1a_task_partlycloudy_acq_PC+HyperMEPI+RPE_echo_1_wf" is not valid.

The issue comes from:

https://github.com/nipy/nipype/blob/8234ec318489930fa17487cf15d210420214b00a/nipype/pipeline/engine/base.py#L48C1-L53C1

where the pattern does not accept + in the suffixes.

Relevant to #3604

What command did you use?

/app/.pixi/envs/fmriprep/bin/fmriprep /data/hp_proc/cleaned_bids /data/hp_proc/cleaned_bids/derivatives/fmriprep participant --skip-bids-validation --participant-label xxxxxxx --session-label 1a --stop-on-first-crash --debug all --me-t2s-fit-method loglin --me-output-echos -w /data/hp_proc/work/xxxxxx --use-syn-sdc error --dummy-scans 8 --n_cpus 16 --nprocs 16 --omp-nthreads 16 --fs-license-file /home/milton.camachocamach/license.txt

What version of fMRIPrep are you running?

25.2.4

How are you running fMRIPrep?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

Additional information / screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions