Skip to contents

Pure.

Usage

variantvalidator_parse(body, submitted = NA_character_)

Arguments

body

A parsed VariantValidator response.

submitted

The HGVS string that was sent.

Value

A one-row tibble of resolved, submitted, normalized, gene, protein, chrom, pos, ref, alt, and warnings, where warnings is a list column. NULL when there is no record at all.

The response is keyed by the answer, not by a fixed name

VariantValidator returns an object whose key is the normalized variant, which is not known before the call. flag and metadata are the only fixed keys, so the record is found by removing those rather than by looking up a name. A parser expecting a fixed key finds nothing.

Examples

body <- list(
  flag = "gene_variant",
  metadata = list(),
  `NM_000546.6:c.215C>G` = list(gene_symbol = "TP53")
)
variantvalidator_parse(body, "NM_000546.6:c.215C>G")
#> # A tibble: 1 × 10
#>   resolved submitted   normalized gene  protein chrom   pos ref   alt   warnings
#>   <lgl>    <chr>       <chr>      <chr> <chr>   <chr> <int> <chr> <chr> <list>  
#> 1 TRUE     NM_000546.… NM_000546… TP53  NA      NA       NA NA    NA    <chr>