Longitudinal GWAS with CTS approach
This R script run the longitudinal GWAS with Conditional Two-Step approach. Reference paper: https://www.nature.com/articles/ejhg20151#Abs1
pheno_file: Full path to the phenotype file, longitudinal dataset with long-format
- RDS format
- covariates should be included for LMM analysis
- FID and IID columns should also be included
- Example pheno_file: /data/h_vmac/zhanm32/SPAREAD/DATA/ADNI/CTS_ADNI.rds
geno_file: Full path to the genotype file, file prefix included (PLINK .bim format)
id_col: Column name in the phenotype file representing subject IDs
time_col: Column name in the phenotype file representing time variable
y_col: Outcome variable column name
fixedEffects: Comma-separated list of fixed effects for LMM model after CTS (e.g., "Age,Sex,Education")
outpath: Full path to save the CTS outputs
outprefix: Prefix of output
Rscript /data/h_vmac/zhanm32/SPAREAD/CODE/scripts/CTS_test.R
"/data/h_vmac/zhanm32/SPAREAD/DATA/ADNI/CTS_ADNI.rds"
"/data/h_vmac/zhanm32/SPAREAD/DATA/ADNI/ADNI_EUR_snpweights_baseline"
"ID"
"interval_years"
"SPARE_AD"
"Sex,PHC_Age_T1_MUSE,Education"
"/data/h_vmac/zhanm32/SPAREAD/OUTPUT/longitudinalGWAS/"
"EUR_ADNI"
- Required packages: data.table, lme4, lmerTest, tidyverse, qqman
- Ensure that the phenotype file is cleaned before running this script:
- handle missingness yourself before running the R script
- make sure at least two time points per individuals
- make sure the pheno_file include FID and IID columns that matching the geno file
- Current code only support quantitative trait.
