- Added
targetLiability(), a convenience wrapper that combinesgeneticConstraintQuery(),safetyQuery()and (optionally)depMapQuery()into a single target-liability score (0-1) with a written rationale and recommendation, flagging genes that look risky for full inhibition versus those that may tolerate a partial or tissue-restricted approach (requested in issue #16).
gwasColocalisation(): fixed a "column doesn't exist" error that occurred when a study locus returned a single colocalisation row. Results are now extracted via nested access instead of relying on flattened column names, which works for one or many rows.
- Added five built-in plotting functions for visualizing query outputs:
plot_adverse_events(): Lollipop chart of adverse events ranked by log-likelihood ratio.plot_interactions(): Circular network graph of protein interaction partners.plot_l2g(): Horizontal bar chart of locus-to-gene prediction scores.plot_colocalisation(): Scatter plot of H4 posterior vs colocalising variant count.plot_indications(): Bar chart of drug indications colored by clinical trial stage.
- Added
ggplot2as a package dependency.
- Fixed HTTP 400 errors caused by Open Targets Platform API schema changes (renamed/removed fields):
chemblQuery(): Removed deprecatedvariantEffect,clinicalStatus; renamedclinicalPhasetoclinicalStage,studyStopReasontotrialWhyStopped,studyStopReasonCategoriestotrialStopReasonCategories.clinVarQuery(): Removed deprecatedvariantEffectfrom Evidence query.geneBurdenQuery(): Removed deprecatedvariantEffectfrom Evidence query.orphanetQuery(): Removed deprecatedvariantEffectfrom Evidence query.indicationsQuery(): RenamedmaxPhaseForIndicationtomaxClinicalStage; replacedreferenceswithclinicalReports.knownDrugsChemblQuery(): Replaced removedknownDrugsfield onDrugtype withindications+clinicalReports.knownDrugsGeneQuery(): Replaced removedknownDrugsfield onTargettype withdrugAndClinicalCandidates.geneOntologyQuery(): RenamednametolabelonGeneOntologyTermtype.interactionsQuery(): ChangedsourceDatabaseparameter type fromStringtoInteractionSourceEnum; fixed error whensourceDatabaseis NULL (the default) by omitting it from the GraphQL variables.
Following Open Targets' announcement, Open Targets Genetics has been officially merged into the Open Targets Platform API. Consequently, otargen 2.0.0 represents a complete overhaul of the package’s functionality to support this unified API endpoint and schema.
- 🔁 Unified API Integration: Full migration from the deprecated Open Targets Genetics GraphQL API to the new Platform GraphQL API.
- 🔍 Expanded Query Support: Includes all major data types now available in the merged schema.
- 📘 Updated Documentation: All help files and vignettes have been rewritten to reflect new function usage.
- 📄 New Example Articles: Practical use cases demonstrating the new API queries.
- Deprecation Notice: Many query functions from version 1.1.5 are now deprecated but retained for backward compatibility where possible.
We highly recommend upgrading to otargen 2.0.0 for the best experience with the latest Open Targets Platform API.
- chemblQuery(): This function queries the Open Targets GraphQL API to retrieve ChEMBL data for a specified gene and disease, including evidence from the ChEMBL datasource.
- clinvarQuery(): This function queries the Open Targets GraphQL API to retrieve ClinVar data for a specified gene and disease, including evidence from the NCBI datasource.
- knownDrugsQuery(): This function queries the Open Targets GraphQL API to retrieve known drugs data for a specified gene.
- mousePhenotypesQuery(): This function queries the Open Targets GraphQL API to retrieve mouse phenotypes data for a specified gene.
- compGenomicsQuery() This function queries the Open Targets GraphQL API to retrieve comparative genomics data for a specified gene.
- Fixed several inconsistencies between parameters naming in the functions used in the examples article and the main function in the package.
- Streamline the examples description to be short and organized.
- Added additional plotting case for example 7 for the additional parameters that has been added in the current version to the
plot_l2gfunction.
- Fixed and issue with the
plot_l2g()function for the cases when thediseaseparameter were not selected. The previous function were plotting only top disease for one gene. The function now updated with two more parameters to expand theplot_l2g()functionality for plotting disease agnostic scenario. These two parameters are:
-
top_n_disease(default:1): Determines the number of top diseases to plot for each gene, ranked by L2G score. Increase this value to include more diseases in the analysis. Use in conjunction with being disease-agnostic to dynamically select the top diseases for each gene. -
l2g_cutoff(default:0.5): Sets the minimum L2G score threshold for diseases to be considered in the plot. Increasing this value can help reduce plot clutter by focusing on higher-confidence associations.
- Fixed an issue in the
variantInfofunction where the wrong variable (result) was being referenced, leading to an 'object not found' error. ModifiedvariantInfo()to correctly process the API response data. Additionally, added checks to ensure that the results are notNULLbefore processing, which improves the function's robustness and error handling.
- Improved the
test plot_l2g.Rtest case to provide better error handling and diagnostic information. The test now uses atryCatchblock to gracefully handle errors and explicitly fail with a clear message, enhancing the reliability and maintainability of the test suite.
- Fixed the issue with
genesForVariant()on giving an error when usingrsIdvariants.
- Updated all functions to include connection timeout checks. Added try-catch blocks to handle timeouts during API requests gracefully, ensuring that the functions provide informative error messages and fail safely in case of network or connection issues.
- This is the first release of otargen.