PennLINC / qsiprep

Preprocessing of diffusion MRI

Home Page:http://qsiprep.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dsistudio autotrack recon not saving out all bundles

hamsiradhakrishnan opened this issue · comments

Summary

Not all segmented bundles are being saved out in the recon directory when using the dsi_studio_autotrack recon workflow.

Additional details

  • QSIPrep version: 0.21.4
  • Singularity version: 3.8.3

What were you trying to do and what actually happened?

I'm using the latest version of QSIprep (0.21.4) to run the dsi_studio_autotrack recon pipeline- and it looks like some of the bundles (CorpusCallosum, Cingulum, SLF, CST) aren't being saved out in the final output directory. Some of the missing ones do seem to be present in the work directory, but not in subsegments (i.e., just "CorpusCallosum" and not "CorpusCallosumForcepsMinor" etc), and they're not ported over to the main output directory. There are no errors thrown in the logs. The call from qsiprep is

dsi_studio --action=atk --export_trk=1 --source=<fibfile> --thread_count=3 --output=<workdir> --tolerance=22,26,30 --track_id=Fasciculus,Cingulum,Aslant,Corticos,Thalamic_R,Reticular,Optic,Fornix,Corpus --track_voxel_ratio=2.00 --trk_format=trk.gz --yield_rate=0.0000010000

I also checked whether it was a dsistudio bug and it seems like not:
https://groups.google.com/g/dsi-studio/c/zx4u739EWGc

Even more info:

The output log throws no error, and claims that it's trying to reconstruct all the bundles:

nipype.interface INFO:
	 AutoTrack attempted to reconstruct the following bundles:
  * 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_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
  * Association_FrontalAslantTractL
  * Association_FrontalAslantTractR
  * Association_ParietalAslantTractL
  * Association_ParietalAslantTractR
  * ProjectionBasalGanglia_CorticostriatalTractL_Anterior
  * ProjectionBasalGanglia_CorticostriatalTractL_Posterior
  * ProjectionBasalGanglia_CorticostriatalTractL_Superior
  * ProjectionBasalGanglia_CorticostriatalTractR_Anterior
  * ProjectionBasalGanglia_CorticostriatalTractR_Posterior
  * ProjectionBasalGanglia_CorticostriatalTractR_Superior
  * ProjectionBrainstem_CorticospinalTractL
  * ProjectionBrainstem_CorticospinalTractR
  * ProjectionBrainstem_ReticularTractL
  * ProjectionBrainstem_ReticularTractR
  * ProjectionBasalGanglia_OpticRadiationL
  * ProjectionBasalGanglia_OpticRadiationR
  * ProjectionBasalGanglia_FornixL
  * ProjectionBasalGanglia_FornixR
  * Commissure_CorpusCallosum_ForcepsMinor
  * Commissure_CorpusCallosum_Body
  * Commissure_CorpusCallosum_Tapetum
  * Commissure_CorpusCallosum_ForcepsMajor

However, only the following output folders can be found in qsirecon-DSIstudio:

*_bundle-Association_ArcuateFasciculusL_streamlines.tck
*_bundle-Association_ArcuateFasciculusR_streamlines.tck
*_bundle-Association_FrontalAslantTractL_streamlines.tck
*_bundle-Association_FrontalAslantTractR_streamlines.tck
*_bundle-Association_InferiorFrontoOccipitalFasciculusL_streamlines.tck
*_bundle-Association_InferiorFrontoOccipitalFasciculusR_streamlines.tck
*_bundle-Association_InferiorLongitudinalFasciculusL_streamlines.tck
*_bundle-Association_InferiorLongitudinalFasciculusR_streamlines.tck
*_bundle-Association_MiddleLongitudinalFasciculusL_streamlines.tck
*_bundle-Association_MiddleLongitudinalFasciculusR_streamlines.tck
*_bundle-Association_ParietalAslantTractL_streamlines.tck
*_bundle-Association_ParietalAslantTractR_streamlines.tck
*_bundle-Association_UncinateFasciculusL_streamlines.tck
*_bundle-Association_UncinateFasciculusR_streamlines.tck
*_bundle-Association_VerticalOccipitalFasciculusL_streamlines.tck
*_bundle-Association_VerticalOccipitalFasciculusR_streamlines.tck
*_bundle-ProjectionBasalGanglia_FasciculusLenticularisL_streamlines.tck
*_bundle-ProjectionBasalGanglia_FasciculusLenticularisR_streamlines.tck
*_bundle-ProjectionBasalGanglia_FasciculusSubthalamicusL_streamlines.tck
*_bundle-ProjectionBasalGanglia_FasciculusSubthalamicusR_streamlines.tck
*_bundle-ProjectionBasalGanglia_FornixL_streamlines.tck
*_bundle-ProjectionBasalGanglia_FornixR_streamlines.tck
*_bundle-ProjectionBasalGanglia_OpticRadiationL_streamlines.tck
*_bundle-ProjectionBasalGanglia_OpticRadiationR_streamlines.tck
*_bundle-ProjectionBrainstem_CorticospinalTractL_streamlines.tck
*_bundle-ProjectionBrainstem_CorticospinalTractR_streamlines.tck
*_bundle-ProjectionBrainstem_ReticularTractL_streamlines.tck
*_bundle-ProjectionBrainstem_ReticularTractR_streamlines.tck
*_bundlestats.csv
*_dwimap.fib.gz
*_mapping.map.gz

Contents of the dsistudio working directory *_recon_wf/autotrackgqi/actual_trk/) for your reference:

Association_ArcuateFasciculusL
Association_ArcuateFasciculusR
Association_CingulumL
Association_CingulumR
Association_FrontalAslantTractL
Association_FrontalAslantTractR
Association_InferiorFrontoOccipitalFasciculusL
Association_InferiorFrontoOccipitalFasciculusR
Association_InferiorLongitudinalFasciculusL
Association_InferiorLongitudinalFasciculusR
Association_MiddleLongitudinalFasciculusL
Association_MiddleLongitudinalFasciculusR
Association_ParietalAslantTractL
Association_ParietalAslantTractR
Association_SuperiorLongitudinalFasciculusL
Association_SuperiorLongitudinalFasciculusR
Association_UncinateFasciculusL
Association_UncinateFasciculusR
Association_VerticalOccipitalFasciculusL
Association_VerticalOccipitalFasciculusR
Commissure_CorpusCallosum
ProjectionBasalGanglia_CorticostriatalTractL
ProjectionBasalGanglia_CorticostriatalTractR
ProjectionBasalGanglia_FasciculusLenticularisL
ProjectionBasalGanglia_FasciculusLenticularisR
ProjectionBasalGanglia_FasciculusSubthalamicusL
ProjectionBasalGanglia_FasciculusSubthalamicusR
ProjectionBasalGanglia_FornixL
ProjectionBasalGanglia_FornixR
ProjectionBasalGanglia_OpticRadiationL
ProjectionBasalGanglia_OpticRadiationR
ProjectionBrainstem_CorticospinalTractL
ProjectionBrainstem_CorticospinalTractR
ProjectionBrainstem_ReticularTractL
ProjectionBrainstem_ReticularTractR
command.txt
_inputs.pklz
_node.pklz
_report
result_actual_trk.pklz
*_dwi.src.gz.odf.gqi.1.25.fib.gz.icbm152_adult.map.gz
*_dwi.src.gz.odf.gqi.1.25.fib.gz.idx

Thank you so much for your help!

-->

In my experience, DSI Studio AutoTrack GQI does not always reconstruct all requested tracts with the default number of seeds or streamlines. This can be related to data quality or large anatomical differences (e.g. damaged ipsilesional CST post-stroke) from the young adults atlas used in DSI Studio.

I would recommend trying to run AutoTrack in the DSI Studio GUI using the qsiprep preprocessed data for a few participants in your dataset and adjusting the tracking parameters. If you find a set of parameters that works for all your participants, these could be used for a custom reconstruction workflow in QSIPrep.

Best of luck!

@hamsiradhakrishnan can you confirm that there are trk files in those directories? And are there entries for them in the bundlesummaries.tsv?

Yes there are .trk files and non-empty stat values in the *stat.txt files in the work directory- but the entries for the missing bundles in bundlestats.csv in the qsirecon-DSIStudio output directory has no metrics. The rows are still there, but it looks something like this:
Commissure_CorpusCallosum_ForcepsMajor,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,sub-118935,ses-20140825x0951,,,acq-34dir,space-T1w,,,sub-118935_ses-20140825x0951_acq-34dir_space-T1w_desc-preproc_dwi.nii.gz

Are there any streamlines in the .trk files if you load them in DSI Studio or another .trk viewer (e.g. DIPY Horizon)?

Closed via #783

@mattcieslak Has this issue been fixed? I updated the pipeline JSON file as #783, but the bundles' stats remain empty.