exists_variant | R Documentation |
This function attempts to get a variant by its variant identifier and checks the response code. If the response code is 200 then the response has been successful, meaning that the variant does exist in the GWAS Catalog. If the response is 404 then the variant is not found in the Catalog database. Other errors are mapped to NA.
exists_variant(variant_id = NULL, verbose = FALSE, page_size = 20L)
variant_id |
A character vector of GWAS Catalog variant identifiers. |
verbose |
Whether the function should be verbose about the different queries or not. |
page_size |
An integer scalar indicating the
page
value to be used in the JSON requests, can be between |
A named logical vector, TRUE
indicates that the variant does
exist in the Catalog, FALSE
otherwise. NA
codes other types
of errors. The names of the vector are the variant identifiers passed as
variant_id
.
exists_variant('rs12345')
exists_variant('rs11235813')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.