Skip to contents

Free text is searched; something that already looks like an ontology id is looked up directly, which is both exact and cheaper. opentargets_is_id() is what decides.

Usage

opentargets_resolve_disease(term, limit = 5, ...)

Arguments

term

Free text, or an EFO/MONDO/HP/Orphanet id.

limit

How many candidates to return for a free-text search.

...

Passed to biohttp::post_json(), for example throttle.

Value

A biohttp envelope whose data is the tibble described in opentargets_parse_matches(), best match first.

Details

This is the resolve_disease that exists twice in the family, once in genescout/R/tools/disease_resolver.R and once in a sibling app.

References

Buniello et al. (2025). Open Targets Platform: facilitating therapeutic hypotheses building in drug discovery. Nucleic Acids Research 53(D1), D1467-D1475. doi:10.1093/nar/gkae1128

Service documentation: https://platform.opentargets.org/

Examples

# \donttest{
biohttp::body_or_null(opentargets_resolve_disease("neurofibromatosis type 1"))
#> # A tibble: 5 × 5
#>   id            name                                score description source_url
#>   <chr>         <chr>                               <dbl> <chr>       <chr>     
#> 1 MONDO_0018975 neurofibromatosis type 1            4668. A clinical… https://p…
#> 2 MONDO_0859763 mosaic neurofibromatosis type 1      654. NA          https://p…
#> 3 MONDO_0011035 neurofibromatosis-Noonan syndrome    641. A RASopath… https://p…
#> 4 MONDO_0021061 neurofibromatosis                    572. A heredita… https://p…
#> 5 MONDO_0018208 neurofibromatosis type 1 due to NF…  551. NA          https://p…
biohttp::body_or_null(opentargets_resolve_disease("MONDO:0018975"))
#> # A tibble: 1 × 5
#>   id            name                     score description            source_url
#>   <chr>         <chr>                    <dbl> <chr>                  <chr>     
#> 1 MONDO_0018975 neurofibromatosis type 1    NA A clinically heteroge… https://p…
# }