Pure. Takes an already-parsed response body and never touches the network, so it is tested directly against a stored response.
Arguments
- body
A parsed MyGene
/queryresponse, the whole body includinghits.- symbol
The identifier that was queried, used to break the scoring tie described in
mygene_pick_hit()and as the fallback symbol.
Value
A one-row tibble with symbol, name, summary, entrez,
ensembl_gene, uniprot, hgnc, and type_of_gene. NULL when the body
carries no usable hit.
Examples
body <- list(hits = list(list(
symbol = "TP53",
name = "tumor protein p53",
entrezgene = "7157"
)))
mygene_parse_hits(body, "TP53")
#> # A tibble: 1 × 8
#> symbol name summary entrez ensembl_gene uniprot hgnc type_of_gene
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 TP53 tumor protein p… NA 7157 NA NA NA NA