MyNixOS website logo
Description

Access Open Target.

Interact seamlessly with Open Target GraphQL endpoint to query and retrieve tidy data tables, facilitating the analysis of gene, disease, drug, and genetic data. For more information about the Open Target API (<https://platform.opentargets.org/api>).

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)

CategoryFunctions
Drug queriesadverseEventsQuery, indicationsQuery, knownDrugsChemblQuery, mechanismsOfActionQuery, pharmacogenomicsChemblQuery
Gene / target queriescompGenomicsQuery, depMapQuery, geneOntologyQuery, geneticConstraintQuery, hallmarksQuery, interactionsQuery, knownDrugsGeneQuery, mousePhenotypesQuery, pathwaysQuery, pharmacogenomicsGeneQuery, safetyQuery
Gene + disease evidencechemblQuery, clinVarQuery, europePMCQuery, geneBurdenQuery, genomicsEnglandQuery, orphanetQuery, uniprotLiteratureQuery
Variant queriespharmacogenomicsVariantQuery, uniProtVariantsQuery, variantEffectPredictorQuery, variantEffectQuery, variantsQuery
Genetics / GWASgwasColocalisation, 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.

Metadata

Version

2.0.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows