ROI extraction from FA images
This step is mainly to calculate the FA value of each ROI from FA images.
1 Download the file in the connection: Http://enigma.ini.usc.edu/wp-content/uploads/2012/06/ROIextraction_info.zip, extract the file, name Roiextraction_ Info folder moved to Fa_individ in the same directory
2 Create a new file and name it run_roi_part1.sh, the code is as follows:
mkdir enigma_roi_part1diro1=./enigma_roi_part1/for subj in {1..89}do./roiextraction_info/singlesubjroi _exe./roiextraction_info/enigma_look_up_table.txt./roiextraction_info/mean_fa_skeleton.nii.gz./ROIextraction_ Info/jhu-whitematter-labels-1mm.nii.gz ${diro1}/subject${subj}_roiout./fa_individ/subject${subj}/stats/ Subject${subj}_masked_faskel.nii.gzdone
Run the script, you will get 89 subject*_roiout.csv files and store them in the Enigma_roi_part1 folder.
3 Create a new file and name it run_roi_part2.sh, the code is as follows
mkdir enigma_roi_part2diro1=./enigma_roi_part1/diro2=./enigma_roi_part2/# want to automatically Create a subjectlist file # in which case delete the old one# and ' echo ' of the output files into a new n Amerm./subjectlist.csvfor subj in {1..87}do./roiextraction_info/averagesubjecttracts_exe ${dirO1}/ Subject${subj}_roiout.csv ${diro2}/subject${subj}_roiout_avg.csv# can create subject list here for part 3!echo ${ Subject},${diro2}/${subject}_roiout_avg.csv >>./subjectlist.csvdone
Run the script, you will get 89 subject*_roiout_avg.csv files and store them in the Enigma_roi_part2 folder. This step is mainly for the ROI with left and right partitioning.
At this point, the contents of the Run_tbss folder are as follows:
4 Integrate all patient ROI information into one CSV file
(1) Install R package: Download and install ' R ' http://cran.r-project.org/
(2) Create a new file and name it all_subject_info.txt, this file mainly records the patient's related information, the Roiextraction_info folder provides an example:
(3) Create a new file and name it run_roi_part3.sh, the code is as follows
######### Part3-Combine all ###### #Table=./All_subject_info.txtsubjectidcol=subjectidsubjectlist=./subjectlist.csvouttable=./Combinedroitable.csvncov=2covariates="Age ; Sex"Nroi=" All"#2Rois="IC; EC"#location of R binary Rbin=/usr/bin/R#run the R code${rbin}--no-save--slave--args ${table} ${subjectidcol} ${subjectlist} ${outtable} ${ncov} ${covariates} ${Nroi} ${rois} <. /combine_subject_tables. R
Place the All_subject_info.txt, Subjectlist.csv, combine_subject_tables in the Roiextraction_info folder. R moves to the same directory as ENIGMA_ROI_PART2 and executes the script, the output is shown in detailed step one of Enigma DTI protocol.
ENIGMA DTI Protocol Detailed step three