# cBioPortalData: API Reference Guide for Devs

Marcel Ramos & Levi Waldron

#### May 18, 2026

# Contents

# Installation

Please use the devel version of the `AnVIL` Bioconductor package.

    library(cBioPortalData)
    library(AnVIL)

# Introduction

The cBioPortal for Cancer Genomics website is a great resource for interactive exploration of study datasets. However, it does not easily allow the analyst to obtain and further analyze the data.

We’ve developed the `cBioPortalData` package to fill this need to programmatically access the data resources available on the cBioPortal.

The `cBioPortalData` package provides an R interface for accessing the cBioPortal study data within the Bioconductor ecosystem.

It downloads study data from the cBioPortal API (https://cbioportal.org/api) and uses Bioconductor infrastructure to cache and represent the data.

We use the `MultiAssayExperiment` (@Ramos2017-er) package to integrate, represent, and coordinate multiple experiments for the studies availble in the cBioPortal. This package in conjunction with `curatedTCGAData` give access to a large trove of publicly available bioinformatic data. Please see our publication here (@Ramos2020-ya).

We demonstrate common use cases of `cBioPortalData` and `curatedTCGAData` during Bioconductor conference workshops.

# Overview

This vignette is for users / developers who would like to learn more about the available data in `cBioPortalData` and to learn how to hit other endpoints in the cBioPortal API implementation. The functionality demonstrated here is used internally by the package to create integrative representations of study datasets.

Note. To avoid overloading the API service, the API was designed to only query a part of the study data. Therefore, the user is required to enter either a set of genes of interest or a gene panel identifier.

# API representation

Obtaining the cBioPortal API representation object

    (cbio <- cBioPortal())

    ## service: cBioPortal
    ## host: www.cbioportal.org
    ## tags(); use cbioportal$<tab completion>:
    ## # A tibble: 65 × 3
    ##    tag                 operation                                  summary
    ##    <chr>               <chr>                                      <chr>
    ##  1 Cancer Types        getAllCancerTypesUsingGET                  Get all cance…
    ##  2 Cancer Types        getCancerTypeUsingGET                      Get a cancer …
    ##  3 Clinical Attributes fetchClinicalAttributesUsingPOST           Fetch clinica…
    ##  4 Clinical Attributes getAllClinicalAttributesInStudyUsingGET    Get all clini…
    ##  5 Clinical Attributes getAllClinicalAttributesUsingGET           Get all clini…
    ##  6 Clinical Attributes getClinicalAttributeInStudyUsingGET        Get specified…
    ##  7 Clinical Data       fetchAllClinicalDataInStudyUsingPOST       Fetch clinica…
    ##  8 Clinical Data       fetchClinicalDataUsingPOST                 Fetch clinica…
    ##  9 Clinical Data       getAllClinicalDataInStudyUsingGET          Get all clini…
    ## 10 Clinical Data       getAllClinicalDataOfPatientInStudyUsingGET Get all clini…
    ## # ℹ 55 more rows
    ## tag values:
    ##   Cancer Types, Clinical Attributes, Clinical Data, Copy Number
    ##   Segments, Discrete Copy Number Alterations, Gene Panel Data, Gene
    ##   Panels, Generic Assay Data, Generic Assays, Genes, Info, Molecular
    ##   Data, Molecular Profiles, Mutations, Patients, Sample Lists, Samples,
    ##   Server running status, Studies, Treatments
    ## schemas():
    ##   AlleleSpecificCopyNumber, AlterationFilter,
    ##   AndedPatientTreatmentFilters, AndedSampleTreatmentFilters,
    ##   CancerStudy
    ##   # ... with 62 more elements

## Operations

Check available tags, operations, and descriptions as a `tibble`:

    tags(cbio)

    ## # A tibble: 65 × 3
    ##    tag                 operation                                  summary
    ##    <chr>               <chr>                                      <chr>
    ##  1 Cancer Types        getAllCancerTypesUsingGET                  Get all cance…
    ##  2 Cancer Types        getCancerTypeUsingGET                      Get a cancer …
    ##  3 Clinical Attributes fetchClinicalAttributesUsingPOST           Fetch clinica…
    ##  4 Clinical Attributes getAllClinicalAttributesInStudyUsingGET    Get all clini…
    ##  5 Clinical Attributes getAllClinicalAttributesUsingGET           Get all clini…
    ##  6 Clinical Attributes getClinicalAttributeInStudyUsingGET        Get specified…
    ##  7 Clinical Data       fetchAllClinicalDataInStudyUsingPOST       Fetch clinica…
    ##  8 Clinical Data       fetchClinicalDataUsingPOST                 Fetch clinica…
    ##  9 Clinical Data       getAllClinicalDataInStudyUsingGET          Get all clini…
    ## 10 Clinical Data       getAllClinicalDataOfPatientInStudyUsingGET Get all clini…
    ## # ℹ 55 more rows

    head(tags(cbio)$operation)

    ## [1] "getAllCancerTypesUsingGET"
    ## [2] "getCancerTypeUsingGET"
    ## [3] "fetchClinicalAttributesUsingPOST"
    ## [4] "getAllClinicalAttributesInStudyUsingGET"
    ## [5] "getAllClinicalAttributesUsingGET"
    ## [6] "getClinicalAttributeInStudyUsingGET"

### Searching through the API

    searchOps(cbio, "clinical")

    ## [1] "getAllClinicalAttributesUsingGET"
    ## [2] "fetchClinicalAttributesUsingPOST"
    ## [3] "fetchClinicalDataUsingPOST"
    ## [4] "getAllClinicalAttributesInStudyUsingGET"
    ## [5] "getClinicalAttributeInStudyUsingGET"
    ## [6] "getAllClinicalDataInStudyUsingGET"
    ## [7] "fetchAllClinicalDataInStudyUsingPOST"
    ## [8] "getAllClinicalDataOfPatientInStudyUsingGET"
    ## [9] "getAllClinicalDataOfSampleInStudyUsingGET"

## Studies

Get the list of studies available:

    getStudies(cbio)

    ## # A tibble: 535 × 13
    ##    name          description publicStudy pmid  citation groups status importDate
    ##    <chr>         <chr>       <lgl>       <chr> <chr>    <chr>   <int> <chr>
    ##  1 Breast Cance… "CPTAC Bre… TRUE        <NA>  <NA>     "PUBL…      0 2026-01-1…
    ##  2 Glioma (MSK,… "Targeted … TRUE        3126… Jonsson… "PUBL…      0 2026-01-0…
    ##  3 Osteosarcoma… "TARGET Os… TRUE        <NA>  <NA>     "PUBL…      0 2026-01-1…
    ##  4 Prostate Can… "Targeted … TRUE        3848… Anselmi… ""          0 2026-01-1…
    ##  5 Uterine Endo… "CPTAC Ute… TRUE        <NA>  <NA>     "PUBL…      0 2026-01-1…
    ##  6 Urothelial C… "Whole-exo… TRUE        2774… Faltas … "PUBL…      0 2026-01-0…
    ##  7 Basal Cell C… "Whole-exo… TRUE        2695… Bonilla… "PUBL…      0 2026-01-0…
    ##  8 Endometrial … "TCGA Endo… TRUE        <NA>  <NA>     "PUBL…      0 2026-01-1…
    ##  9 Adenoid Cyst… "Whole-gen… TRUE        2686… Rettig … "ACYC…      0 2026-01-0…
    ## 10 Uterine Corp… "Uterine C… TRUE        2962… TCGA, C… "PUBL…      0 2026-01-1…
    ## # ℹ 525 more rows
    ## # ℹ 5 more variables: allSampleCount <int>, readPermission <lgl>,
    ## #   studyId <chr>, cancerTypeId <chr>, referenceGenome <chr>

## Clinical Data

Obtain the clinical data for a particular study:

    clinicalData(cbio, "acc_tcga")

    ## # A tibble: 92 × 85
    ##    patientId    AGE   AJCC_PATHOLOGIC_TUMOR_STAGE ATYPICAL_MITOTIC_FIGURES
    ##    <chr>        <chr> <chr>                       <chr>
    ##  1 TCGA-OR-A5J1 58    Stage II                    Atypical Mitotic Figures Abse…
    ##  2 TCGA-OR-A5J2 44    Stage IV                    Atypical Mitotic Figures Pres…
    ##  3 TCGA-OR-A5J3 23    Stage III                   Atypical Mitotic Figures Abse…
    ##  4 TCGA-OR-A5J4 23    Stage IV                    Atypical Mitotic Figures Abse…
    ##  5 TCGA-OR-A5J5 30    Stage III                   Atypical Mitotic Figures Pres…
    ##  6 TCGA-OR-A5J6 29    Stage II                    Atypical Mitotic Figures Abse…
    ##  7 TCGA-OR-A5J7 30    Stage III                   Atypical Mitotic Figures Pres…
    ##  8 TCGA-OR-A5J8 66    Stage III                   Atypical Mitotic Figures Pres…
    ##  9 TCGA-OR-A5J9 22    Stage II                    Atypical Mitotic Figures Abse…
    ## 10 TCGA-OR-A5JA 53    Stage IV                    Atypical Mitotic Figures Pres…
    ## # ℹ 82 more rows
    ## # ℹ 81 more variables: CAPSULAR_INVASION <chr>, CLIN_M_STAGE <chr>,
    ## #   CT_SCAN_PREOP_RESULTS <chr>,
    ## #   CYTOPLASM_PRESENCE_LESS_THAN_EQUAL_25_PERCENT <chr>,
    ## #   DAYS_TO_INITIAL_PATHOLOGIC_DIAGNOSIS <chr>, DFS_MONTHS <chr>,
    ## #   DFS_STATUS <chr>, DIFFUSE_ARCHITECTURE <chr>, ETHNICITY <chr>,
    ## #   FORM_COMPLETION_DATE <chr>, HISTOLOGICAL_DIAGNOSIS <chr>, …

## Molecular Profiles

A table of molecular profiles for a particular study can be obtained by running the following:

    mols <- molecularProfiles(cbio, "acc_tcga")
    mols[["molecularProfileId"]]

    ## [1] "acc_tcga_gistic"
    ## [2] "acc_tcga_linear_CNA"
    ## [3] "acc_tcga_methylation_hm450"
    ## [4] "acc_tcga_mutations"
    ## [5] "acc_tcga_rna_seq_v2_mrna"
    ## [6] "acc_tcga_rna_seq_v2_mrna_median_Zscores"
    ## [7] "acc_tcga_rna_seq_v2_mrna_median_all_sample_Zscores"
    ## [8] "acc_tcga_rppa"
    ## [9] "acc_tcga_rppa_Zscores"

## Molecular Profile Data

The data for a molecular profile can be obtained with prior knowledge of available `entrezGeneIds`:

    molecularData(cbio, molecularProfileIds = "acc_tcga_rna_seq_v2_mrna",
        entrezGeneIds = c(1, 2),
        sampleIds = c("TCGA-OR-A5J1-01",  "TCGA-OR-A5J2-01")
    )

    ## $acc_tcga_rna_seq_v2_mrna
    ## # A tibble: 4 × 8
    ##   uniqueSampleKey      uniquePatientKey entrezGeneId molecularProfileId sampleId
    ##   <chr>                <chr>                   <int> <chr>              <chr>
    ## 1 VENHQS1PUi1BNUoxLTA… VENHQS1PUi1BNUo…            1 acc_tcga_rna_seq_… TCGA-OR…
    ## 2 VENHQS1PUi1BNUoxLTA… VENHQS1PUi1BNUo…            2 acc_tcga_rna_seq_… TCGA-OR…
    ## 3 VENHQS1PUi1BNUoyLTA… VENHQS1PUi1BNUo…            1 acc_tcga_rna_seq_… TCGA-OR…
    ## 4 VENHQS1PUi1BNUoyLTA… VENHQS1PUi1BNUo…            2 acc_tcga_rna_seq_… TCGA-OR…
    ## # ℹ 3 more variables: patientId <chr>, studyId <chr>, value <dbl>

## Genes

### All available genes

A list of all the genes provided by the API service including hugo symbols, and entrez gene IDs can be obtained by using the `geneTable` function:

    geneTable(cbio)

    ## # A tibble: 1,000 × 3
    ##    entrezGeneId hugoGeneSymbol type
    ##           <int> <chr>          <chr>
    ##  1            1 A1BG           protein-coding
    ##  2            2 A2M            protein-coding
    ##  3           13 AADAC          protein-coding
    ##  4           14 AAMP           protein-coding
    ##  5           15 AANAT          protein-coding
    ##  6           16 AARS1          protein-coding
    ##  7           17 AAVS1          other
    ##  8           18 ABAT           protein-coding
    ##  9           19 ABCA1          protein-coding
    ## 10           20 ABCA2          protein-coding
    ## # ℹ 990 more rows

### Gene Panels

    genePanels(cbio)

    ## # A tibble: 69 × 2
    ##    description                                                       genePanelId
    ##    <chr>                                                             <chr>
    ##  1 Targeted (129 genes) sequencing of cfDNA via MSK-ACCESS on Illum… ACCESS129
    ##  2 Targeted (27 cancer genes) sequencing of adenoid cystic carcinom… ACYC_FMI_27
    ##  3 ARCHER-HEME gene panel (199 genes)                                ARCHER-HEM…
    ##  4 ARCHER-SOLID Gene Panel (62 genes)                                ARCHER-SOL…
    ##  5 ARCHER-SOLID-CV4 Gene Panel (123 genes)                           ARCHER-SOL…
    ##  6 Targeted panel of 232 genes.                                      Agilent
    ##  7 Targeted panel of 8 genes.                                        AmpliSeq
    ##  8 Targeted panel of 509 genes.                                      Bait_UCSF5…
    ##  9 DFCI-ONCOPANEL-1, Number of Genes - 304                           DFCI-ONCOP…
    ## 10 DFCI-ONCOPANEL-2, Number of Genes - 326                           DFCI-ONCOP…
    ## # ℹ 59 more rows

    getGenePanel(cbio, "IMPACT341")

    ## # A tibble: 341 × 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
    ## # ℹ 331 more rows

## Molecular Gene Panels

### genePanelMolecular

    gprppa <- genePanelMolecular(cbio,
        molecularProfileId = "acc_tcga_rppa",
        sampleListId = "acc_tcga_all")
    gprppa

    ## # A tibble: 92 × 7
    ##    uniqueSampleKey        uniquePatientKey molecularProfileId sampleId patientId
    ##    <chr>                  <chr>            <chr>              <chr>    <chr>
    ##  1 VENHQS1PUi1BNUoxLTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  2 VENHQS1PUi1BNUoyLTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  3 VENHQS1PUi1BNUozLTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  4 VENHQS1PUi1BNUo0LTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  5 VENHQS1PUi1BNUo1LTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  6 VENHQS1PUi1BNUo2LTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  7 VENHQS1PUi1BNUo3LTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  8 VENHQS1PUi1BNUo4LTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ##  9 VENHQS1PUi1BNUo5LTAxO… VENHQS1PUi1BNUo… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ## 10 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… acc_tcga_rppa      TCGA-OR… TCGA-OR-…
    ## # ℹ 82 more rows
    ## # ℹ 2 more variables: studyId <chr>, profiled <lgl>

### getGenePanelMolecular

    getGenePanelMolecular(cbio,
        molecularProfileIds = c("acc_tcga_rppa", "acc_tcga_gistic"),
        sampleIds = allSamples(cbio, "acc_tcga")$sampleId
    )

    ## # A tibble: 184 × 7
    ##    uniqueSampleKey        uniquePatientKey molecularProfileId sampleId patientId
    ##    <chr>                  <chr>            <chr>              <chr>    <chr>
    ##  1 VENHQS1PUi1BNUoxLTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  2 VENHQS1PUi1BNUoyLTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  3 VENHQS1PUi1BNUozLTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  4 VENHQS1PUi1BNUo0LTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  5 VENHQS1PUi1BNUo1LTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  6 VENHQS1PUi1BNUo2LTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  7 VENHQS1PUi1BNUo3LTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  8 VENHQS1PUi1BNUo4LTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ##  9 VENHQS1PUi1BNUo5LTAxO… VENHQS1PUi1BNUo… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ## 10 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… acc_tcga_gistic    TCGA-OR… TCGA-OR-…
    ## # ℹ 174 more rows
    ## # ℹ 2 more variables: studyId <chr>, profiled <lgl>

### getDataByGenes

    getDataByGenes(cbio, "acc_tcga", genePanelId = "IMPACT341",
        molecularProfileIds = "acc_tcga_rppa", sampleListId = "acc_tcga_rppa")

    ## $acc_tcga_rppa
    ## # A tibble: 2,622 × 9
    ##    uniqueSampleKey     uniquePatientKey entrezGeneId molecularProfileId sampleId
    ##    <chr>               <chr>                   <int> <chr>              <chr>
    ##  1 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…          207 acc_tcga_rppa      TCGA-OR…
    ##  2 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…          208 acc_tcga_rppa      TCGA-OR…
    ##  3 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…        10000 acc_tcga_rppa      TCGA-OR…
    ##  4 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…         2625 acc_tcga_rppa      TCGA-OR…
    ##  5 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…         2932 acc_tcga_rppa      TCGA-OR…
    ##  6 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…         8821 acc_tcga_rppa      TCGA-OR…
    ##  7 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…         3667 acc_tcga_rppa      TCGA-OR…
    ##  8 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…         3791 acc_tcga_rppa      TCGA-OR…
    ##  9 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…         3815 acc_tcga_rppa      TCGA-OR…
    ## 10 VENHQS1PUi1BNUoyLT… VENHQS1PUi1BNUo…          367 acc_tcga_rppa      TCGA-OR…
    ## # ℹ 2,612 more rows
    ## # ℹ 4 more variables: patientId <chr>, studyId <chr>, value <dbl>,
    ## #   hugoGeneSymbol <chr>

It uses the `getAllGenesUsingGET` function from the API.

## Samples

### Sample List Identifiers

To display all available sample list identifiers for a particular study ID, one can use the `sampleLists` function:

    sampleLists(cbio, "acc_tcga")

    ## # A tibble: 9 × 5
    ##   category                                name  description sampleListId studyId
    ##   <chr>                                   <chr> <chr>       <chr>        <chr>
    ## 1 all_cases_with_mutation_and_cna_and_mr… Comp… Samples wi… acc_tcga_3w… acc_tc…
    ## 2 all_cases_in_study                      All … All sample… acc_tcga_all acc_tc…
    ## 3 all_cases_with_cna_data                 Samp… Samples wi… acc_tcga_cna acc_tc…
    ## 4 all_cases_with_mutation_and_cna_data    Samp… Samples wi… acc_tcga_cn… acc_tc…
    ## 5 all_cases_with_methylation_data         Samp… Samples wi… acc_tcga_me… acc_tc…
    ## 6 all_cases_with_methylation_data         Samp… Samples wi… acc_tcga_me… acc_tc…
    ## 7 all_cases_with_mrna_rnaseq_data         Samp… Samples wi… acc_tcga_rn… acc_tc…
    ## 8 all_cases_with_rppa_data                Samp… Samples pr… acc_tcga_rp… acc_tc…
    ## 9 all_cases_with_mutation_data            Samp… Samples wi… acc_tcga_se… acc_tc…

### Sample Identifiers

One can obtain the barcodes / identifiers for each sample using a specific sample list identifier, in this case we want all the copy number alteration samples:

    samplesInSampleLists(cbio, "acc_tcga_cna")

    ## CharacterList of length 1
    ## [["acc_tcga_cna"]] TCGA-OR-A5J1-01 TCGA-OR-A5J2-01 ... TCGA-PK-A5HC-01

This returns a `CharacterList` of all identifiers for each sample list identifier input:

    samplesInSampleLists(cbio, c("acc_tcga_cna", "acc_tcga_cnaseq"))

    ## CharacterList of length 2
    ## [["acc_tcga_cna"]] TCGA-OR-A5J1-01 TCGA-OR-A5J2-01 ... TCGA-PK-A5HC-01
    ## [["acc_tcga_cnaseq"]] TCGA-OR-A5J1-01 TCGA-OR-A5J2-01 ... TCGA-PK-A5HC-01

### All samples within a study ID

    allSamples(cbio, "acc_tcga")

    ## # A tibble: 92 × 6
    ##    uniqueSampleKey        uniquePatientKey sampleType sampleId patientId studyId
    ##    <chr>                  <chr>            <chr>      <chr>    <chr>     <chr>
    ##  1 VENHQS1PUi1BNUoxLTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  2 VENHQS1PUi1BNUoyLTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  3 VENHQS1PUi1BNUozLTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  4 VENHQS1PUi1BNUo0LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  5 VENHQS1PUi1BNUo1LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  6 VENHQS1PUi1BNUo2LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  7 VENHQS1PUi1BNUo3LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  8 VENHQS1PUi1BNUo4LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  9 VENHQS1PUi1BNUo5LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ## 10 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ## # ℹ 82 more rows

### Info on Samples

    getSampleInfo(cbio, studyId = "acc_tcga",
        sampleListIds = c("acc_tcga_rppa", "acc_tcga_cna"))

    ## # A tibble: 136 × 6
    ##    uniqueSampleKey        uniquePatientKey sampleType sampleId patientId studyId
    ##    <chr>                  <chr>            <chr>      <chr>    <chr>     <chr>
    ##  1 VENHQS1PUi1BNUoyLTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  2 VENHQS1PUi1BNUozLTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  3 VENHQS1PUi1BNUo2LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  4 VENHQS1PUi1BNUo3LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  5 VENHQS1PUi1BNUo4LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  6 VENHQS1PUi1BNUo5LTAxO… VENHQS1PUi1BNUo… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  7 VENHQS1PUi1BNUpBLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  8 VENHQS1PUi1BNUpQLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ##  9 VENHQS1PUi1BNUpSLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ## 10 VENHQS1PUi1BNUpTLTAxO… VENHQS1PUi1BNUp… Primary S… TCGA-OR… TCGA-OR-… acc_tc…
    ## # ℹ 126 more rows

# Advanced Usage

The `cBioPortal` API representation is not limited to the functions provided in the package. Users who wish to make use of any of the endpoints provided by the API specification should use the dollar sign `$` function to access the endpoints.

First the user should see the input for a particular endpoint as detailed in the API:

    cbio$getGeneUsingGET

    ## getGeneUsingGET
    ## Get a gene
    ##
    ## Parameters:
    ##   geneId (string)
    ##     Entrez Gene ID or Hugo Gene Symbol e.g. 1 or A1BG

Then the user can provide such input:

    (resp <- cbio$getGeneUsingGET("BRCA1"))

    ## Response [https://www.cbioportal.org/api/genes/BRCA1]
    ##   Date: 2026-05-18 21:30
    ##   Status: 200
    ##   Content-Type: application/json
    ##   Size: 69 B

which will require the user to ‘translate’ the response using `httr::content`:

    httr::content(resp)

    ## $entrezGeneId
    ## [1] 672
    ##
    ## $hugoGeneSymbol
    ## [1] "BRCA1"
    ##
    ## $type
    ## [1] "protein-coding"

## Clearing the cache

For users who wish to clear the entire `cBioPortalData` cache, it is recommended that they use:

    unlink("~/.cache/cBioPortalData/")

# sessionInfo

    sessionInfo()

    ## R version 4.6.0 Patched (2026-05-01 r89994)
    ## Platform: aarch64-apple-darwin23
    ## Running under: macOS Tahoe 26.3.1
    ##
    ## Matrix products: default
    ## BLAS:   /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRblas.0.dylib
    ## LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
    ##
    ## locale:
    ## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    ##
    ## time zone: America/New_York
    ## tzcode source: internal
    ##
    ## attached base packages:
    ## [1] stats4    stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ##  [1] jsonlite_2.0.0              survminer_0.5.2
    ##  [3] ggpubr_0.6.3                ggplot2_4.0.3
    ##  [5] survival_3.8-6              cBioPortalData_2.25.1
    ##  [7] MultiAssayExperiment_1.39.0 SummarizedExperiment_1.43.0
    ##  [9] Biobase_2.73.1              GenomicRanges_1.65.0
    ## [11] Seqinfo_1.3.0               IRanges_2.47.1
    ## [13] S4Vectors_0.51.2            BiocGenerics_0.59.2
    ## [15] generics_0.1.4              MatrixGenerics_1.25.0
    ## [17] matrixStats_1.5.0           AnVIL_1.25.1
    ## [19] AnVILBase_1.7.0             dplyr_1.2.1
    ## [21] BiocStyle_2.41.0
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] RColorBrewer_1.1-3        magrittr_2.0.5
    ##   [3] magick_2.9.1              GenomicFeatures_1.65.0
    ##   [5] farver_2.1.2              rmarkdown_2.31
    ##   [7] BiocIO_1.23.3             vctrs_0.7.3
    ##   [9] memoise_2.0.1             Rsamtools_2.29.0
    ##  [11] RCurl_1.98-1.18           tinytex_0.59
    ##  [13] rstatix_0.7.3             htmltools_0.5.9
    ##  [15] S4Arrays_1.13.0           BiocBaseUtils_1.15.1
    ##  [17] lambda.r_1.2.4            curl_7.1.0
    ##  [19] broom_1.0.13              Formula_1.2-5
    ##  [21] SparseArray_1.13.2        sass_0.4.10
    ##  [23] bslib_0.11.0              htmlwidgets_1.6.4
    ##  [25] keyring_1.4.1             httr2_1.2.2
    ##  [27] futile.options_1.0.1      cachem_1.1.0
    ##  [29] commonmark_2.0.0          GenomicAlignments_1.49.0
    ##  [31] mime_0.13                 lifecycle_1.0.5
    ##  [33] pkgconfig_2.0.3           Matrix_1.7-5
    ##  [35] R6_2.6.1                  fastmap_1.2.0
    ##  [37] shiny_1.13.0              digest_0.6.39
    ##  [39] GCPtools_1.3.0            RaggedExperiment_1.37.0
    ##  [41] AnnotationDbi_1.75.0      RSQLite_3.52.0
    ##  [43] labeling_0.4.3            filelock_1.0.3
    ##  [45] RTCGAToolbox_2.43.0       RJSONIO_2.0.5
    ##  [47] httr_1.4.8                abind_1.4-8
    ##  [49] compiler_4.6.0            bit64_4.8.0
    ##  [51] withr_3.0.2               backports_1.5.1
    ##  [53] S7_0.2.2                  BiocParallel_1.47.0
    ##  [55] carData_3.0-6             DBI_1.3.0
    ##  [57] ggsignif_0.6.4            rappdirs_0.3.4
    ##  [59] DelayedArray_0.39.2       rjson_0.2.23
    ##  [61] tools_4.6.0               chromote_0.5.1
    ##  [63] otel_0.2.0                httpuv_1.6.17
    ##  [65] glue_1.8.1                restfulr_0.0.16
    ##  [67] promises_1.5.0            gridtext_0.1.6
    ##  [69] grid_4.6.0                gtable_0.3.6
    ##  [71] tzdb_0.5.0                tidyr_1.3.2
    ##  [73] websocket_1.4.4           data.table_1.18.4
    ##  [75] hms_1.1.4                 car_3.1-5
    ##  [77] xml2_1.5.2                utf8_1.2.6
    ##  [79] XVector_0.53.0            markdown_2.0
    ##  [81] pillar_1.11.1             stringr_1.6.0
    ##  [83] later_1.4.8               splines_4.6.0
    ##  [85] ggtext_0.1.2              BiocFileCache_3.3.0
    ##  [87] lattice_0.22-9            rtracklayer_1.73.0
    ##  [89] bit_4.6.0                 tidyselect_1.2.1
    ##  [91] Biostrings_2.81.1         miniUI_0.1.2
    ##  [93] knitr_1.51                gridExtra_2.3
    ##  [95] litedown_0.9              bookdown_0.46
    ##  [97] futile.logger_1.4.9       xfun_0.57
    ##  [99] DT_0.34.0                 stringi_1.8.7
    ## [101] UCSC.utils_1.9.0          yaml_2.3.12
    ## [103] evaluate_1.0.5            codetools_0.2-20
    ## [105] cigarillo_1.3.0           tibble_3.3.1
    ## [107] BiocManager_1.30.27       cli_3.6.6
    ## [109] xtable_1.8-8              processx_3.9.0
    ## [111] jquerylib_0.1.4           dichromat_2.0-0.1
    ## [113] Rcpp_1.1.1-1.1            GenomeInfoDb_1.49.0
    ## [115] GenomicDataCommons_1.37.0 dbplyr_2.5.2
    ## [117] png_0.1-9                 XML_3.99-0.23
    ## [119] rapiclient_0.1.8          parallel_4.6.0
    ## [121] TCGAutils_1.33.1          readr_2.2.0
    ## [123] blob_1.3.0                bitops_1.0-9
    ## [125] scales_1.4.0              purrr_1.2.2
    ## [127] crayon_1.5.3              rlang_1.2.0
    ## [129] KEGGREST_1.53.0           rvest_1.0.5
    ## [131] formatR_1.14