Error when using mif_to_fib in recon workflow
Closed this issue · 1 comments
Summary
I am trying to use a SS3T reconstruction from MRtrix3 as input to DSI Studio's autotrack. So I tried to build a json workflow file with nodes for SS3T, mif_to_fib and autotrack. When trying to run the reconstruction it seems to fail when setting up the pipeline and connecting the nodes. It might just be a problem with how I set up the json file.
Additional details
- QSIPrep version: 0.21.4
- Docker version: 26.1.1
What were you trying to do?
Run autotrack based on ss3t instead of GQI inputs.
What did you expect to happen?
Reconstruction of ODFs using SS3T, conversion of ODF files from mif to fib files such that they can be read by DSI Studio, reconstruction of bundles using autotrack.
What actually happened?
Error when building workflow. This is the output I get in the terminal:
240708-13:32:18,113 nipype.workflow IMPORTANT:
Running qsirecon version 0.21.5.dev0+g36b93fe.d20240504:
* BIDS dataset path: /data.
* Participant list: ['1317462'].
* Run identifier: 20240708-131759_6947d71a-5037-490b-b49b-4bbce556b1ae.
240708-13:32:20,181 nipype.workflow INFO:
found ['/data_processed/qsiprep/sub-1317462/ses-PNC1/dwi/sub-1317462_ses-PNC1_run-01_space-T1w_desc-preproc_dwi.nii', '/data_processed/qsiprep/sub-1317462/ses-PNC1/dwi/sub-1317462_ses-PNC1_run-01_space-T1w_desc-preproc_dwi.nii.gz', '/data_processed/qsiprep/sub-1317462/ses-PNC1/dwi/sub-1317462_ses-PNC1_run-02_space-T1w_desc-preproc_dwi.nii.gz'] in /data_processed/qsiprep
240708-13:32:20,184 nipype.workflow INFO:
CHECKING /data_processed/qsiprep/sub-1317462/anat/sub-1317462_desc-brain_mask.nii.gz: True
240708-13:32:20,185 nipype.workflow INFO:
CHECKING /data_processed/qsiprep/sub-1317462/anat/sub-1317462_desc-preproc_T1w.nii.gz: True
240708-13:32:20,185 nipype.workflow INFO:
Found usable QSIPrep-preprocessed T1w image and mask.
240708-13:32:20,186 nipype.workflow INFO:
CHECKING /data_processed/qsiprep/sub-1317462/anat/sub-1317462_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5: True
240708-13:32:20,187 nipype.workflow INFO:
CHECKING /data_processed/qsiprep/sub-1317462/anat/sub-1317462_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5: True
240708-13:32:20,187 nipype.workflow INFO:
Found high-res anatomical data in preprocessed inputs for 1317462.
240708-13:32:20,189 nipype.workflow INFO:
Anatomical (T1w) available for recon: {'has_qsiprep_5tt_hsvs': False, 'has_freesurfer_5tt_hsvs': False, 'has_freesurfer': False, 'has_qsiprep_t1w': True, 'has_qsiprep_t1w_transforms': True}
[{'bids_dwi_file': '/data_processed/qsiprep/sub-1317462/ses-PNC1/dwi/sub-1317462_ses-PNC1_run-01_space-T1w_desc-preproc_dwi.nii'}, {'bids_dwi_file': '/data_processed/qsiprep/sub-1317462/ses-PNC1/dwi/sub-1317462_ses-PNC1_run-01_space-T1w_desc-preproc_dwi.nii.gz'}, {'bids_dwi_file': '/data_processed/qsiprep/sub-1317462/ses-PNC1/dwi/sub-1317462_ses-PNC1_run-02_space-T1w_desc-preproc_dwi.nii.gz'}]
{'has_qsiprep_5tt_hsvs': False, 'has_freesurfer_5tt_hsvs': False, 'has_freesurfer': False, 'has_qsiprep_t1w': True, 'has_qsiprep_t1w_transforms': True}
240708-13:32:20,203 nipype.workflow INFO:
Transforming ODF ROIs into DWI space for visual report.
240708-13:32:20,210 nipype.interface INFO:
Response configuration: {'algorithm': 'dhollander', 'nthreads': 8}
240708-13:32:20,210 nipype.interface INFO:
Using 8 threads in MRtrix3
240708-13:32:20,230 nipype.interface WARNING:
No matching bundles found for Thalamic_R
240708-13:32:20,231 nipype.interface INFO:
AutoTrack attempted to reconstruct the following bundles:
* Commissure_CorpusCallosum_Body
* Commissure_CorpusCallosum_Tapetum
* Commissure_CorpusCallosum_ForcepsMajor
* Commissure_CorpusCallosum_ForcepsMinor
* ProjectionBasalGanglia_FornixL
* ProjectionBasalGanglia_FornixR
* ProjectionBasalGanglia_OpticRadiationL
* ProjectionBasalGanglia_OpticRadiationR
* ProjectionBrainstem_ReticularTractL
* ProjectionBrainstem_ReticularTractR
* ProjectionBasalGanglia_CorticostriatalTractL_Anterior
* ProjectionBasalGanglia_CorticostriatalTractL_Posterior
* ProjectionBasalGanglia_CorticostriatalTractL_Superior
* ProjectionBasalGanglia_CorticostriatalTractR_Anterior
* ProjectionBasalGanglia_CorticostriatalTractR_Posterior
* ProjectionBasalGanglia_CorticostriatalTractR_Superior
* ProjectionBrainstem_CorticospinalTractL
* ProjectionBrainstem_CorticospinalTractR
* ProjectionBasalGanglia_CorticostriatalTractL_Anterior
* ProjectionBasalGanglia_CorticostriatalTractL_Posterior
* ProjectionBasalGanglia_CorticostriatalTractL_Superior
* ProjectionBasalGanglia_CorticostriatalTractR_Anterior
* ProjectionBasalGanglia_CorticostriatalTractR_Posterior
* ProjectionBasalGanglia_CorticostriatalTractR_Superior
* Association_FrontalAslantTractL
* Association_FrontalAslantTractR
* Association_ParietalAslantTractL
* Association_ParietalAslantTractR
* Association_CingulumL_SuperiorLongitudinalFasciculus1
* Association_CingulumR_SuperiorLongitudinalFasciculus1
* Association_CingulumL_FrontalParahippocampal
* Association_CingulumL_FrontalParietal
* Association_CingulumL_SuperiorLongitudinalFasciculus1
* Association_CingulumL_ParahippocampalParietal
* Association_CingulumL_ParahippocampalParietal
* Association_CingulumL_Parahippocampal
* Association_CingulumL_Parolfactory
* Association_CingulumR_FrontalParahippocampal
* Association_CingulumR_FrontalParietal
* Association_CingulumR_SuperiorLongitudinalFasciculus1
* Association_CingulumR_ParahippocampalParietal
* Association_CingulumR_ParahippocampalParietal
* Association_CingulumR_Parahippocampal
* Association_CingulumR_Parolfactory
* Association_ArcuateFasciculusL
* Association_ArcuateFasciculusR
* Association_CingulumL_SuperiorLongitudinalFasciculus1
* Association_CingulumR_SuperiorLongitudinalFasciculus1
* Association_InferiorFrontoOccipitalFasciculusL
* Association_InferiorFrontoOccipitalFasciculusR
* Association_InferiorLongitudinalFasciculusL
* Association_InferiorLongitudinalFasciculusR
* Association_MiddleLongitudinalFasciculusL
* Association_MiddleLongitudinalFasciculusR
* Association_SuperiorLongitudinalFasciculusL_2
* Association_SuperiorLongitudinalFasciculusL_3
* Association_SuperiorLongitudinalFasciculusR_2
* Association_SuperiorLongitudinalFasciculusR_3
* Association_UncinateFasciculusL
* Association_UncinateFasciculusR
* Association_VerticalOccipitalFasciculusL
* Association_VerticalOccipitalFasciculusR
* ProjectionBasalGanglia_FasciculusLenticularisL
* ProjectionBasalGanglia_FasciculusLenticularisR
* ProjectionBasalGanglia_FasciculusSubthalamicusL
* ProjectionBasalGanglia_FasciculusSubthalamicusR
* Association_SuperiorLongitudinalFasciculusL_2
* Association_SuperiorLongitudinalFasciculusL_3
* Association_SuperiorLongitudinalFasciculusR_2
* Association_SuperiorLongitudinalFasciculusR_3
Process Process-2:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/cli/run.py", line 1330, in build_recon_workflow
retval["workflow"] = init_qsirecon_wf(
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/recon/base.py", line 130, in init_qsirecon_wf
single_subject_wf = init_single_subject_wf(
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/recon/base.py", line 337, in init_single_subject_wf
dwi_recon_wfs[dwi_file] = init_dwi_recon_workflow(
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsiprep/workflows/recon/build_workflow.py", line 100, in init_dwi_recon_workflow
workflow.connect(node, "outputnode.recon_scalars",
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 239, in connect
raise Exception("\n".join(["Some connections were not found"] + infostr))
Exception: Some connections were not found
Module convert_mif_to_fib has no output called outputnode.recon_scalars
Reproducing the bug
This is the json file I am using:
{
"name": "ss3tcsd_autotrack_pipeline",
"space": "T1w",
"atlases": [],
"nodes": [
{
"name": "ss3t_csd",
"software": "MRTrix3",
"action": "csd",
"qsirecon_suffix": "ss3t_autotrack",
"input": "qsiprep",
"parameters": {
"mtnormalize": true,
"response": {
"algorithm": "dhollander"
},
"fod": {
"algorithm": "ss3t"
},
"write_mif": true
}
},
{
"name": "convert_mif_to_fib",
"action": "mif_to_fib",
"input": "ss3t_scalars",
"qsirecon_suffix": "ss3t_autotrack"
},
{
"name": "autotrack",
"software": "DSI Studio",
"action": "autotrack",
"input": "convert_mif_to_fib",
"qsirecon_suffix": "ss3t_autotrack",
"parameters": {
"track_id": "Commissure_CorpusCallosum_Body,Commissure_CorpusCallosum_Tapetum,Commissure_CorpusCallosum_ForcepsMajor,Commissure_CorpusCallosum_ForcepsMinor,Fornix,Optic,Reticular,Thalamic_R,Corticos,ProjectionBasalGanglia_CorticostriatalTractL_Anterior,ProjectionBasalGanglia_CorticostriatalTractL_Posterior,ProjectionBasalGanglia_CorticostriatalTractL_Superior,ProjectionBasalGanglia_CorticostriatalTractR_Anterior,ProjectionBasalGanglia_CorticostriatalTractR_Posterior,ProjectionBasalGanglia_CorticostriatalTractR_Superior,Aslant,Association_CingulumL_SuperiorLongitudinalFasciculus1,Association_CingulumR_SuperiorLongitudinalFasciculus1,Association_CingulumL_FrontalParahippocampal,Association_CingulumL_FrontalParietal,Association_CingulumL_SuperiorLongitudinalFasciculus1,Association_CingulumL_ParahippocampalParietal,Association_CingulumL_Parahippocampal,Association_CingulumL_Parolfactory,Association_CingulumR_FrontalParahippocampal,Association_CingulumR_FrontalParietal,Association_CingulumR_SuperiorLongitudinalFasciculus1,Association_CingulumR_ParahippocampalParietal,Association_CingulumR_Parahippocampal,Association_CingulumR_Parolfactory,Fasciculus,Association_SuperiorLongitudinalFasciculusL_2,Association_SuperiorLongitudinalFasciculusL_3,Association_SuperiorLongitudinalFasciculusR_2,Association_SuperiorLongitudinalFasciculusR_3",
"tolerance": "22,26,30",
"track_voxel_ratio": 2.0,
"yield_rate": 0.000001
}
}
]
}
And this is the command to run qsiprep:
docker run --rm -it \
-v /Users/amelier/freesurfer/license.txt:/opt/freesurfer/license.txt \
-v /Users/amelier/Data/PNC/BIDS:/data \
-v /Users/amelier/Data/PNC/out:/data_processed \
-v /Users/amelier/Data/PNC/out_ss3t_autotrack:/out \
-v /Users/amelier/Data/PNC/work:/scratch \
-v /Users/amelier/Code/Playground:/code \
pennbbl/qsiprep:0.21.4 /data /out participant --separate-all-dwis --nthreads 8 --omp-nthreads 8 --output-resolution 1.7 \
--participant_label 1317462 --skip_bids_validation \
--recon_input /data_processed/qsiprep \
--recon_spec /code/workflows/ss3t_autotrack.json --recon-only \
--fs-license-file /opt/freesurfer/license.txt -w /scratch
just replicated this bug!