The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

CRAN status Downloads License: MIT

otargen

Tidy R interface to the Open Targets Platform GraphQL API.

Query genes, diseases, drugs, variants, and genetic evidence directly from R and receive analysis-ready tibbles — no manual JSON wrangling required.


Installation

CRAN (stable)

install.packages("otargen")

GitHub (development)

# install.packages("devtools")
devtools::install_github("amirfeizi/otargen")

Quick start

Every function takes a single identifier (gene, disease, drug, or variant) and returns a tidy tibble.

Drug safety & mechanisms (by ChEMBL ID)

library(otargen)

# Adverse events reported for imatinib
adverseEventsQuery(chemblId = "CHEMBL941")

# Mechanism of action for imatinib
mechanismsOfActionQuery(chemblId = "CHEMBL941")

# Drug indications with clinical stage info
indicationsQuery(chemblId = "CHEMBL941")

Gene-level queries (by Ensembl ID)

# Known drugs and clinical candidates targeting TP53
knownDrugsGeneQuery(ensgId = "ENSG00000141510")

# Cancer hallmarks for TP53
hallmarksQuery(ensgId = "ENSG00000141510")

# Protein-protein interactions for TP53
interactionsQuery(ensgId = "ENSG00000141510", size = 25)

# DepMap cancer cell-line essentiality for EGFR
depMapQuery(ensgId = "ENSG00000146648")

# Target safety liabilities for EGFR
safetyQuery(ensgId = "ENSG00000146648")

Gene + disease evidence (by Ensembl ID + EFO ID)

# ChEMBL evidence linking PARP1 to breast cancer
chemblQuery(ensemblId = "ENSG00000143799", efoId = "EFO_0000305")

# GWAS credible sets for PCSK9 and hyperlipidemia
gwasCredibleSetsQuery(ensemblId = "ENSG00000169174", efoId = "EFO_0004911")

# ClinVar evidence for BRCA1 and ovarian cancer
clinVarQuery(ensemblId = "ENSG00000012048", efoId = "EFO_0001075")

# Literature evidence from Europe PMC
europePMCQuery(ensemblId = "ENSG00000012048", efoId = "EFO_0001075")

Pharmacogenomics & variants

# Pharmacogenomics data for a drug
pharmacogenomicsChemblQuery(chemblId = "CHEMBL1016")

# UniProt variants
uniProtVariantsQuery(variantId = "4_1804392_G_A")

# Variant effect predictions
variantEffectPredictorQuery(variantId = "1_154453788_C_T")

Genetics & colocalisation

# Locus-to-gene predictions for a credible set
locus2GeneQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b")

# GWAS colocalisation analysis
gwasColocalisation(study_locus_id = "5a86bfd40d2ebecf6ce97bbe8a737512")

Available functions (35)

Category Functions
Drug queries adverseEventsQuery, indicationsQuery, knownDrugsChemblQuery, mechanismsOfActionQuery, pharmacogenomicsChemblQuery
Gene / target queries compGenomicsQuery, depMapQuery, geneOntologyQuery, geneticConstraintQuery, hallmarksQuery, interactionsQuery, knownDrugsGeneQuery, mousePhenotypesQuery, pathwaysQuery, pharmacogenomicsGeneQuery, safetyQuery
Gene + disease evidence chemblQuery, clinVarQuery, europePMCQuery, geneBurdenQuery, genomicsEnglandQuery, orphanetQuery, uniprotLiteratureQuery
Variant queries pharmacogenomicsVariantQuery, uniProtVariantsQuery, variantEffectPredictorQuery, variantEffectQuery, variantsQuery
Genetics / GWAS gwasColocalisation, gwasCredibleSet, gwasCredibleSetsQuery, locus2GeneQuery, overlapInfoForStudy, qtlCredibleSetsQuery, sharedTraitStudiesQuery

Full documentation: https://amirfeizi.github.io/otargen/


What’s new in 2.0.1

Bug fixes for HTTP 400 errors caused by upstream Open Targets API schema changes. Nine functions updated: chemblQuery, clinVarQuery, geneBurdenQuery, orphanetQuery, indicationsQuery, knownDrugsChemblQuery, knownDrugsGeneQuery, geneOntologyQuery, and interactionsQuery. See NEWS.md for details.


Citation

If you use otargen in your research, please cite:

Feizi A, Ray D (2023). otargen: an R package for accessing and visualizing Open Targets Genetics data. Bioinformatics, 39(7). https://doi.org/10.1093/bioinformatics/btad441


Contributing

Bug reports and feature requests: GitHub Issues

Contributions are welcome via pull requests on GitHub.


License

MIT

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.