1. ABOUT THE DATASET ------------ Title: Human Connectome Project thalamic parcellation. Creator(s): Brendan Williams [1]. Organisation(s): 1. University of Reading. Rights-holder(s): Brendan Williams Publication Year: 2021 Description: This dataset contains the following items: 1. Thalamic segmentation data for Human Connectome Project participants using the FreeSurfer ThalamicSegmentation tool (https://doi.org/10.1016/j.neuroimage.2018.08.012) in subject space. 2. Registration files to convert data from subject space to MNI152_T1_1mm space using ANTS (https://doi.org/10.1016/j.media.2007.06.004). 3. Group-level mean probability maps for each thalamic nucleus in MNI152_T1_1mm space. 4. Scripts used for data analysis. Dataset items 1 and 2 are in a tar archive file split into four parts with the prefix "Subject_data.tar.gz.part_*". These four parts can be concatenated using the following command "cat Subject_data.tar.gz.part_* > Subject_data.tar.gz" Dataset item 3 is in the tar archive file "Group_data.tar.gz" Dataset item 4 is in the tar archive file "Scripts.tar.gz" Cite as: Williams, Brendan. (2021): Human Connectome Project thalamic parcellation. University of Reading. Dataset. https://doi.org/10.17864/1947.000339. Related publication: Williams, Brendan., Roesch, Etienne., Christakou, Anastasia. (2022): Systematic validation of an automated thalamic parcellation technique using anatomical data at 3T. NeuroImage. https://doi.org/10.1016/j.neuroimage.2022.119340 Contact: b.williams3@reading.ac.uk 2. TERMS OF USE ----------------- Copyright 2021 Brendan Williams. All documentation and code are licensed by the rights-holder under a Creative Commons Attribution 4.0 International (CC BY 4.0) license (https://creativecommons.org/licenses/by/4.0/). Data were provided by the Human Connectome Project, WU-Minn Consortium (Principal Investigators: David Van Essen and Kamil Ugurbil; 1U54MH091657) funded by the 16 NIH Institutes and Centers that support the NIH Blueprint for Neuroscience Research; and by the McDonnell Center for Systems Neuroscience at Washington University. Output derived from the Human Connectome Project are licensed under the WU-Minn HCP Consortium Open Access Data Use Terms (https://www.humanconnectome.org/study/hcp-young-adult/document/wu-minn-hcp-consortium-open-access-data-use-terms). 3. PROJECT AND FUNDING INFORMATION ------------ Title: Cortical and subcortical contributions to human cognitive flexibility Dates: October 2018 - October 2021 Funding organisation: School of Psychology and Clinical Language sciences, University of Reading Grant no.: Magdalen Vernon PhD studentship awarded to Brendan Williams. 4. CONTENTS ------------ Subject_data.tar.gz is structured in the following way: Main directory: Individual sub-directories for each participant. Participant sub-directories: Each participant sub-directory contains three files. These files are: 1. ThalamicNuclei.v12.T1.nii.gz - Thalamic segmentation output in subject's T1 space 2. Ants_syn0GenericAffine.mat - Affine transformation for linear registration of thalamic nuclei to MNI152_T1_1mm space 3. Ants_syn1Warp.nii.gz - Warp transformation for non-linear registration of thalamic nuclei to MNI152_T1_1mm space Group_data.tar.gz contains: DICE_L.csv and DICE_R.csv contains the DICE coefficients for segmentations and regions in the Morel atlas in the left and right thalamus, respectively. The vertical axis contains labels for segmented regions, and the horizontal axis contains labels for regions in the Morel atlas. AHD_L.csv and AHD_R.csv contains the Average Hausdorff Distance (in voxels) between segmentations and regions in the Morel atlas in the left and right thalamus, respectively. The vertical axis contains labels for segmented regions, and the horizontal axis contains labels for regions in the Morel atlas. Nifti files containing group-level mean probability maps for each thalamic nucleus in MNI152_T1_1mm space. Scripts.tar.gz is structured in the following way: Main directory: Four subdirectories: analysis, ants, slurm, templates. The contents of each subdirectory are listed below Scripts/analysis: 1. compare_segs: bash shell script to compare segmented nuclei with nuclei in the Morel atlas using the EvaluateSegmentation toolbox. 2. get_vols: bash shell script to calculate the volume of each nucleus for each subject and generates a text file for each nucleus as output/ 3. Stats_revisions.ipynb: interactive python notebook to run analysis for the paper. Scripts/ants: 1. antsRegistrationSyn.sh: function used to run ants registration. Scripts/slurm: 1. jobarray.sh: bash shell script used to submit job to slurm for running parcellation of each subject. 2. jobarray_ants.sh: bash shell script used to submit job to slurm for running ants registration for each subject. 3. merge_segs: bash shell script use to generate group-level mean probability maps 4. prep_ants: bash shell script to generate individual scripts from the templates "Scripts/templates/ants_get_t1.py" and "Scripts/templates/run_ants". The derivates of "Scripts/templates/run_ants" will be submitted to slurm by "Scripts/slurm/jobarray_ants.sh". 5. prep_job: bash shell script to generate individual scripts from the templates "Scripts/templates/Anat-Diff-Jobscript.py" and "Scripts/templates/run_job". The derivates of "Scripts/templates/run_job" will be submitted to slurm by "Scripts/slurm/jobarray.sh". 6. run_merge_segs.sh: bash shell script used to submit job to slurm for running "Scripts/slurm/merge_segs". Scripts/templates: 1. Anat-Diff-Jobscript.py: nipype workflow for generating thalamic segmentations. 2. ants_get_t1.py: python script for downloading T1 data for a subject. 3. run_ants: runs ants registration using "Scripts/ants/antsRegistrationSyn.sh" and applies transforms to MNI152_T1_1mm for each nucleus. 4. run_job: runs the nipype workflow in "Scripts/templates/Anat-Diff-Jobscript.py". N.B. 1. Some scripts will require AWS credentials to connect to the HCP bucket on Amazon S3. 2. Some scripts require nuclei from the Morel atlas (https://doi.org/10.1016/j.neuroimage.2009.10.042). 3. Scripts use absolute paths, and these will need to be modified before use, so they are referring to the correct file path. 4. Scripts need to be run in the order defined below: 1. "Scripts/slurm/prep_job" and "Scripts/slurm/prep_ants" 2. "Scripts/slurm/jobarray.sh" 3. "Scripts/slurm/jobarray_ants.sh" 4. "Scripts/slurm/run_merge_segs.sh" 5. "Scripts/analysis/compare_segs" and "Scripts/analysis/get_vols" 6. "Scripts/analysis/Stats_revisions.ipynb" 5. METHODS -------------------------- Anatomical data were sourced from the publicly available dataset of the Human Connectome Project (HCP) 1200 Subjects Data Release (https://www.humanconnectome.org/study/hcp-young-adult/document/1200-subjects-data-release). HCP data were acquired using a custom Siemens 3T Connectome Skyra scanner with a 32 channel receiver head coil and custom body transmission coil. Two T1 weighted anatomical images were acquired using a 3D magnetization-prepared rapid gradient-echo (MP-RAGE) sequence with GeneRalized Autocalibrating Partially Parallel Acquisitions (GRAPPA) (R = 2) [TR = 2400ms; TE = 2.14ms; TI = 1000ms; slices = 256; voxel volume = 0.7mm3; slice thickness = 0.7mm; distance factor = 50%; slice oversampling = 0.0%; FOV = 224 x 224mm; matrix = 320 x 320; flip angle = 8°; phase encoding direction = A -> P; interleaved acquisition; echo spacing = 7.6ms]. Data were preprocessed using the HCP minimal preprocessing pipelines (https://doi.org/10.1016/j.neuroimage.2013.04.127). Firstly, T1w images were corrected for gradient distortions using a customised version of gradient_nonlin_unwarp in FreeSurfer, then each subject's two T1w scans were aligned using FSL FLIRT and averaged. The averaged T1w image was then registered to MNI space using a 12 DOF affine registration with FLIRT, and a subset of 6 DOF transforms were used to align the anterior commissure, the anterior commissure - posterior commissure line, and the inter-hemispheric plane, while preserving the size and shape of the brain in native space. The skull was removed by inverting linear (FLIRT) and non-linear (FNIRT) warps from anatomical to MNI space, applying the warp to the MNI space brain mask, and then applying the mask to the averaged T1w image. Finally, the image was corrected for readout distortion and biases in B1 and B1+ fields. Anatomical T1 images were processed and parcellated using recon-all in FreeSurfer; the output of recon-all was used to initialise the parcellation of thalamic nuclei for anatomical data using the algorithm described by https://doi.org/10.1016/j.neuroimage.2018.08.012. Linear rigid and affine transformations and non-linear warps were generated using the Advanced Normalization Tools (ANTs) package (Version 2.3.5, Ecphorella) script antsRegistrationSyN.sh (https://doi.org/10.1016/j.media.2007.06.004). Group-level probabilistic atlases were created by calculating a mean probability map for each parcellation in MNI space (described previously by https://doi.org/10.1038/sdata.2018.270). Group level segmentations were then compared to the Morel probabilistic atlas, which was used as ground truth https://doi.org/10.1016/j.neuroimage.2009.10.042. Each parcellation was compared separately to individual nuclei in the Morel atlas using the EvaluateSegmentation toolbox https://doi.org/10.1186/s12880-015-0068-x, a threshold of > 0.25 was set for specificity metrics that do not accept non-binary input. The DICE coefficient was used as a measure of overlap between segmentations and ground truth; it is a widely used measure in imaging processing for assessing the overlap between segmentation approaches. The Average Hausdorff Distance is used as a measure of dissimilarity. Distance based metrics are advantageous, relative to overlap metrics in situations where segmentations are small, because overlap-based metrics disproportionately penalise errors in smaller than larger segmentations as is the case with thalamic nuclei. Importantly, the Average Hausdorff Distance is sensitive to the position of false positives in a segmentation relative to ground truth, and therefore is a useful metric when considering the boundary of a segmentation, and can account for isometry.