Skip to contents

Takes an Ensembl gene id, not a symbol, because that is what the Open Targets target query accepts. Resolve a symbol first with mygene_gene() and read its ensembl_gene column.

Usage

opentargets_gene_diseases(ensembl_id, size = 20, ...)

Arguments

ensembl_id

An Ensembl gene id, for example "ENSG00000141510".

size

How many associations to ask for.

...

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

Value

A biohttp envelope whose data is the tibble described in opentargets_parse_diseases().

Details

Keeping the resolution out of this function is deliberate. A client that silently made a second call to a different service would make one failure look like the other's, and a MyGene outage would read as an Open Targets outage.

Examples

if (FALSE) { # \dontrun{
biohttp::body_or_null(opentargets_gene_diseases("ENSG00000141510"))
} # }