A connectome generation pipeline waiting for advice

Hi MRtrix3 Community,

I’m working on my pipeline to generate a whole-brain connectome. I think I have it almost down, however, I’m a beginner so there may be some problems and I would like to figure out a few details. I’d appreciate it if someone can take a look and provide advice.

I mainly follow the steps in this tutorial.

The problems I want to figure out are listed as follows:

  1. Is it suitable to downsample data using mrtransform in the code?
  2. I wonder if the order of downsampling and preprocessing matters a lot.
  3. Is there a voxel-wise method for connectome generation?

0 About data

I’m using HCP DWI preprocessed data. According to the doc, some preprocessing steps have already been done shown in the following figure:

1 Convert DWI to mif

mrconvert -fslgrad bvecs bvals data.nii.gz 'dwi.mif'

mrtransform T1w.nii.gz -template MNI152_T1_2mm.nii.gz T1w_MNI2mm.nii.gz

mrtransform dwi.mif -template MNI152_T1_2mm.nii.gz dwi_MNI2mm.mif


In the previous topic (Get stuck when import DWI data - #4 by jdtournier), Dr.Donald suggested I not to downsample the data, however, considering DWI data is just a part of my task, I need to adjust it to fit other data in MNI2mm space.

2 preprocess DWI

  1. dwi2mask — create a mask for preprocessing
  2. dwidenoise
  3. dwidegibbs
  4. Since TOPUP and EDDY have already been done in the HCP pipeline. I skip them in my pipeline.
  5. When it comes to dwibiascorrect, in the tutorial, it is said that this command is an optional step that can lead to a better mask estimation, so I choose not to use it.

3 Calculate CSD

  1. dwi2mask — create a mask to restrict my analysis to voxels that are located within the brain
  2. dwi2response
  3. dwi2fod

4 Generate a whole-brain tractography

tckgen -algo iFOD2 -act 5ttseg.mif -backtrack -crop_at_gmwmi -nthreads 24 \
       -cutoff 0.05 -angle 45 -minlength 20 -maxlength 250 \
       -seed_image dwi_wmMask.mif -select 10000k dwi_wmCsd.mif \
       fibs_10M_act.tck

tckedit fibs_10M_act.tck -number 200k fibs_select200k.tck

tcksift2 -act 5ttseg.mif -out_mu sift_mu.txt -out_coeffs sift_coeffs.txt  \
            -nthreads 24 fibs_10M_act.tck dwi_wmCsd.mif sift_1M.txt

5 Generate connectome

  • tck2connectome


Thanks,
Volcano

1 Like

This all seems sensible – though as always, it really depends on what your research question is exactly, etc.

The only thing I would query are the two mrtransform steps in your “1 Convert DWI to mif” stage: there is no reason to do this as far as MRtrix is concerned. You can keep the T1 and the DWI at their native resolutions, and use any derived outputs (e.g. the 5TT image) with tckgen alongside the FOD image derived from the DWI at whatever resolution that was, and provide ROIs derived from a different image again (maybe that’s what your registration to MNI is really about?), and it should all work correctly. These images can be coregistered even if they are not on the same voxel grid.

More to the point, the mrtransform commands as you have them will just regrid the data onto a voxel grid to match the MNI template, but they won’t actually perform any coregistration as such. This will only work if the images are already coregistered. I recommend you have a read through @maxpietsch’s excellent wiki article on the topic if any of this is unclear.

Thanks for your reply!

Actually, due to my being a beginner, I’m not familiar with the feature you mentioned of MRtrix3, I will explore the doc and wiki and try to figure it out.

Thanks again for your attention and advice!

Bests,
Volcano