Crash during connectivity matrix

Summary of what happened:

Hello,

I encountered the following error while running qsirecon on qsiprepped data.

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

Below is the command I used:

docker run -ti --rm \
  -v /data/bids/derivatives/qsiprep:/data/qsiprep \
  -v /data/bids/derivatives/qsirecon:/data/qsirecon \
  -v /home/user/license.txt:/opt/freesurfer/license.txt:ro \
  pennlinc/qsirecon:latest \
  /data/qsiprep /data/qsirecon participant \
  --participant-label 11107 \
  --fs-license-file /opt/freesurfer/license.txt \
  --recon-spec dsi_studio_gqi \
  --atlases 4S156Parcels 4S256Parcels 4S456Parcels

Version:

1.1.1

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

Docker

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):

This is from the crash log:

Node: qsirecon_1_1_wf.sub-11107_dsistudio_pipeline.sub_11107_dir_AP_space_ACPC_desc_preproc_recon_wf.streamline_connectivity.calc_connectivity
Working directory: /tmp/work/qsirecon_1_1_wf/sub-11107_dsistudio_pipeline/sub_11107_dir_AP_space_ACPC_desc_preproc_recon_wf/streamline_connectivity/calc_connectivity

Node inputs:

args = <undefined>
atlas_configs = <undefined>
atlas_labels_file = <undefined>
atlas_name = <undefined>
connectivity = <undefined>
connectivity_type = pass,end
connectivity_value = count,ncount,mean_length,gfa
environ = {}
fa_threshold = <undefined>
fiber_count = <undefined>
initial_dir = <undefined>
input_fib = <undefined>
interpo_angle = <undefined>
interpolation = <undefined>
max_length = <undefined>
min_length = <undefined>
num_threads = 8
random_seed = <undefined>
seed_count = <undefined>
seed_file = <undefined>
seed_plan = <undefined>
smoothing = <undefined>
step_size = <undefined>
thread_count = 1
to_export = <undefined>
trk_file = <undefined>
turning_angle = <undefined>

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 calc_connectivity.

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/dsi_studio.py", line 453, in _run_interface
	    wf_result = workflow.run(**plugin_settings)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 625, in run
	    runner.run(execgraph, updatehash=updatehash, config=self.config)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/base.py", line 177, in run
	    self._clean_queue(jobid, graph, result=result)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/base.py", line 255, in _clean_queue
	    raise RuntimeError("".join(result["traceback"]))
	RuntimeError: 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 4S156Parcels.

	Cmdline:
		dsi_studio --action=ana  --connectivity=/data/qsirecon/sub-11107/dwi/sub-11107_dir-AP_space-ACPC_seg-4S156Parcels_dseg.nii.gz --connectivity_type=pass,end --connectivity_value=count,ncount,mean_length,gfa --source=/tmp/work/qsirecon_1_1_wf/sub-11107_dsistudio_pipeline/sub_11107_dir_AP_space_ACPC_desc_preproc_recon_wf/streamline_connectivity/calc_connectivity/dsistudio_atlasgraph/4S156Parcels/sub-11107_dir-AP_space-ACPC_desc-preproc_dwi.src.gz.odf.gqi.1.25.fib.gz --thread_count=1 --thread_count=1 --tract=/tmp/work/qsirecon_1_1_wf/sub-11107_dsistudio_pipeline/sub_11107_dir_AP_space_ACPC_desc_preproc_recon_wf/streamline_connectivity/calc_connectivity/dsistudio_atlasgraph/4S156Parcels/sub-11107_dir-AP_space-ACPC_desc-preproc_dwi.src.gz.odf.gqi.1.25.fib.trk.gz
	Stdout:

	Stderr:

	Traceback:
		Traceback (most recent call last):
		  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 402, in run
		    runtime = self._post_run_hook(runtime)
		  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/dsi_studio.py", line 359, in _post_run_hook
		    _sanitized_connectivity_matrix(matfile, official_labels)
		  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/dsi_studio.py", line 516, in _sanitized_connectivity_matrix
		    matfile_region_ids = np.array([int(name.split("_")[-1]) for name in column_names])
		  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/dsi_studio.py", line 516, in <listcomp>
		    matfile_region_ids = np.array([int(name.split("_")[-1]) for name in column_names])
		ValueError: invalid literal for int() with base 10: 'LH-Pu'

Screenshots / relevant information:


Hi @Catherine_Tang,

As a test, may you try rolling back to version 1.1.0?

Best,
Steven

Hi Steven,

I can confirm that reversing back to 1.1.1 worked. Is this a bug?

Thanks

Hi @Catherine_Tang,

Do you mean 1.1.1 or 1.1.0?

Best,
Steven

I actually put in 1.1.0 in my command, but in the command window it pulled 1.1.1 from github so I’m not entirely sure which version it pulled.

just went into the output html:
QSIRecon version: 1.1.1.dev0+gaf43da9.d20250414

Then you used 1.1.0, the weird dev stuff is just a little bug in how versions are reported.

We’re working on a fix now for this in next release, so for now if 1.1.0 works for you stick with that.

Best,
Steven

1 Like