fetch_gwas: Fetch significant GWAS associations for a GWAS Catalog trait...

View source: R/fetch_gwas.R

fetch_gwasR Documentation

Fetch significant GWAS associations for a GWAS Catalog trait identifier

Description

Retrieves significant GWAS Catalog associations directly from the EMBL-EBI GWAS Catalog REST API v2. The function resolves the supplied GWAS Catalog trait identifier to direct identifier queries and trait labels, retrieves paginated association records, filters by p-value, and returns a list used by run_gwas2crispr.

Usage

fetch_gwas(efo_id = "EFO_0001663", p_cut = 5e-08, verbose = interactive())

Arguments

efo_id

character. GWAS Catalog trait identifier. The argument name is retained for backward compatibility. Examples include EFO_0001663, MONDO_0007254, and NCIT_C4872 when supported by the GWAS Catalog API.

p_cut

numeric. P-value threshold for significance.

verbose

logical. If TRUE, prints a compact progress line.

Details

This function performs network calls to the GWAS Catalog REST API v2 and may be affected by service availability or rate limits. Selected supported disease and cancer trait identifier prefixes include EFO, MONDO, and NCIT. HP, Orphanet, and ORPHA are accepted for compatibility. GO identifiers are not supported as primary GWAS Catalog trait identifiers in gwas2crispr 0.1.5.

Value

A list with:

  • associations: tibble with association_id and pvalue.

  • risk_alleles: tibble mapping association_id to variant_id.

  • cache: internal tibble with variant metadata used downstream.

See Also

run_gwas2crispr

Examples


  a <- fetch_gwas("EFO_0000707", p_cut = 1e-6, verbose = FALSE)
  head(a$associations)



gwas2crispr documentation built on June 2, 2026, 9:06 a.m.