Package {gpmapr}


Title: Query the 'OpenGWAS' Genotype-Phenotype Map
Version: 1.0.0
Description: Client for the 'OpenGWAS' genotype-phenotype map ('GPMap') API https://gpmap.opengwas.io, which brings together colocalisation, rare variant and molecular QTL results across thousands of traits. Functions retrieve traits, genes, variants and genomic regions with their colocalising studies, associations, linkage disequilibrium and pleiotropy summaries, search the map by name or variant, and upload GWAS summary statistics for analysis against it.
License: MIT + file LICENSE
URL: https://github.com/MRCIEU/gpmapr, https://gpmap.opengwas.io
BugReports: https://github.com/MRCIEU/gpmapr/issues
Encoding: UTF-8
RoxygenNote: 7.3.2
Depends: R (≥ 4.1.0)
Imports: dplyr, httr, jsonlite, readr, stats, utils
Suggests: ggplot2, ggrepel, knitr, RColorBrewer, reshape2, rmarkdown, stringr, testthat (≥ 3.1.7), tidyr
Config/testthat/edition: 3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-10-23 16:25:34 UTC; wt23152
Author: Andrew Elmore ORCID iD [aut, cre], Gibran Hemani ORCID iD [aut]
Maintainer: Andrew Elmore <andrew.elmore@bristol.ac.uk>
Repository: CRAN
Date/Publication: 2026-11-07 15:50:07 UTC

gpmapr: Query the 'OpenGWAS' Genotype-Phenotype Map

Description

Client for the 'OpenGWAS' genotype-phenotype map ('GPMap') API https://gpmap.opengwas.io, which brings together colocalisation, rare variant and molecular QTL results across thousands of traits. Functions retrieve traits, genes, variants and genomic regions with their colocalising studies, associations, linkage disequilibrium and pleiotropy summaries, search the map by name or variant, and upload GWAS summary statistics for analysis against it.

Data model

Most functions return a list of dataframes describing the same few kinds of record:

Join coloc_groups$study_extraction_id (and the pair ids) to study_extractions$id. trait_id, study_id, variant_id, gene_id and ld_block_id refer to traits, studies, variants, genes and LD blocks. With include_associations = TRUE, each study's association at the row's variant (beta, se, p, eaf, imputed) is added to coloc_groups, rare_results and study_extractions.

Associations are not stored for every study at every variant. Every study with a study extraction in an LD block has an association at the variants of that block's coloc groups and rare results, but at a study extraction's own lead variant only that study does. Compare studies at the variant of their coloc group; see "Which associations are stored" in associations().

GWAS upload results (get_gwas(), or trait() with a GUID) have the same tables, mixing the upload's own rows with rows for studies already in the GPMap. Their source column ("upload" or "existing") says which: identify a study extraction by source and its id together, and find the upload's own rows with source == "upload" & gwas_upload_id == result$trait$id. compare_upload() lines an upload up with another trait.

Author(s)

Maintainer: Andrew Elmore andrew.elmore@bristol.ac.uk (ORCID)

Authors:

See Also

Useful links:


All genes

Description

Get all genes from the API

Usage

all_genes()

Value

A dataframe containing all genes with the following columns:

Examples


genes <- all_genes()
head(genes[, c("id", "gene", "chr")])


All traits

Description

Get all traits from the API

Usage

all_traits()

Value

A dataframe containing all traits with the following columns:

Examples


traits <- all_traits()
head(traits[, c("id", "trait_name")])


Get Associations by SNP ID and Study ID

Description

Get associations from the API by SNP id and study id

Usage

associations(variant_ids, study_ids)

Arguments

variant_ids

A vector of numeric values specifying the SNP IDs

study_ids

A vector of numeric values specifying the Study IDs

Value

A dataframe containing the associations

associations_dataframe

The associations dataframe contains information about which studies have association results. It has the following columns:

Associations of variants a study did not report are placeholders in the GPMap (beta 0, se 1, p 1), and are returned with beta, se, p and eaf set to NA (and imputed TRUE).

Which associations are stored

The GPMap does not store every study's association at every variant. It stores:

So other studies have no association at a study extraction's lead variant, unless that variant is also the variant of a coloc group or rare result somewhere in the map. To compare studies at a locus, use the variant of their coloc group, not the study extractions' lead variants. Asking associations() for a variant and study with nothing stored returns no row for that pair.

trait(include_full_associations = TRUE) returns the stored associations at the trait's coloc group, rare result and study extraction variants, for the trait's own studies and the studies that colocalise with it. Within those, the rules above apply: at its coloc groups' variants most of those studies have an association; at the lead variant of one of its study extractions that is in none of its coloc groups, usually only the trait's own study does.

Examples


associations(variant_ids = 80717, study_ids = c(926, 927))


Associations Dataframe Documentation

Description

Shared documentation for associations dataframe columns

Usage

associations_doc()

associations_dataframe

The associations dataframe contains information about which studies have association results. It has the following columns:

Associations of variants a study did not report are placeholders in the GPMap (beta 0, se 1, p 1), and are returned with beta, se, p and eaf set to NA (and imputed TRUE).

Which associations are stored

The GPMap does not store every study's association at every variant. It stores:

So other studies have no association at a study extraction's lead variant, unless that variant is also the variant of a coloc group or rare result somewhere in the map. To compare studies at a locus, use the variant of their coloc group, not the study extractions' lead variants. Asking associations() for a variant and study with nothing stored returns no row for that pair.

trait(include_full_associations = TRUE) returns the stored associations at the trait's coloc group, rare result and study extraction variants, for the trait's own studies and the studies that colocalise with it. Within those, the rules above apply: at its coloc groups' variants most of those studies have an association; at the lead variant of one of its study extractions that is in none of its coloc groups, usually only the trait's own study does.


Coloc Groups Dataframe Documentation

Description

Shared documentation for coloc_groups dataframe columns

Usage

coloc_groups_doc()

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:


Coloc Pairs Dataframe Documentation

Description

Shared documentation for coloc_pairs dataframe columns

Usage

coloc_pairs_doc()

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:


Compare a GWAS upload with a trait

Description

Line up a GWAS upload with another trait (or another uploaded GWAS it was compared with) at the places they colocalise.

For each coloc group containing both the upload and the trait, it gives the effect of each at the group's variant. Both effects are read from the upload's own result, where they are on the same alleles, so their signs can be compared directly.

Usage

compare_upload(upload, trait_id)

Arguments

upload

A GWAS upload result from get_gwas() or trait() with a GUID, fetched with include_associations = TRUE

trait_id

The id of a trait in the GPMap, or the GUID of another GWAS upload that upload was compared with (compare_with_upload_guids in upload_gwas())

Value

A list with two dataframes:

Both are empty when the upload and the trait don't colocalise.

Examples


upload <- get_gwas("7a289615-c1b4-91f3-3d97-887f60de9155", include_associations = TRUE)
comparison <- compare_upload(upload, 2527)
head(comparison$coloc_groups)


Delete a GWAS upload

Description

Permanently delete a GWAS upload and all of its results and files. The email must match the one used for the upload, and uploads that are still processing cannot be deleted.

Usage

delete_gwas(gwas_id, email)

Arguments

gwas_id

The GUID of the GWAS upload

email

The email address used for the upload

Value

Invisibly, a list containing the API response message

Examples

## Not run: 
# Permanently deletes an upload; needs the email address used to upload it.
delete_gwas("00000000-0000-0000-0000-000000000000", email = "you@example.com")

## End(Not run)

Gene

Description

A collection of studies that are associated with a particular gene.

Usage

gene(
  gene_id,
  include_associations = FALSE,
  include_coloc_pairs = FALSE,
  include_trans = TRUE,
  h4_threshold = 0.8
)

Arguments

gene_id

A numeric value specifying the gene id

include_associations

A logical value specifying whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups, rare_results and study_extractions, defaults to FALSE

include_coloc_pairs

A logical value specifying whether to include coloc pairs, defaults to FALSE

include_trans

A logical value specifying whether to include trans genetic effects, defaults to TRUE

h4_threshold

A numeric value specifying the h4 threshold for coloc pairs, defaults to 0.8

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

See below for details.

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

variants_dataframe

The variants dataframe contains variant information that is pulled from the Variant Effect Predictor (VEP) database. It has the following columns, along side many more columns from VEP:

Examples


wnt7b <- gene("WNT7B")
head(wnt7b$coloc_groups)


Gene Pleiotropies Dataframe Documentation

Description

Shared documentation for gene_pleiotropies dataframe columns

Usage

gene_pleiotropies_doc()

gene_pleiotropies_dataframe

The gene_pleiotropies dataframe contains information about which genes are pleiotropic. It has the following columns:


Genes

Description

Get specific genes from the API. The API returns collapsed/combined data for all requested genes.

Usage

genes(
  gene_ids,
  include_associations = FALSE,
  include_coloc_pairs = FALSE,
  include_trans = TRUE,
  h4_threshold = 0.8
)

Arguments

gene_ids

A vector of gene ids (1 or more)

include_associations

A logical value specifying whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups, rare_results and study_extractions, defaults to FALSE

include_coloc_pairs

A logical value specifying whether to include coloc pairs, defaults to FALSE

include_trans

A logical value specifying whether to include trans genetic effects, defaults to TRUE

h4_threshold

A numeric value specifying the h4 threshold for coloc pairs, defaults to 0.8

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

Examples


result <- genes(c("WNT7B", "WNT7A"))
result$genes


Genes in Region Dataframe Documentation

Description

Shared documentation for genes_in_region dataframe columns

Usage

genes_in_region_doc()

genes_in_region_dataframe

The genes_in_region dataframe contains information about which genes are in a region. It has the following columns:


Get All Gene Pleiotropies

Description

Get gene pleiotropy from the API by gene id

Usage

get_all_gene_pleiotropies()

Value

A list containing the gene pleiotropy

Examples


head(get_all_gene_pleiotropies())


Get All SNP Pleiotropies

Description

Get all SNP pleiotropies from the API

Usage

get_all_variant_pleiotropies()

Value

A list containing the SNP pleiotropies

Examples


head(get_all_variant_pleiotropies())


Get a GWAS from the API

Description

Get a GWAS from the API

Usage

get_gwas(gwas_id, include_associations = FALSE, include_summary_stats = FALSE)

Arguments

gwas_id

The ID of the GWAS

include_associations

Whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups and study_extractions

include_summary_stats

Whether to include summary statistics

Value

A list containing the GWAS information:

Upload and existing rows

The rows of study_extractions and coloc_groups (and each side of coloc_pairs) come either from an uploaded GWAS or from a study already in the GPMap, which are kept in separate databases with their own ids:

To line up the upload's effects with another trait's, see compare_upload().

Associations of variants a study did not report are placeholders in the GPMap, and are returned with beta, se, p and eaf set to NA (and imputed TRUE).

Examples


gwas <- get_gwas("7a289615-c1b4-91f3-3d97-887f60de9155")
gwas$trait$name


Is the GPMap API available?

Description

Checks whether the GPMap API can be reached and is a version this version of gpmapr supports, without raising an error. Useful before running code that needs the API, for example in examples, vignettes or tests.

Usage

gpmap_available()

Value

TRUE if the API's health endpoint responds and its version is supported, otherwise FALSE.

Examples

gpmap_available()

Get API Health

Description

Get the health status of the API

Usage

health_api()

Value

A list containing the health status

Examples


health_api()$status


LD Dataframe Documentation

Description

Shared documentation for ld dataframe columns

Usage

ld_doc()

ld_dataframe

The ld dataframe contains information about the LD matrix. It has the following columns:


LD Matrix

Description

Get the LD between the given variants from the API. The GPMap stores LD only between lead variants and their proxies, not between every pair of variants, so this returns the pairs among variant_ids where one is a lead variant and the other its proxy.

Usage

ld_matrix(variant_ids = c())

Arguments

variant_ids

A character string specifying the Variant ID. Variant IDs can be SNP IDs or variant IDs.

Value

A list containing lds, a dataframe of the stored LD pairs among variant_ids, with no rows when there are none

ld_dataframe

The ld dataframe contains information about the LD matrix. It has the following columns:

Examples


ld_matrix(c(5553693, 5553688))


LD Proxies

Description

Get LD proxies from the API by Variant ID

Usage

ld_proxies(variant_ids = c())

Arguments

variant_ids

A character string specifying the Variant ID. Variant IDs can be SNP IDs or variant IDs.

Value

A list containing the LD proxies

ld_dataframe

The ld dataframe contains information about the LD matrix. It has the following columns:

Examples


proxies <- ld_proxies(c(5553693, 5553694))
head(proxies$lds)


Rare Results Dataframe Documentation

Description

Shared documentation for rare_results dataframe columns

Usage

rare_results_doc()

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:


Region

Description

A collection of studies that are associated with a particular region.

Usage

region(
  region_id,
  include_associations = FALSE,
  include_coloc_pairs = FALSE,
  h4_threshold = 0.8
)

Arguments

region_id

A numeric value specifying the region id

include_associations

A logical value specifying whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups, rare_results and study_extractions, defaults to FALSE

include_coloc_pairs

A logical value specifying whether to include coloc pairs, defaults to FALSE

h4_threshold

A numeric value specifying the h4 threshold for coloc pairs, defaults to 0.8

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

See below for details.

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

genes_in_region_dataframe

The genes_in_region dataframe contains information about which genes are in a region. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

variants_dataframe

The variants dataframe contains variant information that is pulled from the Variant Effect Predictor (VEP) database. It has the following columns, along side many more columns from VEP:

Examples


result <- region(459)
head(result$coloc_groups)


Search the Genotype-Phenotype Map

Description

Search the GP Map for Traits, Genes or Variants

Usage

search_gpmap(search_text, rsquared_threshold = 0.8)

Arguments

search_text

A character string specifying the search text

rsquared_threshold

A numeric value specifying the rsquared threshold for proxy variants, defaults to 0.8

Details

After calling search, you can use call the subsequent data as described in the call column of the search results.

Value

A dataframe containing the search results, ordered by the number of colocalisation groups plus rare results (most first). For variant searches the searched variant is always first. Columns include:

Trait and gene results also carry the descriptive columns of the search options (e.g. aliases, sample_size, ancestry).

Examples


search_gpmap("haemoglobin")
search_gpmap("rs9939609")


Study Extractions Dataframe Documentation

Description

Shared documentation for study_extractions dataframe columns

Usage

study_extractions_doc()

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:


Summary Statistics Dataframe Documentation

Description

Shared documentation for summary_statistics dataframe columns

Usage

summary_statistics_doc()

summary_statistics_dataframe

The summary_statistics dataframe contains information about which studies have summary statistics. From the API, column names are typically uppercase (SNP, CHR, BP, EA, OA, EAF, Z, BETA, SE, P, LBF_1, etc.). It has the following columns (names may be upper or lower case depending on source):


Trait

Description

A collection of studies that are associated with a particular phenotype. A trait will include a common study and occasionally a rare study. When trait_id is a GUID (from GWAS upload), fetches the upload result instead, as get_gwas() does: see its documentation for how upload results mark the upload's own rows.

Usage

trait(
  trait_id,
  include_associations = FALSE,
  include_full_associations = FALSE,
  include_coloc_pairs = FALSE,
  h4_threshold = 0.8
)

Arguments

trait_id

A numeric value or GUID (from GWAS upload) specifying the trait id

include_associations

A logical value specifying whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups, rare_results and study_extractions, defaults to FALSE

include_full_associations

A logical value specifying whether to include the stored associations of the trait's studies and the studies that colocalise with it, at the trait's coloc group, rare result and study extraction variants (see "Which associations are stored"), defaults to FALSE

include_coloc_pairs

A logical value specifying whether to include coloc pairs, defaults to FALSE

h4_threshold

A numeric value specifying the h4 threshold for coloc pairs, defaults to 0.8

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

See below for details.

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

variants_dataframe

The variants dataframe contains variant information that is pulled from the Variant Effect Predictor (VEP) database. It has the following columns, along side many more columns from VEP:

Which associations are stored

The GPMap does not store every study's association at every variant. It stores:

So other studies have no association at a study extraction's lead variant, unless that variant is also the variant of a coloc group or rare result somewhere in the map. To compare studies at a locus, use the variant of their coloc group, not the study extractions' lead variants. Asking associations() for a variant and study with nothing stored returns no row for that pair.

trait(include_full_associations = TRUE) returns the stored associations at the trait's coloc group, rare result and study extraction variants, for the trait's own studies and the studies that colocalise with it. Within those, the rules above apply: at its coloc groups' variants most of those studies have an association; at the lead variant of one of its study extractions that is in none of its coloc groups, usually only the trait's own study does.

Examples


result <- trait(5020)
head(result$coloc_groups)


Trait duplicates

Description

Get all traits that have been marked as a duplicate of another trait

Usage

trait_duplicates()

Value

A dataframe containing the duplicated traits with the following columns:

Examples


head(trait_duplicates())


Traits

Description

Get specific traits from the API. The API returns collapsed/combined data for all requested traits. When a trait ID is a GUID (from GWAS upload), fetches the upload result instead.

Usage

traits(
  trait_ids,
  include_associations = FALSE,
  include_coloc_pairs = FALSE,
  h4_threshold = 0.8
)

Arguments

trait_ids

A vector of trait ids (numeric) or GUIDs (from GWAS upload)

include_associations

A logical value specifying whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups, rare_results and study_extractions, defaults to FALSE

include_coloc_pairs

A logical value specifying whether to include coloc pairs, defaults to FALSE. Coloc pairs are fetched from a separate endpoint per trait.

h4_threshold

A numeric value specifying the h4 threshold for coloc pairs, defaults to 0.8

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

Examples


result <- traits(c(4405, 4872))
result$traits


Upload a GWAS to the API

Description

Upload a GWAS to the API. Column names are specified with the ⁠*_col⁠ arguments, e.g. chr_col = "chr". chr_col, bp_col, ea_col, oa_col and p_col are required, along with either beta_col and se_col, or or_col, or_lb_col and or_ub_col.

Usage

upload_gwas(
  file,
  name,
  p_value_threshold = 5e-08,
  column_names = NULL,
  email = NA,
  variable_type = "continuous",
  is_published = FALSE,
  doi = NA,
  should_be_added = FALSE,
  ancestry = "EUR",
  sample_size = NA,
  reference_build = "GRCh38",
  compare_with_upload_guids = NA,
  chr_col = NULL,
  bp_col = NULL,
  ea_col = NULL,
  oa_col = NULL,
  p_col = NULL,
  eaf_col = NULL,
  beta_col = NULL,
  se_col = NULL,
  or_col = NULL,
  or_lb_col = NULL,
  or_ub_col = NULL,
  snp_col = NULL,
  rsid_col = NULL,
  category = NULL
)

Arguments

file

The path to the GWAS file, maximum size is 1GB

name

The name of the GWAS

p_value_threshold

The p-value threshold for the GWAS

column_names

Deprecated, use the ⁠*_col⁠ arguments instead. A named list of column names in the format of: list(CHR = "chr", BP = "pos"...). Accepted names are SNP, RSID, CHR, BP, EA, OA, P, EAF, BETA, SE, OR, OR_LB (or LB) and OR_UB (or UB).

email

The email of the user

variable_type

The type of variable the GWAS is of. Only "continuous" and "categorical" are accepted.

is_published

Whether the GWAS is published

doi

The DOI of the GWAS

should_be_added

Whether the GWAS should be added to the API

ancestry

The ancestry of the GWAS. Currently only "EUR" is accepted.

sample_size

The sample size of the GWAS

reference_build

The reference build of the GWAS. Only "GRCh37" and "GRCh38" are accepted.

compare_with_upload_guids

A vector of GUIDs of uploads to compare with

chr_col

The name of the chromosome column (required)

bp_col

The name of the base pair position column (required)

ea_col

The name of the effect allele column (required)

oa_col

The name of the other allele column (required)

p_col

The name of the p-value column (required)

eaf_col

The name of the effect allele frequency column (optional)

beta_col

The name of the beta column (required with se_col, unless using odds ratios)

se_col

The name of the standard error column (required with beta_col, unless using odds ratios)

or_col

The name of the odds ratio column (required with or_lb_col and or_ub_col, unless using beta)

or_lb_col

The name of the odds ratio lower confidence bound column

or_ub_col

The name of the odds ratio upper confidence bound column

snp_col

The name of the SNP identifier column (optional)

rsid_col

The name of the rsID column (optional)

category

Deprecated, use variable_type instead.

Value

A list containing the GWAS information, including the guid used to fetch results

Examples

## Not run: 
# Uploads summary statistics to the GPMap server; needs an email address.
result <- upload_gwas(
  "my_gwas.tsv", name = "My GWAS", email = "you@example.com", sample_size = 10000,
  chr_col = "chr", bp_col = "pos", ea_col = "ea", oa_col = "oa",
  p_col = "p", beta_col = "beta", se_col = "se"
)

## End(Not run)

Variant

Description

A collection of studies that are associated with a particular variant.

Usage

variant(
  variant_id,
  include_coloc_pairs = FALSE,
  h4_threshold = 0.8,
  include_summary_stats = FALSE
)

Arguments

variant_id

A character string specifying the SNP ID

include_coloc_pairs

A logical value specifying whether to include coloc pairs

h4_threshold

A numeric value specifying the cutoff for included coloc pairs, defaults to 0.8. Only used if include_coloc_pairs is TRUE.

include_summary_stats

A logical value specifying whether to include summary stats

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

summary_statistics_dataframe

The summary_statistics dataframe contains information about which studies have summary statistics. From the API, column names are typically uppercase (SNP, CHR, BP, EA, OA, EAF, Z, BETA, SE, P, LBF_1, etc.). It has the following columns (names may be upper or lower case depending on source):

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

Examples


result <- variant(5553693)
head(result$coloc_groups)


SNP Pleiotropies Dataframe Documentation

Description

Shared documentation for variant_pleiotropies dataframe columns

Usage

variant_pleiotropies_doc()

variant_pleiotropies_dataframe

The variant_pleiotropies dataframe contains information about which SNPs are pleiotropic. It has the following columns:


Variants

Description

Get specific variants from the API. The API accepts variant identifiers (variant_ids, rsids, or strings) and returns collapsed/combined data. The API distinguishes between identifier types automatically. Max 10 variants when expand=TRUE.

Usage

variants(
  variants,
  expand = FALSE,
  include_associations = FALSE,
  include_coloc_pairs = FALSE,
  h4_threshold = 0.8
)

Arguments

variants

A vector of variant identifiers (variant_ids, rsids, or strings)

expand

Logical. FALSE (default) returns minimal data. TRUE returns full VariantResponse (max 10)

include_associations

Logical. Whether to add each study's association at its variant (beta, se, p, eaf, imputed) to the coloc_groups, rare_results and study_extractions. Only when expand=TRUE

include_coloc_pairs

Logical. Whether to include coloc pairs. Only when expand=TRUE

h4_threshold

Numeric. H4 threshold for coloc pairs, defaults to 0.8

Details

The dataframes returned by this function are as follows:

Value

A list which contains the following elements:

coloc_groups_dataframe

The coloc_groups dataframe contains information about which studies have coloc results. It has the following columns:

study_extractions_dataframe

The study_extractions dataframe contains information about which studies have coloc results. It has the following columns:

rare_results_dataframe

The rare_results dataframe contains information about which studies have coloc results. It has the following columns:

summary_statistics_dataframe

The summary_statistics dataframe contains information about which studies have summary statistics. From the API, column names are typically uppercase (SNP, CHR, BP, EA, OA, EAF, Z, BETA, SE, P, LBF_1, etc.). It has the following columns (names may be upper or lower case depending on source):

coloc_pairs_dataframe

The coloc_pairs dataframe contains information about which studies have coloc pairs. It has the following columns:

Examples


result <- variants(c(5553693, 5553694))
result$variants


Variants Dataframe Documentation

Description

Shared documentation for variants dataframe columns

Usage

variants_doc()

variants_dataframe

The variants dataframe contains variant information that is pulled from the Variant Effect Predictor (VEP) database. It has the following columns, along side many more columns from VEP: