Skip to content

Naomi-Ding/S-GMAS

Repository files navigation

S-GMAS: Genome-wide mediation analysis with Brain Subcortical Shape Mediators

Abstract

Mediation analysis is widely utilized in neuroscience to investigate the role of brain image phenotypes in the neurological pathways from genetic exposures to clinical outcomes. However, it is still difficult to conduct mediation analyses with whole genome-wide exposures and brain subcortical shape mediators due to several challenges including (i) large-scale genetic exposures, i.e., millions of single-nucleotide polymorphisms (SNPs); (ii) nonlinear Hilbert space for shape mediators; and (iii) statistical inference on the direct and indirect effects. To tackle these challenges, this paper proposes a genome-wide mediation analysis framework with brain subcortical shape mediators. First, to address the issue caused by the high dimensionality in genetic exposures, a fast genome-wide association analysis is conducted to discover potential genetic variants with significant genetic effects on the clinical outcome. Second, the square-root velocity function representations are extracted from the brain subcortical shapes, which fall in an unconstrained linear Hilbert subspace. Third, to identify the underlying causal pathways from the detected SNPs to the clinical outcome implicitly through the shape mediators, we utilize a shape mediation analysis framework consisting of a shape-on-scalar model and a scalar-on-shape model. Furthermore, the bootstrap resampling approach is adopted to investigate both global and spatial significant mediation effects. Finally, our framework is applied to the corpus callosum shape data from the Alzheimer’s Disease Neuroimaging Initiative.

Framework Overview

CC Whole Framework


Code Structure

The code consists of five main R and MATLAB scripts:

  1. Step1_GWAS.R - Fast Genome-wide association study (GWAS) on cognitive outcomes
  2. Step2_MVCM_screening.m - Multivariate varying coefficient model screening on shape data
  3. Step3_Mediation.R - Mediation analysis with bootstrap inference
  4. MFSDA.R - MVCM estimators adapted from MATLAB code
  5. utilities_functions.R - Utility functions used across the analysis

Analysis Steps

Step 1: GWAS Analysis

  • Performs fast GWAS on cognitive outcomes
  • Analyzes multiple cognitive measures including ADAS11, ADAS13, CDRSB, FAQ, MMSE, and RAVLT scores
  • Required packages:
    • statgenGWAS
    • R.matlab
    • HardyWeinberg

Step 2: MVCM Screening

  • Implements multivariate varying coefficient model screening
  • Processes shape data and coordinates
  • Required software:
    • MATLAB

Step 3: Mediation Analysis

  • Performs mediation analysis using bootstrap methods
  • Analyzes significant SNPs from previous steps
  • Required packages:
    • R.matlab
    • coxed
    • mgcv
    • refund
    • pracma

Required Packages

R Packages

  • statgenGWAS - For GWAS analysis
  • R.matlab - For MATLAB file interface
  • HardyWeinberg - For genetic analysis
  • coxed - For bias-corrected and accelerated confidence intervals
  • pracma - For numerical analysis and matrix operations
  • mgcv - For generalized additive models
  • refund - For functional data analysis

MATLAB Requirements

  • Base MATLAB installation
  • Statistics and Machine Learning Toolbox (recommended)

Usage

1. Set up the working directory with all required data files.

  • SNP data
  • Cognitive outcome measures
  • Aligned Corpus callosum shape data & functional representations
  • Covariates

2. Execute the scripts in order:

# Step 1: GWAS
Rscript Step1_GWAS.R <working_directory> [outcome_list]

# Step 2: MVCM screening (MATLAB)
matlab -nodisplay -nosplash -r "Step2_MVCM_screening('<data_path>', <num_bootstrap_step2>); quit"

# Step 3: Mediation analysis
Rscript Step3_Mediation.R <working_directory> <num_bootstrap_step3> [outcome_list]

Arguments

  • <working_directory>: Path containing input data files
  • <data_path>: Path to the shape data directory (used in Step 2)
  • <num_bootstrap_step2>: Number of bootstrap iterations for MVCM screening (default = 500)
  • <num_bootstrap_step3>: Number of bootstrap samples for mediation analysis
  • [outcome_list]: Optional, comma‑separated list of outcomes to analyze

3. Output Structure

Results are organized in the following directories:

  • results/step1_GWAS/ - GWAS results
  • results/step2_MVCM/ - MVCM screening results
  • results/step3_mediation/ - Final mediation analysis results

About

Genome-wide mediation analysis with Brain Subcortical Shape Mediators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors