Skip to contents

Annotate many variants in one request

Usage

myvariant_variants(ids, assembly = "hg38", fields = MYVARIANT_FIELDS, ...)

Arguments

ids

MyVariant ids. Build them with myvariant_id().

assembly

The genome assembly. Changing this from "hg38" only makes sense for genuinely GRCh37 coordinates.

fields

The MyVariant fields to request.

...

Passed to biohttp::post_json(), for example throttle.

Value

A biohttp envelope whose data is a tibble with one row per entry in ids, in the same order. See myvariant_parse_batch().

assembly is not optional

assembly = "hg38" is always sent. Without it MyVariant answers 200 with notfound for every GRCh38 variant, so a whole cohort disappears with no error anywhere. There is no way to omit it through this function, and that is deliberate.

References

Xin et al. (2016). High-performance web services for querying gene and variant annotation. Genome Biology 17, 91. doi:10.1186/s13059-016-0953-9

Service documentation: https://myvariant.info/

Examples

# \donttest{
ids <- myvariant_id("17", 7676154, "G", "C")
biohttp::body_or_null(myvariant_variants(ids))
#> # A tibble: 1 × 7
#>   id                 gene  revel  cadd clinpred alphamissense clinvar_sig
#>   <chr>              <chr> <dbl> <dbl>    <dbl>         <dbl> <chr>      
#> 1 chr17:g.7676154G>C TP53  0.688 0.170  0.00078         0.132 Benign     
# }