First CRAN release. Requires version 1.1.0 of the GPMap API.
search_gpmap(); fetch LD proxies, pleiotropy summaries
and duplicate traits; upload, fetch and delete your own GWAS.library(gpmapr) needs no network access. If the
installed gpmapr does not support the API version, the first request stops
with instructions to update the package.gpmap_available() reports whether the API can be reached.search_gpmap() for a variant now reports a per-row number of colocalising
studies and rare results (previously every row showed the first row's
counts), and gains an rsq column with each proxy's r-squared with the
searched variant. Variant searches no longer download the full list of
traits and genes.get_gwas(), and trait() / traits() with
a GUID) have the same tables and column names as other results.
study_extractions table holds the upload's study extractions and the
existing ones it colocalises with; upload_study_extractions is gone.study_extractions and coloc_groups have a source column
("upload" or "existing") and a gwas_upload_id (the upload the row comes
from; NA for existing rows). Upload and existing study extractions have
separate ids, so identify one by source and its id together. The
upload's own rows are source == "upload" & gwas_upload_id == result$trait$id.study_extraction_id for both sides, and coloc pairs use
study_extraction_a_id / study_extraction_b_id with source_a /
source_b, replacing the upload_* / existing_* id columns.trait_name), have data_type
"Phenotype" and no trait_id or study_id.compare_upload() lines up a GWAS upload with another trait (or a
compared upload): each one's effect in every coloc group they share, and the
coloc pairs between them.gene(), genes(), variant() and get_gwas() include the
trait name, data type, tissue and gene of both sides (trait_name_a,
trait_name_b, ...), so they no longer need joining to study_extractions.trait is now pipeline_id (the GPMap pipeline's id for the
trait, such as its OpenGWAS dataset id) and category is now
variable_type (continuous or categorical), in all_traits(), trait(),
traits() and GWAS uploads.$associations is no longer returned. With
include_associations = TRUE, each study's association at its variant
(beta, se, p, eaf, imputed) is added to coloc_groups,
rare_results and study_extractions. get_gwas() now adds them too, as
trait(<guid>) already did, and so does traits() for GUIDs.beta, se, p and
eaf set to NA.upload_gwas() takes variable_type in place of category, which still
works but is deprecated.traits() no longer errors when given a GWAS upload GUID alongside trait ids.ld_proxies() and ld_matrix() gain an rsq column. ld_matrix() returns
an empty table when none of the variants are a lead variant and its proxy.genes() and traits() drop empty elements, as gene() and trait() do,
and genes() no longer returns tissues.region(), gene(), trait(), variant() and their plural forms no longer
error with include_associations = TRUE when the API returns no
associations.