get_trait_variants: Retrieve trait-related variants and summary statistics from...

View source: R/get_trait_variants.R

get_trait_variantsR Documentation

Retrieve trait-related variants and summary statistics from the GWAS catalog

Description

Returns a formatted data.frame of variants for a given trait, including summary statistics

Usage

get_trait_variants(
  trait,
  trait_list = NULL,
  risk_frequency = TRUE,
  mapped_gene = FALSE,
  ask_about_efo = TRUE
)

Arguments

trait

Expects a regular expression to find the trait of interest

trait_list

An object generated by init_gwas_dbs(). If NULL, init_gwas_dbs() will be run internally.

risk_frequency

If TRUE, also includes the frequency of the risk allele in the output.

mapped_gene

If TRUE, includes the mapped gene for each variant in the output.

ask_about_efo

If TRUE, requires dynamic user input to specify which EFO id should be used.

Value

A formatted data.frame containing all trait-related variants, including summary statistics.

Examples

MI_variants <- get_trait_variants('MI|myocardial infarction',ask_about_efo=FALSE)

vincent10kd/polygenic documentation built on Feb. 25, 2024, 10:17 a.m.