An R alternative to MetaXcan
for more details on metaxcan method refer to Metaxcan/Predixcan authors' repo (https://github.com/hakyimlab/MetaXcan)
library(devtools)
install_github("drveera/metaxcanr")
library(metaxcanr)
results <- metaxcan(gwas.file = <gwas.filename>, db.file = <dbfile.name>, snpcov.file = <snpcov.filename>)
wget https://github.com/drveera/metaxcanexample/raw/master/sample.db
wget https://raw.githubusercontent.com/drveera/metaxcanexample/master/sample.gwas.summary
wget https://github.com/drveera/metaxcanexample/raw/master/sample.snpcov
library(metaxcanr)
results <- metaxcan(gwas.file="sample.gwas.summary", db.file = "sample.db", snpcov.file="sample.snpcov")
The gwas data should have columns: SNP, A1, A2, BETA, SE
If OR, change that to BETA by taking log(OR)
Its very important the above columns should be there in the gwas file
- Barbeira, A. N. et al. Exploring the phenotypic consequences of tissue specific gene expression variation inferred from GWAS summary statistics. bioRxiv 045260 (2017). doi:10.1101/045260
(link: https://www.biorxiv.org/content/early/2017/10/03/045260)