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
(link: https://www.biorxiv.org/content/early/2017/10/03/045260)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.