QSIRecon Bundle Mapping

Summary of what happened:

I’m trying to use the “bundle mapping” node to get scalar metrics automatically mapped onto bundles from pyAFQ (similar to the last section described [here](https://qsirecon.readthedocs.io/en/latest/building_workflows.html). Relevant YAML input below. It seems to fail because the inputs aren’t being set properly, but I’m not sure if this is a bug or if I’m calling the node incorrectly in the YAML file. Has anyone else run into this? (The rest of the tractography and diffusion scalar pipelines run just fine, so excluding some of that info).

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

...<standard scalar/tractography stuff here>...

-   action: pyafq_tractometry
    input: track_ifod2
    name: pyafq_tractometry
...<pyafq stuff here>...

-   action: bundle_map
    input: pyafq_tractometry
    name: bundle_means
    scalars_from:
    - dipy_dki
    - fit_noddi

Version:

Running QSIRecon version 1.1.1.dev0+gaf43da9.d20250414

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

Singularity/Apptainer

Relevant log outputs (up to 20 lines):

CRITICAL:nipype.workflow:QSIRecon failed: Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/     multiproc.py", line 66, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/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    bundle_mapper.

Traceback:
    Traceback (most recent call last):
      File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/  core.py", line 401, in run
        runtime = self._run_interface(runtime)
      File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/     scalar_mapping.py", line 65, in _run_interface
        self._do_mapping(runtime)
      File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/     scalar_mapping.py", line 106, in _do_mapping
        for tck_name, tck_file in zip(self.inputs.bundle_names, self.inputs.tck_files):
    TypeError: '_Undefined' object is not iterable

Hi @l-espana, and welcome to neurostars!

The bundle mapper might only work with DSIStudio AutoTrack at the moment.

Best,
Steven