knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The hapiverse (human API universe) is a metapackage whose goal is embrace a collection of R packages that work together to provide programmatic access to the European Bioinformatics Institute (EMBL-EBI) REST API services, namely those related with human genetic variation and phenotypes. Currently, the hapiverse provides easy installation and loading of two packages:
You can install the current version of hapiverse with:
# install.packages("remotes") remotes::install_github("maialab/hapiverse")
After installing hapiverse, you also get gwasrapidd and quincunx installed.
To load and attach concomitantly gwasrapidd and quincunx simply run:
library(hapiverse)
During the attaching of hapiverse, you will get notified of those functions that have clashing names. Behind the scenes we use the package conflicted to avoid misuse of functions with the same name. In these cases you will be required to choose one of the functions by using the double colon operator (::
).
As an example, both gwasrapidd and quincunx provide a function named get_traits()
. If you try to use it directly, R will throw an error and ask that you specify either gwasrapidd::get_traits()
or quincunx::get_traits()
.
Trying to use get_traits()
will return an error because of the ambiguity arising from the two definitions:
get_traits()
Note that you can use the function hapiverse_conflicts()
at any time to revise the list of clashing function names:
hapiverse_conflicts()
If you specify the package name with the double colon operator (::
), then the ambiguity is resolved and execution proceeds normally. Using get_traits()
from gwasrapidd:
gwasrapidd::get_traits(efo_id = 'EFO_0005537')
Or using get_traits()
provided by quincunx:
quincunx::get_traits(efo_id = 'EFO_0005537')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.