Skip to contents

Pure. One row per requested id, in the order asked.

Usage

myvariant_parse_batch(body, ids)

Arguments

body

A parsed MyVariant batch response, a flat array.

ids

The MyVariant ids that were requested, in order.

Value

A tibble with one row per entry in ids, plus an id column.

notfound is an answer, not an error

MyVariant reports an unknown variant as HTTP 200 with notfound: true. That is the source saying it has nothing, which is different from the call failing. Such rows come back as NA rather than being dropped, so a caller zipping by position stays aligned.

Examples

body <- list(list(query = "chr17:g.7676154G>C", dbnsfp = list(
  genename = list("TP53"), cadd = list(raw_rankscore = 0.17)
)))
myvariant_parse_batch(body, "chr17:g.7676154G>C")
#> # 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     NA  0.17       NA            NA NA