Clarification Needed on Connectome Matrices Generated by qsiprep with mrtrix_singleshell_ss3t_noACT

Summary of what happened:

Hello, I am using qsiprep to generate connectomes with recon_spec set to mrtrix_singleshell_ss3t_noACT. However, I am having difficulty understanding the resulting matrices, as they do not have a zero main diagonal, which is different from what I expected. Could you please explain the reason for this characteristic in the generated connectivity matrices and how I should interpret them correctly? Is there any additional processing step necessary to obtain matrices with a zero main diagonal?

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

qsiprep-docker /media/pisa/0ABA196EBA1958116/Temporarios/bids /media/pisa/0ABA196EBA1958116/Temporarios/derivatives participant -w /media/pisa/0ABA196EBA1958116/Temporarios/work_1 --participant-label sub-${sub} --recon_spec mrtrix_singleshell_ss3t_noACT --fs-license-file /home/pisa/Desktop/license.txt --output-resolution 1.25 --write-graph --use-syn-sdc --force-syn --nthreads 10 --mem_mb 20000

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

Docker

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

Yes

Screenshots / relevant information:


Hi @CARLOS_LEANDRO_SILVA,

There are streamlines that can begin and terminate in the same area, or intersect their origin area again as they travel. You can just enforce zeros along the diagonal after-the-fact.

Also, if you are using syn-sdc why are you doing noACT?

Best,
Steven

Hi Steven,

Thank you very much!
I am using the recon_spec set to mrtrix_singleshell_ss3t_noACT because it doesn’t require FreeSurfer, as indicated on the QSIPrep documentation. When I tried using mrtrix_singleshell_ss3t_ACT-hsvs, QSIPrep did not run correctly on my computer. Could you please confirm if this is correct?

Best regards,
Leandro

Hi @CARLOS_LEANDRO_SILVA,

Yes, freesurfer is required, but if you have a T1 that you can run freesurfer on, the improvements compared to noACT (or even ACT with fast, for that matter) are pretty significant. ACT requires SDC though, which you are performing, which is why I bring it up.

You may be referring to this bug here Error in connecting qsirecon nodes (0.20.1dev) · Issue #718 · PennLINC/qsiprep · GitHub. If so, for now you can use version 0.19.1 just for recon, and hopefully this gets fixed in a future release.

Best,
Steven

Hi Steven,
I am currently using QSIPrep version 0.19.1. Given that I have many subjects already processed with the recon_spec set to mrtrix_singleshell_ss3t_noACT, what would you recommend I do?
Thank you for your guidance!
Best regards,
Carlos Leandro

What is the error that was precluding you from using ACT?

Hi Steven,

I apologize for the delay in responding. I have been sick and therefore could not go to the lab. Below is the error you mentioned:

240711-09:43:09,367 nipype.workflow INFO:
	 found ['/out/qsiprep/sub-20230919EPA1137149/dwi/sub-20230919EPA1137149_space-T1w_desc-preproc_dwi.nii.gz'] in /out/qsiprep
INFO:nipype.workflow:found ['/out/qsiprep/sub-20230919EPA1137149/dwi/sub-20230919EPA1137149_space-T1w_desc-preproc_dwi.nii.gz'] in /out/qsiprep
240711-09:43:09,368 nipype.workflow INFO:
	 Found usable QSIPrep-preprocessed T1w image and mask.
INFO:nipype.workflow:Found usable QSIPrep-preprocessed T1w image and mask.
240711-09:43:09,370 nipype.workflow INFO:
	 Found T1w-to-template transforms
INFO:nipype.workflow:Found T1w-to-template transforms
240711-09:43:09,370 nipype.workflow INFO:
	 No FreeSurfer inputs available for 20230919EPA1137149
INFO:nipype.workflow:No FreeSurfer inputs available for 20230919EPA1137149
Process Process-14:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/local/miniconda/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/cli/run.py", line 1180, in build_recon_workflow
    retval['workflow'] = init_qsirecon_wf(
  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/workflows/recon/base.py", line 93, in init_qsirecon_wf
    single_subject_wf = init_single_subject_wf(
  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/workflows/recon/base.py", line 212, in init_single_subject_wf
    anat_ingress_wf, available_anatomical_data = init_recon_anatomical_wf(
  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/workflows/recon/anatomical.py", line 141, in init_recon_anatomical_wf
    raise Exception("FreeSurfer data is required to make HSVS 5tt image.")
Exception: FreeSurfer data is required to make HSVS 5tt image.
Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit

Hi @CARLOS_LEANDRO_SILVA,

Sounds like the solution is to just run freesurfer on these subjects, unless you already did and you still get that error.

Best,
Steven

1 Like

Thanks, Steve! I’m going to reprocess everything and try to use the freesurfer data.

Best,
Leandro

Hi Steven,
Here is the error message that appears when I try to run the code with ACT.

[Node] Finished "create_5tt_hsvs", elapsed time 62.827625s.
240711-19:48:06,830 nipype.workflow WARNING:
	 Storing result file without outputs
240711-19:48:06,831 nipype.workflow WARNING:
	 [Node] Error on "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.create_5tt_hsvs" (/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs)
labelconvert: Image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Gordon333Ext_desc-LPS_dseg_to_dwi.nii.gz" stored with floating-point type; need to check for non-integer or negative values
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Gordon333Ext_desc-LPS_dseg_to_dwi.nii.gz"
labelconvert: [100%] Verifying parcellation image
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Gordon333Ext_desc-LPS_dseg_to_dwi.nii.gz"
labelconvert: Image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Brainnetome246Ext_desc-LPS_dseg_to_dwi.nii.gz" stored with floating-point type; need to check for non-integer or negative values
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Brainnetome246Ext_desc-LPS_dseg_to_dwi.nii.gz"
labelconvert: [100%] Verifying parcellation image
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Brainnetome246Ext_desc-LPS_dseg_to_dwi.nii.gz"
labelconvert: Image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-AICHA384Ext_desc-LPS_dseg_to_dwi.nii.gz" stored with floating-point type; need to check for non-integer or negative values
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-AICHA384Ext_desc-LPS_dseg_to_dwi.nii.gz"
labelconvert: [100%] Verifying parcellation image
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-AICHA384Ext_desc-LPS_dseg_to_dwi.nii.gz"
labelconvert: Image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Schaefer2018Ext_desc-100Parcels7NetworksLPS_dseg_to_dwi.nii.gz" stored with floating-point type; need to check for non-integer or negative values
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Schaefer2018Ext_desc-100Parcels7NetworksLPS_dseg_to_dwi.nii.gz"
labelconvert: [100%] Verifying parcellation image
labelconvert: [100%] uncompressing image "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/sub_20240108OES1069512_space_T1w_desc_preproc_anat_wf/get_atlases/tpl-MNI152NLin2009cAsym_res-01_atlas-Schaefer2018Ext_desc-100Parcels7NetworksLPS_dseg_to_dwi.nii.gz"
240711-19:49:05,484 nipype.workflow ERROR:
	 Node create_5tt_hsvs failed to run on host 1890bb3b6d15.
240711-19:49:05,486 nipype.workflow ERROR:
	 Saving crash info to /out/qsirecon/sub-20240108OES1069512/log/20240711-194633_99b27eb9-4151-47ce-9db0-60940721fbb0/crash-20240711-194905-root-create_5tt_hsvs-79e008eb-cef6-4d9d-a245-c6c43d893434.txt
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node create_5tt_hsvs.

Cmdline:
	5ttgen hsvs /sngl/freesurfer-input/sub-20240108OES1069512 sub-20240108OES1069512_5tt.mif
Stdout:

Stderr:
	5ttgen: 
	5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
	5ttgen: 
	5ttgen: Generated scratch directory: /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/
	Command:  mrconvert /sngl/freesurfer-input/sub-20240108OES1069512/mri/aparc+aseg.mgz /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/aparc.mif
	5ttgen: Changing to scratch directory (/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/)
	Command:  mrconvert /sngl/freesurfer-input/sub-20240108OES1069512/mri/norm.mgz T1.nii -stride -1,+2,+3
	5ttgen: ACPCdetect and FSL FAST will be used for explicit segmentation of anterior commissure
	5ttgen: No hippocampal subfields module output detected, but FSL FIRST is installed; will utilise latter for hippocampi segmentation
	5ttgen: Will utilise FSL FIRST for thalami segmentation
	5ttgen: Mapping FreeSurfer cortical reconstruction to partial volume images... [============
	5ttgen: [ERROR] meshconvert /sngl/freesurfer-input/sub-20240108OES1069512/surf/lh.pial lh.pial_realspace.obj -binary -transform fs2real aparc.mif (hsvs.py:347)
	5ttgen: [ERROR] Information from failed command:
	5ttgen:
	        meshconvert: [ERROR] Input surface mesh file not in supported format
	5ttgen:
	5ttgen: [ERROR] For debugging, inspect contents of scratch directory: /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/
Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
	    setattr(outputs, key, val)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
	    value = super(File, self).validate(objekt, name, value, return_pathlike=True)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
	    self.error(objekt, name, str(value))
	  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
	    raise TraitError(
	traits.trait_errors.TraitError: The 'out_file' trait of a Generate5ttOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/sub-20240108OES1069512_5tt.mif' <class 'str'> was specified.

	During handling of the above exception, another exception occurred:

	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
	    raise FileNotFoundError(msg)
	FileNotFoundError: No such file or directory '/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/sub-20240108OES1069512_5tt.mif' for output 'out_file' of a GenerateMasked5tt interface


240711-19:49:05,491 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.register_fs_to_qsiprep_wf.convert_fs_brain" in "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/register_fs_to_qsiprep_wf/convert_fs_brain".
240711-19:49:05,498 nipype.workflow INFO:
	 [Node] Executing "convert_fs_brain" <nipype.interfaces.mrtrix3.utils.MRConvert>
240711-19:49:05,755 nipype.workflow INFO:
	 [Node] Finished "convert_fs_brain", elapsed time 0.230207s.
240711-19:49:09,324 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.register_fs_to_qsiprep_wf.register_to_qsiprep" in "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/register_fs_to_qsiprep_wf/register_to_qsiprep".
240711-19:49:10,169 nipype.workflow INFO:
	 [Node] Executing "register_to_qsiprep" <nipype.interfaces.ants.registration.Registration>
240711-19:49:56,192 nipype.workflow INFO:
	 [Node] Finished "register_to_qsiprep", elapsed time 45.921328s.
240711-19:49:58,211 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.register_fs_to_qsiprep_wf.convert_ants_transform" in "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/register_fs_to_qsiprep_wf/convert_ants_transform".
240711-19:49:58,214 nipype.workflow INFO:
	 [Node] Executing "convert_ants_transform" <qsiprep.interfaces.ants.ConvertTransformFile>
240711-19:49:58,303 nipype.workflow INFO:
	 [Node] Finished "convert_ants_transform", elapsed time 0.0792s.
240711-19:50:00,195 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.register_fs_to_qsiprep_wf.convert_ants_to_mrtrix_transform" in "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/register_fs_to_qsiprep_wf/convert_ants_to_mrtrix_transform".
240711-19:50:00,199 nipype.workflow INFO:
	 [Node] Executing "convert_ants_to_mrtrix_transform" <qsiprep.interfaces.mrtrix.ITKTransformConvert>
240711-19:50:00,266 nipype.workflow INFO:
	 [Node] Finished "convert_ants_to_mrtrix_transform", elapsed time 0.057675s.
240711-19:50:01,350 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.register_fs_to_qsiprep_wf.transform_aseg" in "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/register_fs_to_qsiprep_wf/transform_aseg".
240711-19:50:01,359 nipype.workflow INFO:
	 [Node] Executing "transform_aseg" <qsiprep.interfaces.mrtrix.TransformHeader>
240711-19:50:01,866 nipype.workflow INFO:
	 [Node] Finished "transform_aseg", elapsed time 0.506504s.
240711-19:50:02,217 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.register_fs_to_qsiprep_wf.transform_brain" in "/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/register_fs_to_qsiprep_wf/transform_brain".
240711-19:50:02,225 nipype.workflow INFO:
	 [Node] Executing "transform_brain" <qsiprep.interfaces.mrtrix.TransformHeader>
240711-19:50:02,868 nipype.workflow INFO:
	 [Node] Finished "transform_brain", elapsed time 0.642151s.
240711-19:50:05,298 nipype.workflow ERROR:
	 could not run node: qsirecon_wf.sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst.anat_ingress_wf.create_5tt_hsvs
QSIRecon failed: Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node create_5tt_hsvs.

Cmdline:
	5ttgen hsvs /sngl/freesurfer-input/sub-20240108OES1069512 sub-20240108OES1069512_5tt.mif
Stdout:

Stderr:
	5ttgen: 
	5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
	5ttgen: 
	5ttgen: Generated scratch directory: /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/
	Command:  mrconvert /sngl/freesurfer-input/sub-20240108OES1069512/mri/aparc+aseg.mgz /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/aparc.mif
	5ttgen: Changing to scratch directory (/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/)
	Command:  mrconvert /sngl/freesurfer-input/sub-20240108OES1069512/mri/norm.mgz T1.nii -stride -1,+2,+3
	5ttgen: ACPCdetect and FSL FAST will be used for explicit segmentation of anterior commissure
	5ttgen: No hippocampal subfields module output detected, but FSL FIRST is installed; will utilise latter for hippocampi segmentation
	5ttgen: Will utilise FSL FIRST for thalami segmentation
	5ttgen: Mapping FreeSurfer cortical reconstruction to partial volume images... [============
	5ttgen: [ERROR] meshconvert /sngl/freesurfer-input/sub-20240108OES1069512/surf/lh.pial lh.pial_realspace.obj -binary -transform fs2real aparc.mif (hsvs.py:347)
	5ttgen: [ERROR] Information from failed command:
	5ttgen:
	        meshconvert: [ERROR] Input surface mesh file not in supported format
	5ttgen:
	5ttgen: [ERROR] For debugging, inspect contents of scratch directory: /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/
Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
	    setattr(outputs, key, val)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
	    value = super(File, self).validate(objekt, name, value, return_pathlike=True)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
	    self.error(objekt, name, str(value))
	  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
	    raise TraitError(
	traits.trait_errors.TraitError: The 'out_file' trait of a Generate5ttOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/sub-20240108OES1069512_5tt.mif' <class 'str'> was specified.

	During handling of the above exception, another exception occurred:

	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
	    raise FileNotFoundError(msg)
	FileNotFoundError: No such file or directory '/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/sub-20240108OES1069512_5tt.mif' for output 'out_file' of a GenerateMasked5tt interface


Traceback (most recent call last):
  File "/usr/local/miniconda/bin/qsiprep", line 8, in <module>
    sys.exit(main())
  File "/usr/local/miniconda/lib/python3.8/site-packages/qsiprep/cli/run.py", line 751, in main
    qsirecon_post_wf.run(**plugin_settings)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/workflows.py", line 638, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/base.py", line 224, in run
    raise error from cause
RuntimeError: Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node create_5tt_hsvs.

Cmdline:
	5ttgen hsvs /sngl/freesurfer-input/sub-20240108OES1069512 sub-20240108OES1069512_5tt.mif
Stdout:

Stderr:
	5ttgen: 
	5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation; INCLUDING FROM EXTERNAL SOFTWARE PACKAGES. Please consult the help page (-help option) for more information.
	5ttgen: 
	5ttgen: Generated scratch directory: /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/
	Command:  mrconvert /sngl/freesurfer-input/sub-20240108OES1069512/mri/aparc+aseg.mgz /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/aparc.mif
	5ttgen: Changing to scratch directory (/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/)
	Command:  mrconvert /sngl/freesurfer-input/sub-20240108OES1069512/mri/norm.mgz T1.nii -stride -1,+2,+3
	5ttgen: ACPCdetect and FSL FAST will be used for explicit segmentation of anterior commissure
	5ttgen: No hippocampal subfields module output detected, but FSL FIRST is installed; will utilise latter for hippocampi segmentation
	5ttgen: Will utilise FSL FIRST for thalami segmentation
	5ttgen: Mapping FreeSurfer cortical reconstruction to partial volume images... [============
	5ttgen: [ERROR] meshconvert /sngl/freesurfer-input/sub-20240108OES1069512/surf/lh.pial lh.pial_realspace.obj -binary -transform fs2real aparc.mif (hsvs.py:347)
	5ttgen: [ERROR] Information from failed command:
	5ttgen:
	        meshconvert: [ERROR] Input surface mesh file not in supported format
	5ttgen:
	5ttgen: [ERROR] For debugging, inspect contents of scratch directory: /scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/5ttgen-tmp-G3PXBD/
Traceback:
	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
	    setattr(outputs, key, val)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
	    value = super(File, self).validate(objekt, name, value, return_pathlike=True)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
	    self.error(objekt, name, str(value))
	  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
	    raise TraitError(
	traits.trait_errors.TraitError: The 'out_file' trait of a Generate5ttOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/sub-20240108OES1069512_5tt.mif' <class 'str'> was specified.

	During handling of the above exception, another exception occurred:

	Traceback (most recent call last):
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
	    raise FileNotFoundError(msg)
	FileNotFoundError: No such file or directory '/scratch/qsirecon_wf/sub-20240108OES1069512_mrtrix_singleshell_ss3_hsvst/anat_ingress_wf/create_5tt_hsvs/sub-20240108OES1069512_5tt.mif' for output 'out_file' of a GenerateMasked5tt interface


Sentry is attempting to send 5 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit

Best,
Leandro

My code:

qsiprep-docker /media/pisa/0ABA196EBA1958116/Temporarios/bids /media/pisa/0ABA196EBA1958116/Temporarios/derivatives participant -w /media/pisa/0ABA196EBA1958116/Temporarios/work --participant-label sub-${sub} --recon_spec mrtrix_singleshell_ss3t_ACT-hsvs --fs-license-file /home/pisa/Desktop/license.txt --output-resolution 1.25 --write-graph --use-syn-sdc --force-syn --nthreads 10 --mem_mb 20000 --freesurfer-input /media/pisa/0ABA196EBA1958116/Temporarios/freesurfer_

Are you sure recon-all ran successfully for this subject?

Yes, recon-all ran successfully for this subject.

Is this still version 0.19.1? What version of FreeSurfer did you use? There’s not much I can do to debug without having access to those FS files to see if they are formatted properly.

Yes, this is still version 0.19.1. Could you advise on how I could modify my code to run recon-all without needing previous files?

What do you mean by “without needing previous files”?

I meant without the need for processed FreeSurfer files. Run recon-all again embedded in QSIPrep.

Qsiprep doesn’t run freesurfer. How did you run it originally? Can you provide the tree structure of a subject freesurfer directory?