XCP-D parcellation and connectivity failures — possible mismatch in fMRIPrep output spaces (MNI152NLin2009cAsym vs MNI152NLincAsym)

Summary of what happened:

I’m running fMRIPrep on the Australian NCI Gadi HPC and then XCP-D on my personal computer, and my XCP-D pipeline consistently fails. I think that this has to do with the fmriprep: output-spaces as XCP-D seems to run when the fmriprep Standard output spaces just include MNI152NLin2009cAsym and not MNI152NLin6Asym & MNI152NLin2009cAsym.
It seems that XCP-D may be misidentifying or unable to resolve the correct standard-to-native transform when multiple MNI spaces are present in the fMRIPrep outputs leading to an empty transform list ([]) and a crash during the QC or postprocessing stage (warp_dseg_to_bold).

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

PASTE CODE HERE

Version:

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

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

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

See the error from XCP-D below:

251009-10:59:57,562 nipype.workflow INFO:
         [Node] Setting-up "xcp_d_0_10_wf.sub_04_wf.postprocess_0_wf.qc_report_wf.warp_dseg_to_bold" in "/work/xcp_d_0_10_wf/sub_04_wf/postprocess_0_wf/qc_report_wf/warp_dseg_to_bold".
exception calling callback for <Future at 0x7f680be20460 state=finished raised FileNotFoundError>
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 495, in run
    self._get_hashval()
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 546, in _get_hashval
    self._get_inputs()
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 617, in _get_inputs
    self.set_input(key, deepcopy(output_value))
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 310, in set_input
    setattr(self.inputs, parameter, deepcopy(val))
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 427, in validate
    value = super().validate(objekt, name, newvalue)
  File "/usr/local/miniconda/lib/python3.10/site-packages/traits/trait_types.py", line 2634, in validate
    return TraitListObject(self, object, name, value)
  File "/usr/local/miniconda/lib/python3.10/site-packages/traits/trait_list_object.py", line 584, in __init__
    super().__init__(
  File "/usr/local/miniconda/lib/python3.10/site-packages/traits/trait_list_object.py", line 213, in __init__
    super().__init__(self.item_validator(item) for item in iterable)
  File "/usr/local/miniconda/lib/python3.10/site-packages/traits/trait_list_object.py", line 213, in <genexpr>
    super().__init__(self.item_validator(item) for item in iterable)
  File "/usr/local/miniconda/lib/python3.10/site-packages/traits/trait_list_object.py", line 867, in _item_validator
    return trait_validator(object, self.name, value)
  File "/usr/local/miniconda/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: Each element of the 'transforms' trait of a _ApplyTransformsInputSpec instance must be a pathlike object or string representing an existing file or 'identity', but a value of '[]' <class 'str'> was specified.

Error setting node input:
Node: warp_dseg_to_bold
input: transforms
results_file: /work/xcp_d_0_10_wf/sub_04_wf/postprocess_0_wf/qc_report_wf/get_std2native_transform/result_get_std2native_transform.pklz
value: ['[]']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 70, in run_node
    result["result"] = node.result
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 221, in result
    return _load_resultfile(
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 290, in load_resultfile
    raise FileNotFoundError(results_file)
FileNotFoundError: /work/xcp_d_0_10_wf/sub_04_wf/postprocess_0_wf/qc_report_wf/warp_dseg_to_bold/result_warp_dseg_to_bold.pklz
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 342, in _invoke_callbacks
    callback(self)
  File "/usr/local/miniconda/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 174, in _async_callback
    result = args.result()
  File "/usr/local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/local/miniconda/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
FileNotFoundError: /work/xcp_d_0_10_wf/sub_04_wf/postprocess_0_wf/qc_report_wf/warp_dseg_to_bold/result_warp_dseg_to_bold.pklz

Screenshots / relevant information:


Hi @NeuroRedGiant,

In the future, please use the Software Support post category and template, which helps organize your post and provide us with important information to help you debug. You can see that I have edited your post to add it in. You can edit your post to provide the missing information.

Hmm, not sure if that’s a reproducible bug or not, but will ping @tsalo so he can take a look next week. Can you try to provide a BIDS filter file to only process one space? May you also provide the tree directory of an example subject’s fmriprep outputs?

Best,
Steven

@NeuroRedGiant along with the information @Steven requested, can you share the full stdout and stderr log files?