# Preprocessing steps for sigle-shell macaque dwi data 

**URL:** https://community.mrtrix.org/t/preprocessing-steps-for-sigle-shell-macaque-dwi-data/7641
**Category:** Uncategorized
**Tags:** preprocessing
**Created:** [May 15, 2024, 4:39pm UTC](https://community.mrtrix.org/t/preprocessing-steps-for-sigle-shell-macaque-dwi-data/7641 "2024-05-15T16:39:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![turuilin](https://community.mrtrix.org/user_avatar/community.mrtrix.org/turuilin/32/4766_2.png) [@turuilin](https://community.mrtrix.org/u/turuilin)
#### Post date: [May 15, 2024, 4:39pm UTC](https://community.mrtrix.org/t/preprocessing-steps-for-sigle-shell-macaque-dwi-data/7641/1 "2024-05-15T16:39:16Z")

</div>

Hi, everyone  
I aim to analyze the probabilistic tractography for macaque dwi data (UNC-Wisconsin Neurodevelopment Rhesus MRI Database; single shell data) and further construct SC between ROIs. The ages of these macaque range from 2 weeks to 3 years and I want to analysis how SC changes with age.  
From [https://community.mrtrix.org/t/macaque-pipeline-feedback/7080](https://community.mrtrix.org/t/macaque-pipeline-feedback/7080), I conducted some preprocessing and further analysized of the data. However, I am not sure whether my steps are reasonable and wonder how to conduct SC analysis further, so I would like to obtain some feedback and advice.

1. preprocessing steps  
(1) mrconvert -fslgrad dwi.bvec dwi.bval dwi.nii.gz dwi.mif -force  
(2) mrtransform -linear UNC-Wisconsin\_neurodevelopment/transform\_mrtrix.txt dwi.mif dwi\_trans.mif  
mrtransform -strides 1,2,3,4 dwi\_trans.mif dwi\_trans\_swap.mif  
(3) dwidenoise dwi\_trans\_swap.mif dwi\_trans\_swap\_den.mif  
(4) mrdegibbs dwi\_trans\_swap\_den.mif dwi\_trans\_swap\_den\_unr.mif -axes 0,2  
(5) dwifslpreproc dwi\_trans\_swap\_den\_unr.mif dwi\_trans\_swap\_den\_unr\_preproc.mif -rpe\_none -pe\_dir ap -nocleanup -debug -nthreads 8 (The diffusion data was acquired with twice refocused acquisition)  
(6) dwibiascorrect ants dwi\_trans\_swap\_den\_unr\_preproc.mif dwi\_trans\_swap\_den\_unr\_preproc\_unbiased.mif  
(7) maskfilter mask.nii.gz median mask\_medial.nii.gz （The mask.nii.gz is the processed mask which was provided by database）  
flirt -dof 6 -ref PROCESSED/B0\_LPI.nii.gz -in dwi\_b0.nii.gz -omat orig2pro.txt -out b02pro.nii.gz (B0\_LPI.nii.gz is the processed B0 image which was provided by database)  
transformconvert orig2pro.txt dwi\_b0.nii.gz PROCESSED/B0\_LPI.nii.gz flirt\_import orig2pro\_mrtrix.txt  
mrtransform -linear orig2pro\_mrtrix.txt dwi\_trans\_swap\_den\_unr\_preproc\_unbiased.mif dwi\_trans\_swap\_den\_unr\_preproc\_unbiased\_reg2pro.mif -template PROCESSED/B0\_LPI.nii.gz (these steps aim to register my preprocessed date to the processed data which was provided by database and has high resolution)  
After these preprocessing steps, I obtain the the mask and preprocessed data. But I wonder if I was right to resample dwi data before calculated response function? Additionally, are these steps reasonable and do I need to make further adjustments?

2. FOD  
dwi2response dhollander dwi\_trans\_swap\_den\_unr\_preproc\_unbiased\_reg2pro.mif response\_wm.txt response\_gm.txt response\_csf.txt -voxels 0voxels.mif -mask mask\_medial.nii.gz  
dwi2fod msmt\_csd dwi\_trans\_swap\_den\_unr\_preproc\_unbiased\_reg2pro.mif response\_wm.txt response\_wm.mif response\_csf.txt response\_csf.mif -mask mask\_medial.nii.gz -strides 1,2,3,4 -force -info  
mtnormalise response\_wm.mif response\_wm\_norm.mif response\_csf.mif response\_csf\_norm.mif -mask mask\_medial.nii.gz -check\_norm mtnormalise\_norm.mif -check\_mask mtnormalise\_mask.mif -force -info  
I used msmt\_csd to calculate fod insteaf of ss3t\_csd\_beta1, as I have trouble in installing MRtrix3Tissue. Here is the wm.mif, is it looks ok? Also, I want to estimate the effect of age on SC. So do I need to average the response function (A subjuct has multiple scans)?  
 ![image](https://community.mrtrix.org/uploads/default/original/2X/b/b642e959025aefa6cc75c6b2efc4e6608635e540.jpeg)

3. tckgen -algo iFOD2 -maxlength 250 -nthreads 8 -cutoff 0.06 -select 100M -seed\_dynamic response\_wm\_norm.mif response\_wm\_norm.mif tracks\_10M.tck -force -debug -info  
tcksift2 -out\_mu sift2\_mu.txt -out\_coeffs sift2\_coeffs.txt -nthreads 8 tracks\_10M.tck response\_wm\_norm.mif tracks\_sift\_1M.tck -force  
The following picture is tracks\_200k.tck which was generated for ease of presentation. Is it looks right? Do I need to make my own white matter mask as seed image?  

4. I have not compute SC cause I some questions about tck2connectome.  
(1) Could I used sift2\_mu.txt to quantify streamlines?  
(2) Could I calculate SC between ROIs in template space as I also want to compute FC between ROIs with other fsfmri data?  
(3)
