RapidoPGS (version 1.0.2)

gwascat.download: Retrieve GWAS summary datasets from GWAS catalog 'gwascat.download takes a PMID from the user and downloads the associated summary statistics datasets published in GWAS catalog

Description

This function, takes PUBMED ids as an input, searches at the GWAS catalog for harmonised datasets associated to that, interactively asking the user to choose if there are more than one, and fetches the dataset.

Usage

gwascat.download(ID, filenum = NULL, hm_only = TRUE)

Arguments

ID

a numeric. A PubMed ID (PMID) reference number from a GWAS paper.

filenum

a numeric. If multiple files are available, which one to choose? If NULL (DEFAULT), R will prompt an interactive prompt, asking for the number.

hm_only

a logical. Should GWAS catalog harmonised columns be retained?

Value

a data.table containing the dataset.

Details

If multiple files are available for the same study, R will prompt an interactive dialogue to select a specific file, by number. If you know the number and prefer to select it automatically, you can provide it using file argument.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
ds <- gwascat.download(29059683, hm_only = FALSE) # This should work: Michailidou dataset
wrongds <- gwascat.download(01223247236) # This shouldn't work: The Empress pub phone number
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab