create_gwas: Create a gwaswloc object

View source: R/gwas.R

create_gwasR Documentation

Create a gwaswloc object

Description

Create a gwaswloc object by reading the file at "http://www.ebi.ac.uk/gwas/api/search/downloads/alternative" or by reading a local gwas catalog (if "vargen_dir" specified as a parameter). If "vargen_dir" contains more than one gwas catalog, the user will be prompted to choose one. The function will use the filename to determine the extract date, please have it in the format: \[filename\]_r**YYYYY**-**MM**-**DD**.tsv eg: "gwas_catalog_v1.0.2-associations_e96_r2019-07-30.tsv"

Usage

create_gwas(vargen_dir, verbose = FALSE, timeout = 1000)

Arguments

vargen_dir

(optional) a path to vargen data directory, created during vargen_install. If not specified, the gwas object will be created by reading the file at "http://www.ebi.ac.uk/gwas/api/search/downloads/alternative". If specified, this function will look for files that begin with "gwas_catalog". If more than one is found, the user will have to choose one via a text menu

verbose

if true, will print progress information (default: FALSE)

timeout

the timeout set in options(), reading/downloading files online might fail with the default timeout of 60 seconds.

Value

a gwaswloc object containing the information from the gwas catalog.

Examples

gwas_cat <- create_gwas()

MCorentin/vargen documentation built on Feb. 6, 2024, 2:32 p.m.