knitr::opts_chunk$set(cache = TRUE)
The aim of the package is to expose the OncoKB API through an R client. This vignette demonstrates public API access. To learn more about the OncoKB database, visit https://www.oncokb.org.
To get the development version of oncoKBData
use:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("waldronlab/oncoKBData")
library(oncoKBData) library(S4Vectors)
The oncoKBData
aims to provide access to the OncoKB API via the public
API. Access is also possible with a licensed token.
In order to use the OncoKB API, we must instantiate an API object as provided
by the r CRANpkg("rapiclient")
and r Biocpkg("AnVIL")
packages.
oncokb <- oncoKB()
Note that for private API access, users must change the api.
argument
in the oncoKB
function.
Check available tags, operations, and descriptions as a tibble
:
tags(oncokb) head(tags(oncokb)$operation)
Note. The annotations API access requires a token.
To retrieve the levels of evidence for all types (i.e., 'therapeutic',
'diagnostic', 'prognostic', and 'FDA') run the levelsOfEvidence
function.
(loe <- levelsOfEvidence(oncokb))
It will return a DataFrame
with important metadata
:
names(metadata(loe)) metadata(loe)["oncoTreeVersion"] metadata(loe)[["apiVersion"]]
The API allows retrieval of curated genes where there is a single gene per observation:
curatedGenes(oncokb)
and a long list of genes associated with cancer where there can be multiple
entries for the same hugoSymbol
due to multiple geneAliases
:
cancerGeneList(oncokb)
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.