Skip to contents

Pure. Rows come back in symbols order, one per input.

Usage

pharos_parse_targets(body, symbols)

Arguments

body

A parsed Pharos GraphQL response body.

symbols

The gene symbols that were queried, in the order asked.

Value

A tibble of symbol, tdl, and source_url, one row per entry in symbols. tdl is one of Tclin, Tchem, Tbio, Tdark, or NA.

Details

A TDL Pharos does not recognise is reported as NA rather than passed through, so a caller never has to guess whether an unexpected string is a new level or a typo.

Examples

body <- list(data = list(targets = list(targets = list(
  list(sym = "NF1", tdl = "Tbio")
))))
pharos_parse_targets(body, "NF1")
#> # A tibble: 1 × 3
#>   symbol tdl   source_url                        
#>   <chr>  <chr> <chr>                             
#> 1 NF1    Tbio  https://pharos.nih.gov/targets/NF1