The goal of getSH4GWASCatalog is to generate a shell script for downloading summary statistics from GWAS Catalog https://www.ebi.ac.uk/gwas/home
You can install the development version of getSH4GWASCatalog like so:
library(devtools)
devtools::install_github("yangzhao98/getSH4GWASCatalog")
library(getSH4GWASCatalog)
- Find the accession number of a specific study, e.g., \code{accessionNum="GCST90002000"}
accessionNumber <- "GCST90002000"
- Get the url for downloading the unharmonised summary statistics
url <- getSH4GWASCatalog("GCST90002000")
- Write up a shell script, e.g., test.sh
curPath <- this.path::this.dir()
write.table(url,file=paste(curPath,"/donwloadUrl.sh",sep=""),
quote=FALSE,row.names=FALSE,col.names=FALSE)
- Process the text.sh for executing in terminal
dos2unix downloadUrl.sh | ./downloadUrl.sh
getHttpsFrom(url="https://pheweb.jp/downloads")[1:5]