What happened?
I am trying to run fmriprep on a special type of fMRI-sequence called "MREG", which is acquired using a stack-of-spirals k-space trajectory, i.e., it doesn't have a traditional phase-encoding direction that is BIDS compliant. Therefore, there are no .json-fields regarding phase encoding for this sequence. fMRIprep triggers a BIDS validation warning saying that no slice-time correction will be performed but no error. In the same dataset there are also EPI-based functional images, this is the tree for one subject and session:
├── dataset_description.json
├── sub-55728
│ ├── ses-BL
│ │ ├── anat
│ │ │ ├── sub-55728_ses-BL_acq-mprage_rec-norm_T1w.json
│ │ │ ├── sub-55728_ses-BL_acq-mprage_rec-norm_T1w.nii.gz
│ │ └── func
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-1_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-1_bold.nii.gz
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-2_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-2_bold.nii.gz
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-1_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-1_bold.nii.gz
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-2_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-2_bold.nii.gz
fMRIprep gives an error at the point of estimating the global signal confound for MREG. At this point the final file for the EPI-sequence has been generated, i.e., fMRIprep seems to finish for these, e.g.: sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-1_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz. For MREG, this final file has not been created but the MNI-space boldref has been created: sub-55728_ses-BL_task-rest_acq-mreg_run-1_space-MNI152NLin6Asym_res-2_boldref.nii.gz.
When I visualize the MNI-space boldref on top of the MNI-space T1 image, they seem to be nicely aligned and the GM mask also looks normal. However, the MREG image is of lower quality and is scaled differently than the EPI, could that have anything to say?
What command did you use?
This is the code that I run:
apptainer run --cleanenv -B ${bids_top_folder}:${bids_top_folder} -B ${work_dir}:${work_dir} -B ${output_dir}:${output_dir} -B ${code_folder}:${code_folder} \
$fmriprep-25.1.3.simg $bids_dir $output_dir participant \
--participant-label 55728 \
--fs-license-file $fs_license_file \
--output-spaces MNI152NLin6Asym:res-2 \
--n_cpus 8 \
-w ${work_dir} \
--stop-on-first-crash
What version of fMRIPrep are you running?
25.1.3 and also 25.2.5
How are you running fMRIPrep?
Singularity
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
This is the error message, no errors in the visualization .html-file:
Node: fmriprep_25_1_wf.sub_55728_wf.bold_ses_BL_task_rest_acq_mreg_run_1_wf.bold_confounds_wf.conf_corr_plot
Working directory: /proc_tmp/anderssolsen/worksleep/fmriprep_25_1_wf/sub_55728_wf/bold_ses_BL_task_rest_acq_mreg_run_1_wf/bold_confounds_wf/conf_corr_plot
Node inputs:
columns = <undefined>
confounds_file = <undefined>
ignore_initial_volumes = 0
max_dim = 20
out_file = None
reference_column = global_signal
Traceback (most recent call last):
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
result = self._run_interface(execute=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
return self._run_command(execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node conf_corr_plot.
Traceback:
Traceback (most recent call last):
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
return self._engine.get_loc(casted_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'global_signal'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nipype/interfaces/base/core.py", line 401, in run
runtime = self._run_interface(runtime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nireports/interfaces/nuisance.py", line 136, in _run_interface
confounds_correlation_plot(
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/nireports/reportlets/nuisance.py", line 884, in confounds_correlation_plot
gscorr[reference] = np.abs(gscorr[reference])
~~~~~~^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/pandas/core/frame.py", line 4102, in __getitem__
indexer = self.columns.get_loc(key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
raise KeyError(key) from err
KeyError: 'global_signal'
Additional information / screenshots
No response
What happened?
I am trying to run fmriprep on a special type of fMRI-sequence called "MREG", which is acquired using a stack-of-spirals k-space trajectory, i.e., it doesn't have a traditional phase-encoding direction that is BIDS compliant. Therefore, there are no .json-fields regarding phase encoding for this sequence. fMRIprep triggers a BIDS validation warning saying that no slice-time correction will be performed but no error. In the same dataset there are also EPI-based functional images, this is the tree for one subject and session:
├── dataset_description.json
├── sub-55728
│ ├── ses-BL
│ │ ├── anat
│ │ │ ├── sub-55728_ses-BL_acq-mprage_rec-norm_T1w.json
│ │ │ ├── sub-55728_ses-BL_acq-mprage_rec-norm_T1w.nii.gz
│ │ └── func
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-1_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-1_bold.nii.gz
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-2_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-2_bold.nii.gz
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-1_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-1_bold.nii.gz
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-2_bold.json
│ │ ├── sub-55728_ses-BL_task-rest_acq-mreg_run-2_bold.nii.gz
fMRIprep gives an error at the point of estimating the global signal confound for MREG. At this point the final file for the EPI-sequence has been generated, i.e., fMRIprep seems to finish for these, e.g.: sub-55728_ses-BL_task-rest_acq-mb_dir-AP_run-1_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz. For MREG, this final file has not been created but the MNI-space boldref has been created: sub-55728_ses-BL_task-rest_acq-mreg_run-1_space-MNI152NLin6Asym_res-2_boldref.nii.gz.
When I visualize the MNI-space boldref on top of the MNI-space T1 image, they seem to be nicely aligned and the GM mask also looks normal. However, the MREG image is of lower quality and is scaled differently than the EPI, could that have anything to say?
What command did you use?
What version of fMRIPrep are you running?
25.1.3 and also 25.2.5
How are you running fMRIPrep?
Singularity
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