Pure. Rows come back in symbols order, one per input.
Value
A tibble of symbol, concept_id, interaction_count, and
source_url, one row per entry in symbols.
A real zero is not a miss
The distinction this parser exists to preserve. A gene DGIdb knows about with
no recorded interactions has interaction_count = 0: that is an answer, and
it means the gene is not currently druggable. A gene DGIdb has never heard of
has interaction_count = NA: that is an absence of evidence.
Collapsing the two would tell a caller that an unknown gene is known not to be druggable, which is a different and much stronger claim than the data supports.
Examples
body <- list(data = list(genes = list(nodes = list(
list(name = "NF1", conceptId = "hgnc:7765", interactions = list(list(), list()))
))))
dgidb_parse_genes(body, "NF1")
#> # A tibble: 1 × 4
#> symbol concept_id interaction_count source_url
#> <chr> <chr> <int> <chr>
#> 1 NF1 hgnc:7765 2 https://dgidb.org/genes/hgnc:7765