Braingraph User Guide Version 3.0.0
Total Page:16
File Type:pdf, Size:1020Kb
brainGraph User Guide Version 3.0.0 Christopher G. Watson, Ph.D. Dept. of Pediatrics, Children's Learning Institute University of Texas Health Science Center at Houston September 30, 2020 Table of Contents List of Tables ............................................ viii Preface................................................ ix I Introductory Material 1 Chapter 1: Installation and Requirements.......................... 2 1.1: System Requirements ...................................... 2 1.2: GUI-related note......................................... 3 1.3: OS-specific instructions and notes................................ 3 1.3.1 Preferred method, any OS................................ 3 1.3.2 Linux ........................................... 3 1.3.3 Mac............................................ 4 1.3.4 Windows ......................................... 4 1.4: Compatible neuroimaging software............................... 4 1.5: Compatible atlases........................................ 5 1.5.1 Using your own atlas: required format......................... 6 1.5.2 Atlases to be added (potential)............................. 6 Chapter 2: Getting Help and Other Resources ....................... 7 2.1: Getting help............................................ 7 2.2: Learning resources........................................ 7 2.2.1 Graph theory....................................... 7 2.2.2 R programming...................................... 8 2.3: Other R packages......................................... 8 2.3.1 Other network-related packages............................. 8 2.3.2 Medical Imaging Task View............................... 8 2.3.3 Neuroconductor ..................................... 8 2.3.4 Implementations of popular MRI software....................... 8 2.3.5 Other ........................................... 9 2.4: Validation of graph metrics................................... 9 Chapter 3: Getting data from Freesurfer and FSL ..................... 11 3.1: Structural data from Freesurfer................................. 11 3.2: Tractography........................................... 11 3.2.1 Create/convert parcellated volume........................... 12 3.2.2 Get individual seed ROI's................................ 12 II brainGraph Basics 14 Chapter 4: Overview of the brainGraph Package....................... 15 4.1: Concepts/workflow........................................ 15 ii 4.1.1 \Step 0": Setting up data and scripts ......................... 15 4.1.2 Step 1: Import data and create connectivity matrices ................ 15 4.1.3 Step 2: Create graphs and calculate metrics...................... 16 4.1.4 Step 3: Perform group analyses............................. 16 4.1.5 Step 4: Visualize results................................. 16 4.2: Functions............................................. 16 4.2.1 Graph creation...................................... 16 4.2.2 Graph metrics ...................................... 17 4.2.3 Group comparison.................................... 17 4.2.4 Visualization....................................... 18 4.2.5 Random graphs, small world, and rich club...................... 18 4.2.6 Generic methods..................................... 18 Chapter 5: Getting started ................................... 20 5.1: Setting up files for your project................................. 20 5.1.1 Project scripts ...................................... 20 5.1.2 Package global options.................................. 21 5.1.3 Loading required packages................................ 22 5.1.4 Project data ....................................... 22 5.1.5 Data Compatibility.................................... 23 5.2: Graph object attributes ..................................... 23 5.2.1 The summary method .................................. 23 5.2.2 Graph-level attributes.................................. 25 5.2.3 Vertex-level attributes.................................. 26 5.2.4 Edge-level attributes................................... 26 5.3: Community detection ...................................... 27 5.4: Plotting.............................................. 27 5.4.1 MNI152 template..................................... 27 5.4.2 Axial ........................................... 28 5.4.3 Sagittal.......................................... 28 5.4.4 Circular.......................................... 29 III Graph Creation 31 Chapter 6: Structural covariance networks.......................... 32 6.1: Overview ............................................. 32 6.1.1 Complete example.................................... 32 6.2: Import the data.......................................... 33 6.2.1 Custom atlas....................................... 34 6.3: Model residuals.......................................... 34 6.3.1 Function arguments ................................... 34 6.3.2 Return value ....................................... 35 6.3.3 Example.......................................... 35 6.4: Data checking........................................... 35 6.4.1 Summary......................................... 35 6.4.2 Plot............................................ 36 6.5: Correlation Matrix and Graph Creation............................ 37 6.5.1 Excluding regions..................................... 37 6.5.2 Graph creation...................................... 37 6.6: Getting measures of interest................................... 38 6.7: Long and wide data tables.................................... 40 Chapter 7: Tractography and fMRI.............................. 41 iii 7.1: Setting up............................................. 41 7.1.1 Tractography....................................... 41 7.1.2 fMRI............................................ 42 7.2: Import, normalize, and filter matrices for all subjects..................... 42 7.2.1 Function arguments ................................... 43 7.2.2 Return value ....................................... 44 7.2.3 Code example....................................... 45 7.2.4 Applying the same thresholds to other matrices.................... 45 7.3: Graph creation.......................................... 45 7.4: Graph- and vertex-level measures................................ 47 7.5: Example commands ....................................... 47 IV Group Analyses: GLM-based 49 Chapter 8: Vertex-wise group analysis (GLM)........................ 50 8.1: Function arguments ....................................... 50 8.1.1 Mandatory ........................................ 51 8.1.2 Optional.......................................... 51 8.1.3 Unnamed: design matrix arguments .......................... 52 8.2: Return object........................................... 53 8.2.1 Return object: DT .................................... 55 8.3: Tutorial: design matrix coding ................................. 56 8.3.1 Suggested reading .................................... 56 8.3.2 Dummy coding...................................... 56 8.3.3 Cell means coding .................................... 58 8.3.4 Effects coding....................................... 58 8.4: Examples ............................................. 60 8.4.1 Two-group difference................................... 60 8.4.2 Two-group difference adjusted for covariate...................... 61 8.4.3 Two-group difference with continuous covariate interaction ............. 61 8.4.4 Two-way between subjects ANOVA: 2x2........................ 62 8.4.5 Two-way between subjects ANOVA: 2x3........................ 63 8.4.6 Three-way between subjects ANOVA: 2x2x2 ..................... 66 8.5: Permutation testing ....................................... 66 8.5.1 Example.......................................... 67 8.6: Plotting LM diagnostics..................................... 67 8.7: Create a graph of the results .................................. 69 8.8: Plotting a graph of the results.................................. 69 Chapter 9: Multi-threshold permutation correction .................... 71 9.1: Background............................................ 71 9.1.1 MTPC procedure..................................... 71 9.2: Function arguments ....................................... 72 9.2.1 Mandatory ........................................ 72 9.2.2 Optional.......................................... 72 9.2.3 Unnamed......................................... 73 9.3: Return value ........................................... 73 9.4: Code example........................................... 74 9.5: Plotting the statistics ...................................... 77 9.6: Create a graph of the results .................................. 79 9.7: Plotting a graph of the results.................................. 79 Chapter 10: Network-based statistic (NBS).......................... 81 iv 10.1: Background............................................ 81 10.2: Function arguments ....................................... 81 10.3: Return value ........................................... 82 10.4: Code example........................................... 83 10.5: Creating a graph of the results ................................. 84 10.6: Plotting the results........................................ 85 10.7: Testing .............................................. 85 Chapter 11: Graph- and vertex-level mediation analysis .................. 87 11.1: Background............................................ 87 11.1.1 Suggested reading .................................... 88 11.2: Notation.............................................. 88 11.3: Function arguments