Skip to contents

Pure. Known variants at the residue.

Usage

protvar_parse_population(body)

Arguments

body

A parsed ProtVar /population response.

Value

A tibble of change and sources, where sources is a comma-separated list of distinct source names. NULL when there are no variants.

Sources are deduplicated

A variant carries one cross-reference per supporting record, so the same source name recurs many times: the TP53 175 fixture lists NCI-TCGA four times for a single change. Reporting them raw makes a single database look like corroboration from several.

Examples

body <- list(variants = list(list(
  alternativeSequence = "Cys",
  xrefs = list(list(name = "NCI-TCGA"), list(name = "NCI-TCGA"))
)))
protvar_parse_population(body)
#> # A tibble: 1 × 2
#>   change sources 
#>   <chr>  <chr>   
#> 1 Cys    NCI-TCGA