This section of the documentation lists the functions that allow users to access the cBioPortal API. The main representation of the API can be obtained from the `cBioPortal` function. The supporting functions listed here give access to specific parts of the API and allow the user to explore the API with individual calls. Many of the functions here are listed for documentation purposes and are recommended for advanced usage only. Users should only need to use the `cBioPortalData` main function to obtain data.

cBioPortal(
  hostname = "www.cbioportal.org",
  protocol = "https",
  api. = "/api/api-docs"
)

getStudies(api)

clinicalData(api, studyId = NA_character_)

molecularProfiles(
  api,
  studyId = NA_character_,
  projection = c("SUMMARY", "ID", "DETAILED", "META")
)

mutationData(
  api,
  molecularProfileIds = NA_character_,
  entrezGeneIds = NULL,
  sampleIds = NULL
)

molecularData(
  api,
  molecularProfileIds = NA_character_,
  entrezGeneIds = NULL,
  sampleIds = NULL
)

searchOps(api, keyword)

geneTable(api, pageSize = 1000, pageNumber = 0, ...)

samplesInSampleLists(api, sampleListIds = NA_character_)

sampleLists(api, studyId = NA_character_)

allSamples(api, studyId = NA_character_)

genePanels(api)

getGenePanel(api, genePanelId = NA_character_)

genePanelMolecular(
  api,
  molecularProfileId = NA_character_,
  sampleListId = NULL,
  sampleIds = NULL
)

getGenePanelMolecular(api, molecularProfileIds = NA_character_, sampleIds)

getSampleInfo(
  api,
  studyId = NA_character_,
  sampleListIds = NULL,
  projection = c("SUMMARY", "ID", "DETAILED", "META")
)

getDataByGenePanel(
  api,
  studyId = NA_character_,
  genePanelId = NA_character_,
  molecularProfileIds = NULL,
  sampleListId = NULL,
  sampleIds = NULL
)

Arguments

hostname

character(1) The internet location of the service (default: 'www.cbioportal.org')

protocol

character(1) The internet protocol used to access the hostname (default: 'https')

api.

character(1) The directory location of the API protocol within the hostname (default: '/api/api-docs')

api

An API object of class `cBioPortal` from the `cBioPortal` function

studyId

character(1) Indicates the "studyId" as taken from `getStudies`

projection

character(default: "SUMMARY") Specify the projection type for data retrieval for details see API documentation

molecularProfileIds

character() A vector of molecular profile IDs

entrezGeneIds

numeric() A vector indicating entrez gene IDs

sampleIds

character() Sample identifiers

keyword

character(1) Keyword or pattern for searching through available operations

pageSize

numeric(1) The number of rows in the table to return

pageNumber

numeric(1) The pagination page number

...

Additional arguments to lower level API functions

sampleListIds

character() A vector of 'sampleListId' as obtained from `sampleLists`

genePanelId

character(1) Identifies the gene panel, as obtained from the `genePanels` function

molecularProfileId

character(1) Indicates a molecular profile ID

sampleListId

character(1) A sample list identifier as obtained from `sampleLists()``

Value

cBioPortal: An API object of class 'cBioPortal'

cBioPortalData: A data object of class 'MultiAssayExperiment'

API Metadata

* getStudies - Obtain a table of studies and associated metadata

* searchOps - Search through API operations with a keyword

* geneTable - Get a table of all genes by 'entrezGeneId' or 'hugoGeneSymbol'

* sampleLists - obtain all `sampleListIds` for a particular `studyId`

* allSamples - obtain all samples within a particular `studyId`

* genePanels - Show all available gene panels

Patient Data

* clinicalData - Obtain clinical data for a particular study identifier ('studyId')

Molecular Profiles

* molecularProfiles - Produce a molecular profiles dataset for a given study identifier ('studyId')

* molecularData - Produce a dataset of molecular profile data based on `molecularProfileId`, `entrezGeneIds`, and `sampleIds`

Mutation Data

* mutationData - Produce a dataset of mutation data using `molecularProfileId`, `entrezGeneIds`, and `sampleIds`

Sample Data

* samplesInSampleLists - get all samples associated with a 'sampleListId'

* getSampleInfo - Obtain sample metadata for a particular `studyId` or `sampleListId`

Gene Panels

* getGenePanels - Obtain the gene panel for a particular 'genePanelId'

* genePanelMolecular - get gene panel data for a paricular `molecularProfileId` and `sampleListId` combination

* getGenePanelMolecular - get gene panel data for a combination of `molecularProfileId` and `sampleListId` vectors

* getDataByGenePanel - Download data for a gene panel and `molecularProfileId` combination, optionally a `sampleListId` can be provided.

Examples

cbio <- cBioPortal() getStudies(api = cbio)
#> # A tibble: 309 x 13 #> name shortName description publicStudy pmid citation groups status #> <chr> <chr> <chr> <lgl> <chr> <chr> <chr> <int> #> 1 Oral Sq… Head & ne… Comprehensive … TRUE 2361… Pickerin… "" 0 #> 2 Hepatoc… HCC (Inse… Whole-exome se… TRUE 2582… Schulze … "PUBL… 0 #> 3 Uveal M… UM (QIMR) Whole-genome o… TRUE 2668… Johansso… "PUBL… 0 #> 4 Neurobl… NBL (AMC) Whole genome s… TRUE 2236… Molenaar… "PUBL… 0 #> 5 Nasopha… NPC (Sing… Whole exome se… TRUE 2495… Lin et a… "PUBL… 0 #> 6 Neurobl… NBL (Colo… Whole-genome s… TRUE 2646… Peifer e… "" 0 #> 7 Myelody… MDS (Toky… Whole exome se… TRUE 2190… Yoshida … "" 0 #> 8 Insulin… Panet (Sh… Whole exome se… TRUE 2432… Cao et a… "" 0 #> 9 Pleural… PLMESO (N… Whole-exome se… TRUE 2548… Guo et a… "" 0 #> 10 Pilocyt… PAST (Nat… Whole-genome s… TRUE 2381… Jones et… "PUBL… 0 #> # … with 299 more rows, and 5 more variables: importDate <chr>, #> # allSampleCount <int>, studyId <chr>, cancerTypeId <chr>, #> # referenceGenome <chr>
searchOps(api = cbio, keyword = "molecular")
#> [1] "fetchGenePanelDataInMultipleMolecularProfilesUsingPOST" #> [2] "fetchGenericAssayDataInMultipleMolecularProfilesUsingPOST" #> [3] "fetchGenericAssayDataInMolecularProfileUsingPOST" #> [4] "fetchMolecularDataInMultipleMolecularProfilesUsingPOST" #> [5] "getAllMolecularProfilesUsingGET" #> [6] "fetchMolecularProfilesUsingPOST" #> [7] "getMolecularProfileUsingGET" #> [8] "getDiscreteCopyNumbersInMolecularProfileUsingGET" #> [9] "fetchDiscreteCopyNumbersInMolecularProfileUsingPOST" #> [10] "getAllMolecularDataInMolecularProfileUsingGET" #> [11] "fetchAllMolecularDataInMolecularProfileUsingPOST" #> [12] "getMutationsInMolecularProfileBySampleListIdUsingGET" #> [13] "fetchMutationsInMolecularProfileUsingPOST" #> [14] "fetchMutationsInMultipleMolecularProfilesUsingPOST" #> [15] "getAllMolecularProfilesInStudyUsingGET"
## obtain clinical data acc_clin <- clinicalData(api = cbio, studyId = "acc_tcga") acc_clin
#> # A tibble: 92 x 21 #> uniqueSampleKey uniquePatientKey sampleId patientId studyId CANCER_TYPE #> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 VENHQS1PUi1BNUox… VENHQS1PUi1BNUoxO… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 2 VENHQS1PUi1BNUoy… VENHQS1PUi1BNUoyO… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 3 VENHQS1PUi1BNUoz… VENHQS1PUi1BNUozO… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 4 VENHQS1PUi1BNUo0… VENHQS1PUi1BNUo0O… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 5 VENHQS1PUi1BNUo1… VENHQS1PUi1BNUo1O… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 6 VENHQS1PUi1BNUo2… VENHQS1PUi1BNUo2O… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 7 VENHQS1PUi1BNUo3… VENHQS1PUi1BNUo3O… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 8 VENHQS1PUi1BNUo4… VENHQS1PUi1BNUo4O… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 9 VENHQS1PUi1BNUo5… VENHQS1PUi1BNUo5O… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> 10 VENHQS1PUi1BNUpB… VENHQS1PUi1BNUpBO… TCGA-OR-… TCGA-OR-… acc_tc… Adrenocorti… #> # … with 82 more rows, and 15 more variables: CANCER_TYPE_DETAILED <chr>, #> # DAYS_TO_COLLECTION <chr>, FRACTION_GENOME_ALTERED <chr>, IS_FFPE <chr>, #> # MUTATION_COUNT <chr>, OCT_EMBEDDED <chr>, ONCOTREE_CODE <chr>, #> # OTHER_SAMPLE_ID <chr>, PATHOLOGY_REPORT_FILE_NAME <chr>, #> # PATHOLOGY_REPORT_UUID <chr>, SAMPLE_INITIAL_WEIGHT <chr>, #> # SAMPLE_TYPE <chr>, SAMPLE_TYPE_ID <chr>, SOMATIC_STATUS <chr>, #> # VIAL_NUMBER <chr>
molecularProfiles(api = cbio, studyId = "acc_tcga")
#> # A tibble: 9 x 7 #> molecularAlterat… datatype name description showProfileInAn… molecularProfil… #> <chr> <chr> <chr> <chr> <lgl> <chr> #> 1 PROTEIN_LEVEL LOG2-VA… Prot… Protein ex… FALSE acc_tcga_rppa #> 2 PROTEIN_LEVEL Z-SCORE Prot… Protein ex… TRUE acc_tcga_rppa_Z… #> 3 COPY_NUMBER_ALTE… DISCRETE Puta… Putative c… TRUE acc_tcga_gistic #> 4 MRNA_EXPRESSION CONTINU… mRNA… mRNA gene … FALSE acc_tcga_rna_se… #> 5 MRNA_EXPRESSION Z-SCORE mRNA… mRNA expre… TRUE acc_tcga_rna_se… #> 6 COPY_NUMBER_ALTE… CONTINU… Capp… Capped rel… FALSE acc_tcga_linear… #> 7 METHYLATION CONTINU… Meth… Methylatio… FALSE acc_tcga_methyl… #> 8 MUTATION_EXTENDED MAF Muta… Mutation d… TRUE acc_tcga_mutati… #> 9 MRNA_EXPRESSION Z-SCORE mRNA… Log-transf… TRUE acc_tcga_rna_se… #> # … with 1 more variable: studyId <chr>
genePanels(cbio)
#> # A tibble: 50 x 2 #> description genePanelId #> <chr> <chr> #> 1 Targeted (341 cancer genes) sequencing of various tumor types … IMPACT341 #> 2 Targeted (410 cancer genes) sequencing of various tumor types … IMPACT410 #> 3 Targeted (468 cancer genes) sequencing of various tumor types … IMPACT468 #> 4 Targeted sequencing of urcc tumor via MSK-IMPACT. IMPACT #> 5 Targeted (300 cancer genes) sequencing of bladder urothelial c… IMPACT300 #> 6 Targeted sequencing of urcc tumor via MSK-IMPACT. IMPACT230 #> 7 Targeted (27 cancer genes) sequencing of adenoid cystic carcin… ACYC_FMI_27 #> 8 Targeted (173 cancer genes) sequencing of breast cancers on Il… METABRIC_173 #> 9 Targeted sequencing of 504 cancer-associated genes on Illumina… DFCI_504 #> 10 DNA sequencing of 623 genes with known or potential relationsh… WUSTL-DFCI_6… #> # … with 40 more rows
(gp <- getGenePanel(cbio, "AmpliSeq"))
#> # A tibble: 8 x 2 #> entrezGeneId hugoGeneSymbol #> <int> <chr> #> 1 171023 ASXL1 #> 2 1788 DNMT3A #> 3 3417 IDH1 #> 4 3418 IDH2 #> 5 23451 SF3B1 #> 6 6427 SRSF2 #> 7 7157 TP53 #> 8 7307 U2AF1
muts <- mutationData( api = cbio, molecularProfileIds = "acc_tcga_mutations", entrezGeneIds = 1:1000, sampleIds = c("TCGA-OR-A5J1-01", "TCGA-OR-A5J2-01") ) exps <- molecularData( api = cbio, molecularProfileIds = c("acc_tcga_rna_seq_v2_mrna", "acc_tcga_rppa"), entrezGeneIds = 1:1000, sampleIds = c("TCGA-OR-A5J1-01", "TCGA-OR-A5J2-01") ) sampleLists(api = cbio, studyId = "acc_tcga")
#> # A tibble: 9 x 5 #> category name description sampleListId studyId #> <chr> <chr> <chr> <chr> <chr> #> 1 all_cases_with_r… Samples with… Samples protein data … acc_tcga_rppa acc_tc… #> 2 all_cases_with_m… Samples with… Samples with mutation… acc_tcga_cnaseq acc_tc… #> 3 all_cases_in_stu… All samples All samples (92 sampl… acc_tcga_all acc_tc… #> 4 all_cases_with_c… Samples with… Samples with CNA data… acc_tcga_cna acc_tc… #> 5 all_cases_with_m… Samples with… Samples with mutation… acc_tcga_seque… acc_tc… #> 6 all_cases_with_m… Samples with… Samples with methylat… acc_tcga_methy… acc_tc… #> 7 all_cases_with_m… Samples with… Samples with mRNA exp… acc_tcga_rna_s… acc_tc… #> 8 all_cases_with_m… Complete sam… Samples with mutation… acc_tcga_3way_… acc_tc… #> 9 all_cases_with_m… Samples with… Samples with methylat… acc_tcga_methy… acc_tc…
samplesInSampleLists( api = cbio, sampleListIds = c("acc_tcga_rppa", "acc_tcga_cnaseq") )
#> CharacterList of length 2 #> [["acc_tcga_cnaseq"]] TCGA-OR-A5J1-01 TCGA-OR-A5J2-01 ... TCGA-PK-A5HC-01 #> [["acc_tcga_rppa"]] TCGA-OR-A5J2-01 TCGA-OR-A5J3-01 ... TCGA-PK-A5HA-01
genePanels(api = cbio)
#> # A tibble: 50 x 2 #> description genePanelId #> <chr> <chr> #> 1 Targeted (341 cancer genes) sequencing of various tumor types … IMPACT341 #> 2 Targeted (410 cancer genes) sequencing of various tumor types … IMPACT410 #> 3 Targeted (468 cancer genes) sequencing of various tumor types … IMPACT468 #> 4 Targeted sequencing of urcc tumor via MSK-IMPACT. IMPACT #> 5 Targeted (300 cancer genes) sequencing of bladder urothelial c… IMPACT300 #> 6 Targeted sequencing of urcc tumor via MSK-IMPACT. IMPACT230 #> 7 Targeted (27 cancer genes) sequencing of adenoid cystic carcin… ACYC_FMI_27 #> 8 Targeted (173 cancer genes) sequencing of breast cancers on Il… METABRIC_173 #> 9 Targeted sequencing of 504 cancer-associated genes on Illumina… DFCI_504 #> 10 DNA sequencing of 623 genes with known or potential relationsh… WUSTL-DFCI_6… #> # … with 40 more rows
getGenePanel(api = cbio, genePanelId = "IMPACT341")
#> # A tibble: 341 x 2 #> entrezGeneId hugoGeneSymbol #> <int> <chr> #> 1 25 ABL1 #> 2 84142 ABRAXAS1 #> 3 207 AKT1 #> 4 208 AKT2 #> 5 10000 AKT3 #> 6 238 ALK #> 7 242 ALOX12B #> 8 139285 AMER1 #> 9 324 APC #> 10 367 AR #> # … with 331 more rows
getDataByGenePanel(cbio, studyId = "acc_tcga", genePanelId = "IMPACT341", molecularProfileId = "acc_tcga_rppa", sampleListId = "acc_tcga_rppa")
#> $acc_tcga_rppa #> # A tibble: 2,622 x 9 #> uniqueSampleKey uniquePatientKey entrezGeneId molecularProfil… sampleId #> <chr> <chr> <int> <chr> <chr> #> 1 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 207 acc_tcga_rppa TCGA-OR-… #> 2 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 208 acc_tcga_rppa TCGA-OR-… #> 3 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 10000 acc_tcga_rppa TCGA-OR-… #> 4 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 367 acc_tcga_rppa TCGA-OR-… #> 5 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 472 acc_tcga_rppa TCGA-OR-… #> 6 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 8314 acc_tcga_rppa TCGA-OR-… #> 7 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 596 acc_tcga_rppa TCGA-OR-… #> 8 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 598 acc_tcga_rppa TCGA-OR-… #> 9 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 10018 acc_tcga_rppa TCGA-OR-… #> 10 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… 673 acc_tcga_rppa TCGA-OR-… #> # … with 2,612 more rows, and 4 more variables: patientId <chr>, studyId <chr>, #> # value <dbl>, hugoGeneSymbol <chr> #>