An enhanced R interface for querying the Open Targets Platform, providing user-friendly wrapper functions around the otargen package.
OpenTargetsR simplifies data retrieval from the Open Targets Platform by accepting human-readable gene symbols and disease names, automatically converting them to the required identifiers for API queries. This package provides a more intuitive interface compared to the original otargen package while maintaining full functionality.
- User-friendly input: Use HGNC gene symbols and disease names instead of complex identifiers
- Automatic ID resolution: Seamlessly converts gene symbols to Ensembl IDs and disease names to EFO/MONDO IDs
- Comprehensive coverage: Access all major Open Targets data types including:
- Gene-disease associations
- Drug information and mechanisms
- Genetic variant effects
- Pathway and ontology data
- Safety and pharmacogenomics information
- Consistent interface: All functions follow consistent naming and parameter conventions
- Rich documentation: Extensive examples and parameter descriptions for all functions
# Install from GitHub (once published)
# devtools::install_github("Zaoqu-Liu/OpenTargetsR")
# For now, install locally after downloading
# devtools::install_local("/path/to/OpenTargetsR")library(OpenTargetsR)
# Get ChEMBL evidence for PSEN1 and Alzheimer disease
chembl_data <- ChemblGeneDiseaseQuery("PSEN1", "Alzheimer disease")
# Get adverse events for aspirin
adverse_events <- DrugAdverseEventsQuery("aspirin")
# Get gene ontology annotations for THBS2
go_data <- GeneOntologyGeneQuery("THBS2")
# Get variant effect predictions
vep_data <- VariantEffectPredictorVariantQuery("4_1804392_G_A")ChemblGeneDiseaseQuery()- ChEMBL evidence dataEuropePMCGeneDiseaseQuery()- Literature evidenceGeneBurdenGeneDiseaseQuery()- Gene burden analysisGenomicsEnglandGeneDiseaseQuery()- Clinical genomics evidenceGWASCredibleSetsTargetDiseaseQuery()- GWAS credible setsOrphanetGeneDiseaseQuery()- Rare disease evidenceUniProtLiteratureGeneDiseaseQuery()- Protein literature evidence
ComparativeGenomicsGeneQuery()- Evolutionary conservationDepMapEssentialityGeneQuery()- Gene essentiality scoresGeneOntologyGeneQuery()- GO annotationsGeneticConstraintGeneQuery()- Constraint metricsHallmarkGeneQuery()- Cancer hallmarksInteractionsGeneQuery()- Protein interactionsKnownDrugsGeneQuery()- Targeting drugsMousePhenotypesGeneQuery()- Mouse model dataPathwaysGeneQuery()- Pathway annotationsGenePharmacogenomicsQuery()- PharmacogenomicsSafetyLiabilitiesGeneQuery()- Safety profiles
DrugAdverseEventsQuery()- Adverse eventsDrugIndicationsQuery()- Approved indicationsDrugKnownDrugsQuery()- Related compoundsDrugMechanismsOfActionQuery()- Mechanisms of actionDrugPharmacogenomicsQuery()- Genetic effects
VariantPharmacogenomicsQuery()- PGx associationsQTLCredibleSetsVariantQuery()- QTL dataUniProtVariantsVariantQuery()- Protein consequencesVariantEffectPredictorVariantQuery()- VEP annotationsVariantEffectVariantQuery()- General effects
SharedTraitStudiesDiseasesQuery()- Cross-trait genetics
get_chembl_id()- Resolve drug names to ChEMBL IDsget_trait_id()- Resolve disease names to EFO/MONDO IDs
# Comprehensive analysis of APOE and Alzheimer disease
gene <- "APOE"
disease <- "Alzheimer disease"
# Get multiple evidence types
chembl_evidence <- ChemblGeneDiseaseQuery(gene, disease)
literature_evidence <- EuropePMCGeneDiseaseQuery(gene, disease)
gwas_evidence <- GWASCredibleSetsTargetDiseaseQuery(gene, disease)
uniprot_evidence <- UniProtLiteratureGeneDiseaseQuery(gene, disease)# Analyze aspirin safety profile
drug <- "aspirin"
adverse_events <- DrugAdverseEventsQuery(drug)
mechanisms <- DrugMechanismsOfActionQuery(drug)
indications <- DrugIndicationsQuery(drug)
pharmacogenomics <- DrugPharmacogenomicsQuery(drug)# Comprehensive gene function analysis
gene <- "TP53"
go_annotations <- GeneOntologyGeneQuery(gene)
pathways <- PathwaysGeneQuery(gene)
interactions <- InteractionsGeneQuery(gene, size = 100)
hallmarks <- HallmarkGeneQuery(gene)
constraint <- GeneticConstraintGeneQuery(gene)
safety <- SafetyLiabilitiesGeneQuery(gene)- otargen: Core Open Targets API interface
- BioEnricher: Gene ID mapping
- dplyr, tibble, tidyr: Data manipulation
- httr, jsonlite: Web API access
- stringr, purrr, rlang: Utility functions
Zaoqu Liu (liuzaoqu@163.com)
MIT License
Please report issues and suggestions on the GitHub repository.