knitr::opts_chunk$set( collapse = TRUE, comment = "#>", cache = TRUE, out.width = "100%" ) options(tibble.print_min = 5, tibble.print_max = 5) library(BiocStyle)
The cBioPortalData
R package aims to import cBioPortal datasets as
r Biocpkg("MultiAssayExperiment")
objects into Bioconductor. Some of the
features of the package include:
MultiAssayExperiment
integrative container for coordinating
and representing the data.MultiAssayExperiment
provides harmonized
subsetting and reshaping into convenient wide and long formats.r Biocpkg("BiocFileCache")
To install from Bioconductor (recommended for most users, this will install the release or development version corresponding to your version of Bioconductor):
if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("cBioPortalData")
Developers may want to install from GitHub for bleeding-edge updates (although this is generally not necessary because changes here are also pushed to bioc-devel). Note that developers must be working with the development version of Bioconductor; see bioc-devel for details.
if (!require("cBioPortalData", quietly = TRUE)) BiocManager::install("waldronlab/cBioPortalData")
To load the package:
library(cBioPortalData)
cbio <- cBioPortal() studies <- getStudies(cbio, buildReport = TRUE) st <- studies packpct <- round(prop.table(table(st$pack_build))[[2]], 2) * 100 apipct <- round(prop.table(table(st$api_build))[[2]], 2) * 100
cBioPortalData
is a work in progress due to changes in data curation and
cBioPortal API specification. Users can view the data(studiesTable)
dataset
to get an overview of the studies that are available and currently building
as MultiAssayExperiment
representations. About r apipct
% of the studies via
the API (api_build
) and r packpct
% of the package studies (pack_build
)
are building, these include additional datasets that were not previously
available. Feel free to file an issue to request prioritization of fixing any
of the remaining datasets.
cbio <- cBioPortal() studies <- getStudies(cbio, buildReport = TRUE)
table(studies$api_build) table(studies$pack_build)
Flexible and granular access to cBioPortal data from cbioportal.org/api
.
This option is best used with a particular gene panel of interest. It allows
users to download sections of the data with molecular profile and gene panel
combinations within a study.
gbm <- cBioPortalData(api = cbio, by = "hugoGeneSymbol", studyId = "gbm_tcga", genePanelId = "IMPACT341", molecularProfileIds = c("gbm_tcga_rppa", "gbm_tcga_mrna") )
gbm
This function will download a dataset from the cbioportal.org/datasets
website as a packaged tarball and serve it to users as a MultiAssayExperiment
object. This option is good for users who are interested in obtaining
all the data for a particular study.
acc <- cBioDataPack("acc_tcga")
acc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.