| Title: | Access Open Target |
|---|---|
| Description: | 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>). |
| Authors: | Amir Feizi [aut, cre] |
| Maintainer: | Amir Feizi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 2.1.0 |
| Built: | 2026-10-14 10:53:52 UTC |
| Source: | https://github.com/amirfeizi/otargen |
This function queries the Open Targets GraphQL API to retrieve adverse events data for a specified drug.
adverseEventsQuery(chemblId, index = 0, size = 10)adverseEventsQuery(chemblId, index = 0, size = 10)
chemblId |
Character: ChEMBL ID of the target drug (e.g., "CHEMBL1016"). |
index |
Integer: Page index for pagination (default: 0). |
size |
Integer: Number of records to retrieve (default: 10). |
Returns a tibble containing adverse events data for the specified drug.
## Not run: result <- adverseEventsQuery(chemblId = "CHEMBL1016", size = 10) result <- adverseEventsQuery(chemblId = "CHEMBL1016", index = 0, size = 10) ## End(Not run)## Not run: result <- adverseEventsQuery(chemblId = "CHEMBL1016", size = 10) result <- adverseEventsQuery(chemblId = "CHEMBL1016", index = 0, size = 10) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve ChEMBL evidence data for a specified gene and disease.
chemblQuery(ensemblId, efoId, cursor = NULL, size = 10)chemblQuery(ensemblId, efoId, cursor = NULL, size = 10)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000080815"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
cursor |
Character: Cursor for pagination (default: NULL). |
size |
Integer: Number of records to retrieve (default: 10). |
Returns a tibble containing ChEMBL evidence data for the specified gene and disease.
## Not run: result <- chemblQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 10) result <- chemblQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", cursor = NULL, size = 10) ## End(Not run)## Not run: result <- chemblQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 10) result <- chemblQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", cursor = NULL, size = 10) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve ClinVar evidence data for a specified gene and disease.
clinVarQuery(ensemblId, efoId, cursor = NULL, size = 10)clinVarQuery(ensemblId, efoId, cursor = NULL, size = 10)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000080815"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
cursor |
Character: Cursor for pagination (default: NULL). |
size |
Integer: Number of records to retrieve (default: 10). |
Returns a tibble containing ClinVar evidence data for the specified gene and disease.
## Not run: result <- clinVarQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 10) result <- clinVarQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", cursor = NULL, size = 10) ## End(Not run)## Not run: result <- clinVarQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 10) result <- clinVarQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", cursor = NULL, size = 10) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve comparative genomics data for a specified gene.
compGenomicsQuery(ensemblId)compGenomicsQuery(ensemblId)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000169174). |
Returns a data frame containing comparative genomics data for the specified gene.
## Not run: result <- compGenomicsQuery(ensemblId = "ENSG00000169174") ## End(Not run)## Not run: result <- compGenomicsQuery(ensemblId = "ENSG00000169174") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve DepMap essentiality data for a specified gene.
depMapQuery(ensgId)depMapQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000141510). |
Returns a tibble containing DepMap essentiality data for the specified gene.
## Not run: result <- depMapQuery(ensgId = "ENSG00000141510") ## End(Not run)## Not run: result <- depMapQuery(ensgId = "ENSG00000141510") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve Europe PMC evidence data for a specified gene and disease.
europePMCQuery(ensemblId, efoId, cursor = NULL, size = 50)europePMCQuery(ensemblId, efoId, cursor = NULL, size = 50)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000080815"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
cursor |
Character: Cursor for pagination (default: NULL). |
size |
Integer: Number of records to retrieve (default: 50). |
Returns a tibble containing Europe PMC evidence data for the specified gene and disease.
## Not run: result <- europePMCQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 50) result <- europePMCQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", cursor = NULL, size = 50) ## End(Not run)## Not run: result <- europePMCQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 50) result <- europePMCQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", cursor = NULL, size = 50) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve gene burden evidence data for a specified gene and disease.
geneBurdenQuery(ensemblId, efoId, size = 3500)geneBurdenQuery(ensemblId, efoId, size = 3500)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000137642"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
size |
Integer: Number of records to retrieve (default: 3500). |
Returns a tibble containing gene burden evidence data for the specified gene and disease.
## Not run: result <- geneBurdenQuery(ensemblId = "ENSG00000137642", efoId = "MONDO_0004975", size = 3500) ## End(Not run)## Not run: result <- geneBurdenQuery(ensemblId = "ENSG00000137642", efoId = "MONDO_0004975", size = 3500) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve gene ontology data for a specified gene.
geneOntologyQuery(ensgId)geneOntologyQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000141510). |
Returns a tibble containing gene ontology data for the specified gene.
## Not run: result <- geneOntologyQuery(ensgId = "ENSG00000141510") ## End(Not run)## Not run: result <- geneOntologyQuery(ensgId = "ENSG00000141510") ## End(Not run)
This function queries the Open Targets Platform GraphQL API to retrieve genetic constraint data for a specified gene, such as pLI or LOEUF scores.
geneticConstraintQuery(ensgId)geneticConstraintQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000141510"). |
Returns a tibble containing genetic constraint data for the specified gene.
## Not run: result <- geneticConstraintQuery(ensgId = "ENSG00000141510") ## End(Not run)## Not run: result <- geneticConstraintQuery(ensgId = "ENSG00000141510") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve Genomics England evidence data for a specified gene and disease.
genomicsEnglandQuery(ensemblId, efoId, size = 3500)genomicsEnglandQuery(ensemblId, efoId, size = 3500)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000080815"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
size |
Integer: Number of records to retrieve (default: 3500). |
Returns a tibble containing Genomics England evidence data for the specified gene and disease.
## Not run: result <- genomicsEnglandQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 3500) ## End(Not run)## Not run: result <- genomicsEnglandQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 3500) ## End(Not run)
This function retrieves colocalisation data for a specific study locus from a GWAS study with other GWAS studies. It returns a data frame of the studies that colocalise with the input study locus, including details on the study, reported trait, index variant, and calculated colocalisation method outputs.
gwasColocalisation(study_locus_id, size = 500, index = 0)gwasColocalisation(study_locus_id, size = 500, index = 0)
study_locus_id |
Character: Open Target Genetics generated ID for the study locus (e.g., "5a86bfd40d2ebecf6ce97bbe8a737512"). |
size |
Integer: Number of rows to fetch per page. Default: 500. |
index |
Integer: Page index for pagination. Default: 0. |
Returns a data frame of the studies that colocalise with the input study locus. The table consists of the following data structure:
study.studyId: Character vector. Study identifier.
study.traitReported: Character vector. Reported trait associated with the colocalisation.
study.projectId: Character vector. Project identifier for the study.
study.publicationFirstAuthor: Character vector. First author of the publication.
indexVariant.id: Character vector. Index variant identifier.
indexVariant.position: Integer vector. Index variant position.
indexVariant.chromosome: Character vector. Index variant chromosome.
indexVariant.referenceAllele: Character vector. Reference allele of the variant.
indexVariant.alternateAllele: Character vector. Alternate allele of the variant.
pValueMantissa: Numeric vector. Mantissa of the p-value for the colocalisation.
pValueExponent: Integer vector. Exponent of the p-value for the colocalisation.
numberColocalisingVariants: Integer vector. Number of colocalising variants.
colocalisationMethod: Character vector. Method used for colocalisation analysis.
h3: Numeric vector. H3 value associated with the colocalisation.
h4: Numeric vector. H4 value associated with the colocalisation.
clpp: Numeric vector. Colocalisation posterior probability.
betaRatioSignAverage: Numeric vector. Average sign of the beta ratio.
Giambartolomei, Claudia et al. “Bayesian test for colocalisation between pairs of genetic association studies using summary statistics.” PLoS genetics vol. 10,5 e1004383. 15 May. 2014, doi:10.1371/journal.pgen.1004383
## Not run: colocalisation_data <- gwasColocalisation(study_locus_id = "5a86bfd40d2ebecf6ce97bbe8a737512", size = 500, index = 0) ## End(Not run)## Not run: colocalisation_data <- gwasColocalisation(study_locus_id = "5a86bfd40d2ebecf6ce97bbe8a737512", size = 500, index = 0) ## End(Not run)
Provided with a study ID and a lead variant ID, this function returns a data frame consisting of all the associated credible set tag variants with the corresponding statistical data.
gwasCredibleSet(study_id, variant_id)gwasCredibleSet(study_id, variant_id)
study_id |
Character: Study ID(s) generated by Open Targets (e.g GCST90002357). |
variant_id |
Character: generated ID for variants by Open Targets (e.g. 1_154119580_C_A) or rsId (rs2494663). |
Returns a data frame of results from the credible set of variants for a specific lead variant with the following columns:
tagVariant.id: Data frame. A table of IDs of the tag variant.
tagVariant.rsId: Character vector. rsID of the tag variant.
beta: Numeric. Beta value.
postProb: Numeric. Posterior probability.
pval: Numeric. P-value.
se: Numeric. Standard error.
MultisignalMethod: Character vector. Multisignal method.
logABF: Numeric. Logarithm of approximate Bayes factor.
is95: Logical. Indicates if the variant has a 95
is99: Logical. Indicates if the variant has a 99
## Not run: result <- gwasCredibleSet(study_id="GCST90002357", variant_id="1_154119580_C_A") result <- gwasCredibleSet(study_id="GCST90002357", variant_id="rs2494663") ## End(Not run)## Not run: result <- gwasCredibleSet(study_id="GCST90002357", variant_id="1_154119580_C_A") result <- gwasCredibleSet(study_id="GCST90002357", variant_id="rs2494663") ## End(Not run)
This function queries the Open Targets Platform GraphQL API to retrieve GWAS credible sets evidence data for a specified target gene and disease.
gwasCredibleSetsQuery(ensemblId, efoId, size = 500)gwasCredibleSetsQuery(ensemblId, efoId, size = 500)
ensemblId |
Character. Ensembl gene ID, e.g., "ENSG00000169174". |
efoId |
Character. EFO disease ID, e.g., "EFO_0004911". |
size |
Integer. Number of rows to fetch. Default: 500. |
A tibble with credible set evidence or NULL if no data found.
## Not run: result <- gwasCredibleSetsQuery( ensemblId = "ENSG00000169174", efoId = "EFO_0004911", size = 5 ) print(result) ## End(Not run)## Not run: result <- gwasCredibleSetsQuery( ensemblId = "ENSG00000169174", efoId = "EFO_0004911", size = 5 ) print(result) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve cancer hallmarks data for a specified gene.
hallmarksQuery(ensgId)hallmarksQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000141510). |
Returns a tibble containing cancer hallmarks data for the specified gene.
## Not run: result <- hallmarksQuery(ensgId = "ENSG00000141510") ## End(Not run)## Not run: result <- hallmarksQuery(ensgId = "ENSG00000141510") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve indications data for a specified drug.
indicationsQuery(chemblId)indicationsQuery(chemblId)
chemblId |
Character: ChEMBL ID of the target drug (e.g., "CHEMBL1016"). |
Returns a tibble containing indications data for the specified drug.
## Not run: result <- indicationsQuery(chemblId = "CHEMBL1016") ## End(Not run)## Not run: result <- indicationsQuery(chemblId = "CHEMBL1016") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve molecular interaction data for a specified gene.
interactionsQuery(ensgId, sourceDatabase = NULL, index = 0, size = 10)interactionsQuery(ensgId, sourceDatabase = NULL, index = 0, size = 10)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000141510). |
sourceDatabase |
Character: Source database for interactions (e.g., "intact") (default: NULL). |
index |
Integer: Page index for pagination (default: 0). |
size |
Integer: Number of records to retrieve (default: 10). |
Returns a tibble containing interactions data for the specified gene.
## Not run: result <- interactionsQuery(ensgId = "ENSG00000141510", sourceDatabase = "intact", size = 10) result <- interactionsQuery(ensgId = "ENSG00000141510", sourceDatabase = "intact", index = 0, size = 10) ## End(Not run)## Not run: result <- interactionsQuery(ensgId = "ENSG00000141510", sourceDatabase = "intact", size = 10) result <- interactionsQuery(ensgId = "ENSG00000141510", sourceDatabase = "intact", index = 0, size = 10) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve indications and clinical report data for a specified drug.
knownDrugsChemblQuery(chemblId)knownDrugsChemblQuery(chemblId)
chemblId |
Character: ChEMBL ID of the target drug (e.g., "CHEMBL1016"). |
Returns a tibble containing indications data for the specified drug.
## Not run: result <- knownDrugsChemblQuery(chemblId = "CHEMBL1016") ## End(Not run)## Not run: result <- knownDrugsChemblQuery(chemblId = "CHEMBL1016") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve drug and clinical candidate data for a specified gene.
knownDrugsGeneQuery(ensgId)knownDrugsGeneQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000169174). |
Returns a data frame containing drug and clinical candidate data for the specified gene.
## Not run: result <- knownDrugsGeneQuery(ensgId = "ENSG00000169174") ## End(Not run)## Not run: result <- knownDrugsGeneQuery(ensgId = "ENSG00000169174") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve locus-to-gene prediction data for a specified study locus.
locus2GeneQuery(studyLocusId)locus2GeneQuery(studyLocusId)
studyLocusId |
Character: ID of the target study locus (e.g., "fa375739ca2a6b825ce5cc69d117e84b"). |
Returns a tibble containing locus-to-gene prediction data for the specified study locus.
## Not run: result <- locus2GeneQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b") ## End(Not run)## Not run: result <- locus2GeneQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve mechanisms of action data for a specified drug.
mechanismsOfActionQuery(chemblId)mechanismsOfActionQuery(chemblId)
chemblId |
Character: ChEMBL ID of the target drug (e.g., "CHEMBL1016"). |
Returns a tibble containing mechanisms of action data for the specified drug.
## Not run: result <- mechanismsOfActionQuery(chemblId = "CHEMBL1016") ## End(Not run)## Not run: result <- mechanismsOfActionQuery(chemblId = "CHEMBL1016") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve mouse phenotypes data for a specified gene.
mousePhenotypesQuery(ensemblId)mousePhenotypesQuery(ensemblId)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000169174). |
Returns a data frame containing mouse phenotypes data for the specified gene.
## Not run: result <- mousePhenotypesQuery(ensemblId = "ENSG00000169174") ## End(Not run)## Not run: result <- mousePhenotypesQuery(ensemblId = "ENSG00000169174") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve Orphanet evidence data for a specified gene and disease.
orphanetQuery(ensemblId, efoId, size = 3500)orphanetQuery(ensemblId, efoId, size = 3500)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000080815"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
size |
Integer: Number of records to retrieve (default: 3500). |
Returns a tibble containing Orphanet evidence data for the specified gene and disease.
## Not run: result <- orphanetQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 3500) ## End(Not run)## Not run: result <- orphanetQuery(ensemblId = "ENSG00000080815", efoId = "MONDO_0004975", size = 3500) ## End(Not run)
For an input study ID and a list of other study IDs, this function returns two elements. One contains the overlap information in a table format, and the other element is the variant intersection set, representing an overlap between two variants of the two given studies.
overlapInfoForStudy(study_id, study_ids = list())overlapInfoForStudy(study_id, study_ids = list())
study_id |
Character: Study ID(s) generated by Open Targets (e.g GCST90002357). |
study_ids |
Character: generated ID for variants by Open Targets (e.g. 1_154119580_C_A) or rsId (rs2494663). |
A list containing a data frame of overlap information and the variant intersection set. The overlap information table (overlap_info) consists of the following columns:
studyId: Character vector. Study ID.
traitReported: Character vector. Reported trait.
traitCategory: Character vector. Trait category.
variantIdA: Character vector. Variant ID from study A.
variantIdB: Character vector. Variant ID from study B.
overlapAB: Integer vector. Number of overlaps between variants A and B.
distinctA: Integer vector. Number of distinct variants in study A.
distinctB: Integer vector. Number of distinct variants in study B.
study.studyId: Character vector. Study ID from study list.
study.traitReported: Character vector. Reported trait from study list.
study.traitCategory: Character vector. Trait category from study list.
The variant intersection set (variant_intersection_set) is a character vector representing the intersection of variants.
## Not run: result <- overlapInfoForStudy(study_id = "GCST90002357", study_ids = list("GCST90025975", "GCST90025962")) ## End(Not run)## Not run: result <- overlapInfoForStudy(study_id = "GCST90002357", study_ids = list("GCST90025975", "GCST90025962")) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve pathways data for a specified gene.
pathwaysQuery(ensgId)pathwaysQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000105397). |
Returns a tibble containing pathways data for the specified gene.
## Not run: result <- pathwaysQuery(ensgId = "ENSG00000105397") ## End(Not run)## Not run: result <- pathwaysQuery(ensgId = "ENSG00000105397") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve pharmacogenomics data for a specified drug.
pharmacogenomicsChemblQuery(chemblId)pharmacogenomicsChemblQuery(chemblId)
chemblId |
Character: ChEMBL ID of the target drug (e.g., "CHEMBL1016"). |
Returns a tibble containing pharmacogenomics data for the specified drug.
## Not run: result <- pharmacogenomicsChemblQuery(chemblId = "CHEMBL1016") ## End(Not run)## Not run: result <- pharmacogenomicsChemblQuery(chemblId = "CHEMBL1016") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve pharmacogenomics data for a specified gene.
pharmacogenomicsGeneQuery(ensgId)pharmacogenomicsGeneQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000141510). |
Returns a tibble containing pharmacogenomics data for the specified gene.
## Not run: result <- pharmacogenomicsGeneQuery(ensgId = "ENSG00000141510") ## End(Not run)## Not run: result <- pharmacogenomicsGeneQuery(ensgId = "ENSG00000141510") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve pharmacogenomics data for a specified variant.
pharmacogenomicsVariantQuery(variantId)pharmacogenomicsVariantQuery(variantId)
variantId |
Character: ID of the target variant (e.g., "12_111446804_T_C"). |
Returns a tibble containing pharmacogenomics data for the specified variant.
## Not run: result <- pharmacogenomicsVariantQuery(variantId = "12_111446804_T_C") ## End(Not run)## Not run: result <- pharmacogenomicsVariantQuery(variantId = "12_111446804_T_C") ## End(Not run)
Displays the top adverse events ranked by log-likelihood ratio (logLR) with a dashed reference line at the critical value threshold.
plot_adverse_events(df, top_n = 20)plot_adverse_events(df, top_n = 20)
df |
A tibble returned by |
top_n |
Integer: number of top events to display (default: 20). |
A ggplot object.
## Not run: ae <- adverseEventsQuery(chemblId = "CHEMBL941") plot_adverse_events(ae) ## End(Not run)## Not run: ae <- adverseEventsQuery(chemblId = "CHEMBL941") plot_adverse_events(ae) ## End(Not run)
Scatter plot of the H4 posterior probability (shared causal variant) against the number of colocalising variants, with labels for each colocalising trait and a threshold reference line at H4 = 0.8.
plot_colocalisation(df, h4_threshold = 0.8)plot_colocalisation(df, h4_threshold = 0.8)
df |
A data frame returned by |
h4_threshold |
Numeric: H4 threshold line to draw (default: 0.8). |
A ggplot object.
## Not run: coloc <- gwasColocalisation(study_locus_id = "5a86bfd40d2ebecf6ce97bbe8a737512") plot_colocalisation(coloc) ## End(Not run)## Not run: coloc <- gwasColocalisation(study_locus_id = "5a86bfd40d2ebecf6ce97bbe8a737512") plot_colocalisation(coloc) ## End(Not run)
Faceted horizontal bar chart showing disease indications grouped by clinical trial stage. Each stage gets its own panel listing the individual disease names.
plot_indications(df, top_n = 10)plot_indications(df, top_n = 10)
df |
A tibble returned by |
top_n |
Integer: max diseases to show per stage panel (default: 10). |
A ggplot object.
## Not run: ind <- indicationsQuery(chemblId = "CHEMBL941") plot_indications(ind) ## End(Not run)## Not run: ind <- indicationsQuery(chemblId = "CHEMBL941") plot_indications(ind) ## End(Not run)
Draws a circular network layout of molecular interaction partners with edge thickness proportional to the interaction confidence score.
plot_interactions(df, top_n = 20)plot_interactions(df, top_n = 20)
df |
A tibble returned by |
top_n |
Integer: number of top interactions to display (default: 20). |
A ggplot object.
## Not run: int <- interactionsQuery(ensgId = "ENSG00000141510", sourceDatabase = "intact", size = 25) plot_interactions(int) ## End(Not run)## Not run: int <- interactionsQuery(ensgId = "ENSG00000141510", sourceDatabase = "intact", size = 25) plot_interactions(int) ## End(Not run)
Displays candidate genes ranked by their L2G score as a horizontal bar chart with a color gradient.
plot_l2g(df, top_n = 15)plot_l2g(df, top_n = 15)
df |
A tibble returned by |
top_n |
Integer: number of top genes to display (default: 15). |
A ggplot object.
## Not run: l2g <- locus2GeneQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b") plot_l2g(l2g) ## End(Not run)## Not run: l2g <- locus2GeneQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b") plot_l2g(l2g) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve QTL credible sets data for a specified variant.
qtlCredibleSetsQuery(variantId, size = 500, index = 0)qtlCredibleSetsQuery(variantId, size = 500, index = 0)
variantId |
Character: ID of the target variant (e.g., "19_10352442_G_C"). |
size |
Integer: Number of records to retrieve (default: 500). |
index |
Integer: Page index for pagination (default: 0). |
Returns a tibble containing QTL credible sets data for the specified variant.
## Not run: result <- qtlCredibleSetsQuery(variantId = "19_10352442_G_C", size = 500, index = 0) ## End(Not run)## Not run: result <- qtlCredibleSetsQuery(variantId = "19_10352442_G_C", size = 500, index = 0) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve safety liabilities data for a specified gene.
safetyQuery(ensgId)safetyQuery(ensgId)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., ENSG00000141510). |
Returns a tibble containing safety liabilities data for the specified gene.
## Not run: result <- safetyQuery(ensgId = "ENSG00000141510") ## End(Not run)## Not run: result <- safetyQuery(ensgId = "ENSG00000141510") ## End(Not run)
targetLiability() is a convenience wrapper that combines the
evidence returned by geneticConstraintQuery,
safetyQuery and (optionally) depMapQuery into a
single, interpretable liability score with a written rationale. It is
intended as a quick triage step when prioritising drug targets: genes that
are highly constrained, essential in cell lines, or already associated with
safety events are flagged as risky for full inhibition, while genes lacking
these signals may tolerate a partial or tissue-restricted approach.
targetLiability(ensgId, include_essentiality = TRUE, verbose = TRUE)targetLiability(ensgId, include_essentiality = TRUE, verbose = TRUE)
ensgId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000141510"). |
include_essentiality |
Logical: whether to query DepMap essentiality as
part of the score. Set to |
verbose |
Logical: print the rationale to the console (default: TRUE). |
The overall liability_score is a weighted average (range 0-1, higher
means greater liability) of up to three normalised components: genetic
constraint (weight 0.40), known safety liabilities (0.35) and DepMap
essentiality (0.25). Components without data are dropped and the remaining
weights are renormalised. See Details for the mapping of each
component.
Genetic constraint uses the loss-of-function (LoF) decile bin from
geneticConstraintQuery() (gnomAD LOEUF, where bin 0 is the most
constrained and bin 9 the least). The most constrained bin scores 1 and the
least constrained scores 0.
Safety liabilities count the distinct events reported by
safetyQuery(); the component saturates at five or more events.
Essentiality uses the median CRISPR gene-effect score across DepMap screens; a score of 0 (non-essential) maps to 0 and -1 (strongly essential) maps to 1.
This is a heuristic aid, not a validated clinical safety measure; always review the underlying evidence before acting on the score.
A one-row tibble with the input identifiers, the individual
component scores and flags, the combined liability_score, a
liability_category ("Low", "Moderate" or "High"), a
recommendation, and a human-readable rationale. Returns
NULL if none of the underlying queries return data.
## Not run: # Score TP53 for inhibition liability targetLiability(ensgId = "ENSG00000141510") # Skip the DepMap essentiality call targetLiability(ensgId = "ENSG00000169174", include_essentiality = FALSE) ## End(Not run)## Not run: # Score TP53 for inhibition liability targetLiability(ensgId = "ENSG00000141510") # Skip the DepMap essentiality call targetLiability(ensgId = "ENSG00000169174", include_essentiality = FALSE) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve UniProt literature evidence data for a specified gene and disease.
uniprotLiteratureQuery(ensemblId, efoId, size = 3500)uniprotLiteratureQuery(ensemblId, efoId, size = 3500)
ensemblId |
Character: ENSEMBL ID of the target gene (e.g., "ENSG00000130203"). |
efoId |
Character: EFO ID of the target disease (e.g., "MONDO_0004975"). |
size |
Integer: Number of records to retrieve (default: 3500). |
Returns a tibble containing UniProt literature evidence data for the specified gene and disease.
## Not run: result <- uniprotLiteratureQuery(ensemblId = "ENSG00000130203", efoId = "MONDO_0004975", size = 3500) ## End(Not run)## Not run: result <- uniprotLiteratureQuery(ensemblId = "ENSG00000130203", efoId = "MONDO_0004975", size = 3500) ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve UniProt variants data for a specified variant.
uniProtVariantsQuery(variantId)uniProtVariantsQuery(variantId)
variantId |
Character: ID of the target variant (e.g., "4_1804392_G_A"). |
Returns a tibble containing UniProt variants data for the specified variant.
## Not run: result <- uniProtVariantsQuery(variantId = "4_1804392_G_A") ## End(Not run)## Not run: result <- uniProtVariantsQuery(variantId = "4_1804392_G_A") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve variant effect predictor data for a specified variant.
variantEffectPredictorQuery(variantId)variantEffectPredictorQuery(variantId)
variantId |
Character: ID of the target variant (e.g., "4_1804392_G_A"). |
Returns a tibble containing variant effect predictor data for the specified variant.
## Not run: result <- variantEffectPredictorQuery(variantId = "4_1804392_G_A") ## End(Not run)## Not run: result <- variantEffectPredictorQuery(variantId = "4_1804392_G_A") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve variant effect data for a specified variant.
variantEffectQuery(variantId)variantEffectQuery(variantId)
variantId |
Character: ID of the target variant (e.g., "4_1804392_G_A"). |
Returns a tibble containing variant effect data for the specified variant.
## Not run: result <- variantEffectQuery(variantId = "4_1804392_G_A") ## End(Not run)## Not run: result <- variantEffectQuery(variantId = "4_1804392_G_A") ## End(Not run)
This function queries the Open Targets GraphQL API to retrieve variants data for a specified study locus.
variantsQuery(studyLocusId, size = 500, index = 0)variantsQuery(studyLocusId, size = 500, index = 0)
studyLocusId |
Character: ID of the target study locus (e.g., "fa375739ca2a6b825ce5cc69d117e84b"). |
size |
Integer: Number of records to retrieve (default: 500). |
index |
Integer: Page index for pagination (default: 0). |
Returns a tibble containing variants data for the specified study locus.
## Not run: result <- variantsQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b", size = 500, index = 0) ## End(Not run)## Not run: result <- variantsQuery(studyLocusId = "fa375739ca2a6b825ce5cc69d117e84b", size = 500, index = 0) ## End(Not run)