Please use the devel version of the AnVIL Bioconductor package.
library(cBioPortalData)
library(AnVIL)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.
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.
Obtaining the cBioPortal API representation object
(cbio <- cBioPortal())## service: cBioPortal
## tags(); use cbioportal$<tab completion>:
## # A tibble: 61 × 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…
## # … with 51 more rows
## tag values:
##   Cancer Types, Clinical Attributes, Clinical Data, Copy Number
##   Segments, Discrete Copy Number Alterations, Gene Panels, Generic
##   Assays, Genes, Molecular Data, Molecular Profiles, Mutations,
##   Patients, Sample Lists, Samples, Structural Variants, Studies,
##   Treatments
## schemas():
##   AlleleSpecificCopyNumber, AlterationFilter,
##   AndedPatientTreatmentFilters, AndedSampleTreatmentFilters,
##   CancerStudy
##   # ... with 58 more elementsCheck available tags, operations, and descriptions as a tibble:
tags(cbio)## # A tibble: 61 × 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…
## # … with 51 more rowshead(tags(cbio)$operation)## [1] "getAllCancerTypesUsingGET"              
## [2] "getCancerTypeUsingGET"                  
## [3] "fetchClinicalAttributesUsingPOST"       
## [4] "getAllClinicalAttributesInStudyUsingGET"
## [5] "getAllClinicalAttributesUsingGET"       
## [6] "getClinicalAttributeInStudyUsingGET"searchOps(cbio, "clinical")## [1] "getAllClinicalAttributesUsingGET"          
## [2] "fetchClinicalAttributesUsingPOST"          
## [3] "fetchClinicalDataUsingPOST"                
## [4] "getAllClinicalAttributesInStudyUsingGET"   
## [5] "getClinicalAttributeInStudyUsingGET"       
## [6] "getAllClinicalDataInStudyUsingGET"         
## [7] "fetchAllClinicalDataInStudyUsingPOST"      
## [8] "getAllClinicalDataOfPatientInStudyUsingGET"
## [9] "getAllClinicalDataOfSampleInStudyUsingGET"Get the list of studies available:
getStudies(cbio)## # A tibble: 322 × 13
##    name      description     publicStudy pmid  citation groups status importDate
##    <chr>     <chr>           <lgl>       <chr> <chr>    <chr>   <int> <chr>     
##  1 Pan-Lung… "Whole-exome s… TRUE        2715… TCGA, N… ""          0 2021-04-0…
##  2 Head and… "TCGA Head and… TRUE        <NA>  <NA>     "PUBL…      0 2021-04-2…
##  3 Breast I… "Whole-exome s… TRUE        2645… TCGA, C… "PUBL…      0 2021-04-2…
##  4 Ovarian … "Whole exome s… TRUE        2172… TCGA, N… "PUBL…      0 2021-04-2…
##  5 Uterine … "Whole exome s… TRUE        2363… TCGA, N… "PUBL…      0 2021-04-2…
##  6 Bladder … "Whole-exome s… TRUE        2898… Roberts… "PUBL…      0 2021-04-2…
##  7 Cervical… "TCGA Cervical… TRUE        <NA>  <NA>     "PUBL…      0 2021-04-2…
##  8 Cholangi… "TCGA Cholangi… TRUE        <NA>  <NA>     "PUBL…      0 2021-04-2…
##  9 Kidney C… "TCGA Kidney C… TRUE        <NA>  <NA>     "PUBL…      0 2021-04-2…
## 10 Colorect… "TCGA Colorect… TRUE        <NA>  <NA>     "PUBL…      0 2021-04-2…
## # … with 312 more rows, and 5 more variables: allSampleCount <int>,
## #   readPermission <lgl>, studyId <chr>, cancerTypeId <chr>,
## #   referenceGenome <chr>Obtain the clinical data for a particular study:
clinicalData(cbio, "acc_tcga")## # A tibble: 92 × 85
##    patientId    AGE   AJCC_PATHOLOGIC_T… ATYPICAL_MITOTIC_F… CAPSULAR_INVASION  
##    <chr>        <chr> <chr>              <chr>               <chr>              
##  1 TCGA-OR-A5J1 58    Stage II           Atypical Mitotic F… Invasion of Tumor …
##  2 TCGA-OR-A5J2 44    Stage IV           Atypical Mitotic F… Invasion of Tumor …
##  3 TCGA-OR-A5J3 23    Stage III          Atypical Mitotic F… Invasion of Tumor …
##  4 TCGA-OR-A5J4 23    Stage IV           Atypical Mitotic F… Invasion of Tumor …
##  5 TCGA-OR-A5J5 30    Stage III          Atypical Mitotic F… Invasion of Tumor …
##  6 TCGA-OR-A5J6 29    Stage II           Atypical Mitotic F… Invasion of Tumor …
##  7 TCGA-OR-A5J7 30    Stage III          Atypical Mitotic F… Invasion of Tumor …
##  8 TCGA-OR-A5J8 66    Stage III          Atypical Mitotic F… Invasion of Tumor …
##  9 TCGA-OR-A5J9 22    Stage II           Atypical Mitotic F… Invasion of Tumor …
## 10 TCGA-OR-A5JA 53    Stage IV           Atypical Mitotic F… Invasion of Tumor …
## # … with 82 more rows, and 80 more variables: 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>,
## #   HISTORY_ADRENAL_HORMONE_EXCESS <chr>, …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_rppa"                                     
## [2] "acc_tcga_rppa_Zscores"                             
## [3] "acc_tcga_gistic"                                   
## [4] "acc_tcga_rna_seq_v2_mrna"                          
## [5] "acc_tcga_rna_seq_v2_mrna_median_Zscores"           
## [6] "acc_tcga_linear_CNA"                               
## [7] "acc_tcga_methylation_hm450"                        
## [8] "acc_tcga_mutations"                                
## [9] "acc_tcga_rna_seq_v2_mrna_median_all_sample_Zscores"The data for a molecular profile can be obtained with prior knowledge of
available entrezGeneIds:
molecularData(cbio, molecularProfileId = "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 molecularProfile… sampleId 
##   <chr>              <chr>                     <int> <chr>             <chr>    
## 1 VENHQS1PUi1BNUoxL… VENHQS1PUi1BNUoxO…            1 acc_tcga_rna_seq… TCGA-OR-…
## 2 VENHQS1PUi1BNUoxL… VENHQS1PUi1BNUoxO…            2 acc_tcga_rna_seq… TCGA-OR-…
## 3 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…            1 acc_tcga_rna_seq… TCGA-OR-…
## 4 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…            2 acc_tcga_rna_seq… TCGA-OR-…
## # … with 3 more variables: patientId <chr>, studyId <chr>, value <dbl>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       -93550 PRRC2C_PS2694   phosphoprotein
##  2       -92879 PCDHGC3_PS780   phosphoprotein
##  3       -92971 TNRC6B_PS576    phosphoprotein
##  4       -93606 PTGDR2_PS325    phosphoprotein
##  5       -92839 SYNPO2_PY661    phosphoprotein
##  6       -92970 TNRC6B_PS573    phosphoprotein
##  7       -93595 CDC42BPB_PS1686 phosphoprotein
##  8       -93013 SATB2_PS294     phosphoprotein
##  9       -93351 ZNF337_PS148    phosphoprotein
## 10       -93582 PCYT1B_PS315    phosphoprotein
## # … with 990 more rowsgenePanels(cbio)## # A tibble: 52 × 2
##    description                                               genePanelId        
##    <chr>                                                     <chr>              
##  1 Targeted (27 cancer genes) sequencing of adenoid cystic … ACYC_FMI_27        
##  2 Targeted panel of 8 genes.                                AmpliSeq           
##  3 ARCHER-SOLID Gene Panel (62 genes)                        ARCHER-SOLID-CV1   
##  4 Targeted sequencing of various tumor types via bait v3.   bait_v3            
##  5 Targeted sequencing of various tumor types via bait v4.   bait_v4            
##  6 Targeted sequencing of various tumor types via bait v5.   bait_v5            
##  7 Foundation Medicine T5a gene panel (323 genes)            FMI-T5a            
##  8 Foundation Medicine T7 gene panel (429 genes)             FMI-T7             
##  9 Foundation Medicine T5 gene panel (326 genes)             glioma_mskcc_2019_…
## 10 Foundation Medicine T7 gene panel (434 genes)             glioma_mskcc_2019_…
## # … with 42 more rowsgetGenePanel(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            
## # … with 331 more rowsgprppa <- genePanelMolecular(cbio,
    molecularProfileId = "acc_tcga_rppa",
    sampleListId = "acc_tcga_all")
gprppa## # A tibble: 92 × 7
##    uniqueSampleKey  uniquePatientKey molecularProfil… sampleId patientId studyId
##    <chr>            <chr>            <chr>            <chr>    <chr>     <chr>  
##  1 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  2 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  3 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  4 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  5 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  6 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  7 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  8 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
##  9 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
## 10 VENHQS1PUi1BNUp… VENHQS1PUi1BNUp… acc_tcga_rppa    TCGA-OR… TCGA-OR-… acc_tc…
## # … with 82 more rows, and 1 more variable: profiled <lgl>getGenePanelMolecular(cbio,
    molecularProfileIds = c("acc_tcga_rppa", "acc_tcga_gistic"),
    sampleIds = allSamples(cbio, "acc_tcga")$sampleId
)## # A tibble: 184 × 7
##    uniqueSampleKey  uniquePatientKey molecularProfil… sampleId patientId studyId
##    <chr>            <chr>            <chr>            <chr>    <chr>     <chr>  
##  1 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  2 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  3 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  4 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  5 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  6 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  7 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  8 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
##  9 VENHQS1PUi1BNUo… VENHQS1PUi1BNUo… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
## 10 VENHQS1PUi1BNUp… VENHQS1PUi1BNUp… acc_tcga_gistic  TCGA-OR… TCGA-OR-… acc_tc…
## # … with 174 more rows, and 1 more variable: profiled <lgl>getDataByGenePanel(cbio, "acc_tcga", genePanelId = "IMPACT341",
    molecularProfileId = "acc_tcga_rppa", sampleListId = "acc_tcga_rppa")## Warning: 'getDataByGenePanel' is deprecated.
## Use 'getDataByGenes' instead.
## See help("Deprecated")## $acc_tcga_rppa
## # A tibble: 2,622 × 9
##    uniqueSampleKey    uniquePatientKey   entrezGeneId molecularProfil… sampleId 
##    <chr>              <chr>                     <int> <chr>            <chr>    
##  1 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…         5728 acc_tcga_rppa    TCGA-OR-…
##  2 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…          595 acc_tcga_rppa    TCGA-OR-…
##  3 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…          596 acc_tcga_rppa    TCGA-OR-…
##  4 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…        10413 acc_tcga_rppa    TCGA-OR-…
##  5 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…         3791 acc_tcga_rppa    TCGA-OR-…
##  6 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…         7157 acc_tcga_rppa    TCGA-OR-…
##  7 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…          207 acc_tcga_rppa    TCGA-OR-…
##  8 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…          208 acc_tcga_rppa    TCGA-OR-…
##  9 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…        57521 acc_tcga_rppa    TCGA-OR-…
## 10 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO…         2064 acc_tcga_rppa    TCGA-OR-…
## # … with 2,612 more rows, and 4 more variables: patientId <chr>, studyId <chr>,
## #   value <dbl>, hugoGeneSymbol <chr>It uses the getAllGenesUsingGET function from the API.
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_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…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-01This 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-01allSamples(cbio, "acc_tcga")## # A tibble: 92 × 6
##    uniqueSampleKey    uniquePatientKey   sampleType  sampleId  patientId studyId
##    <chr>              <chr>              <chr>       <chr>     <chr>     <chr>  
##  1 VENHQS1PUi1BNUoxL… VENHQS1PUi1BNUoxO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  2 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  3 VENHQS1PUi1BNUozL… VENHQS1PUi1BNUozO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  4 VENHQS1PUi1BNUo0L… VENHQS1PUi1BNUo0O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  5 VENHQS1PUi1BNUo1L… VENHQS1PUi1BNUo1O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  6 VENHQS1PUi1BNUo2L… VENHQS1PUi1BNUo2O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  7 VENHQS1PUi1BNUo3L… VENHQS1PUi1BNUo3O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  8 VENHQS1PUi1BNUo4L… VENHQS1PUi1BNUo4O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  9 VENHQS1PUi1BNUo5L… VENHQS1PUi1BNUo5O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
## 10 VENHQS1PUi1BNUpBL… VENHQS1PUi1BNUpBO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
## # … with 82 more rowsgetSampleInfo(cbio, studyId = "acc_tcga",
    sampleListIds = c("acc_tcga_rppa", "acc_tcga_gistic"))## # A tibble: 46 × 6
##    uniqueSampleKey    uniquePatientKey   sampleType  sampleId  patientId studyId
##    <chr>              <chr>              <chr>       <chr>     <chr>     <chr>  
##  1 VENHQS1PUi1BNUoyL… VENHQS1PUi1BNUoyO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  2 VENHQS1PUi1BNUozL… VENHQS1PUi1BNUozO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  3 VENHQS1PUi1BNUo2L… VENHQS1PUi1BNUo2O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  4 VENHQS1PUi1BNUo3L… VENHQS1PUi1BNUo3O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  5 VENHQS1PUi1BNUo4L… VENHQS1PUi1BNUo4O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  6 VENHQS1PUi1BNUo5L… VENHQS1PUi1BNUo5O… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  7 VENHQS1PUi1BNUpBL… VENHQS1PUi1BNUpBO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  8 VENHQS1PUi1BNUpQL… VENHQS1PUi1BNUpQO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
##  9 VENHQS1PUi1BNUpSL… VENHQS1PUi1BNUpSO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
## 10 VENHQS1PUi1BNUpTL… VENHQS1PUi1BNUpTO… Primary So… TCGA-OR-… TCGA-OR-… acc_tc…
## # … with 36 more rowsThe 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 A1BGThen the user can provide such input:
(resp <- cbio$getGeneUsingGET("BRCA1"))## Response [https://www.cbioportal.org/api/genes/BRCA1]
##   Date: 2021-10-07 11:04
##   Status: 200
##   Content-Type: application/json
##   Size: 69 Bwhich will require the user to ‘translate’ the response using httr::content:
httr::content(resp)## $entrezGeneId
## [1] 672
## 
## $hugoGeneSymbol
## [1] "BRCA1"
## 
## $type
## [1] "protein-coding"For users who wish to clear the entire cBioPortalData cache, it is
recommended that they use:
unlink("~/.cache/cBioPortalData/")sessionInfo()## R version 4.1.1 (2021-08-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.13-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.13-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] survminer_0.4.9             ggpubr_0.4.0               
##  [3] ggplot2_3.3.5               survival_3.2-13            
##  [5] cBioPortalData_2.4.10       MultiAssayExperiment_1.18.0
##  [7] SummarizedExperiment_1.22.0 Biobase_2.52.0             
##  [9] GenomicRanges_1.44.0        GenomeInfoDb_1.28.4        
## [11] IRanges_2.26.0              S4Vectors_0.30.2           
## [13] BiocGenerics_0.38.0         MatrixGenerics_1.4.3       
## [15] matrixStats_0.61.0          AnVIL_1.4.1                
## [17] dplyr_1.0.7                 BiocStyle_2.20.2           
## 
## loaded via a namespace (and not attached):
##   [1] readxl_1.3.1              backports_1.2.1          
##   [3] BiocFileCache_2.0.0       RCircos_1.2.1            
##   [5] splines_4.1.1             BiocParallel_1.26.2      
##   [7] TCGAutils_1.12.0          digest_0.6.28            
##   [9] htmltools_0.5.2           magick_2.7.3             
##  [11] fansi_0.5.0               magrittr_2.0.1           
##  [13] memoise_2.0.0             tzdb_0.1.2               
##  [15] openxlsx_4.2.4            limma_3.48.3             
##  [17] Biostrings_2.60.2         readr_2.0.2              
##  [19] vroom_1.5.5               prettyunits_1.1.1        
##  [21] colorspace_2.0-2          blob_1.2.2               
##  [23] rvest_1.0.1               rappdirs_0.3.3           
##  [25] haven_2.4.3               xfun_0.26                
##  [27] crayon_1.4.1              RCurl_1.98-1.5           
##  [29] jsonlite_1.7.2            RaggedExperiment_1.16.0  
##  [31] zoo_1.8-9                 glue_1.4.2               
##  [33] GenomicDataCommons_1.16.0 gtable_0.3.0             
##  [35] zlibbioc_1.38.0           XVector_0.32.0           
##  [37] DelayedArray_0.18.0       car_3.0-11               
##  [39] abind_1.4-5               scales_1.1.1             
##  [41] futile.options_1.0.1      DBI_1.1.1                
##  [43] rstatix_0.7.0             Rcpp_1.0.7               
##  [45] gridtext_0.1.4            xtable_1.8-4             
##  [47] progress_1.2.2            foreign_0.8-81           
##  [49] bit_4.0.4                 km.ci_0.5-2              
##  [51] httr_1.4.2                ellipsis_0.3.2           
##  [53] farver_2.1.0              pkgconfig_2.0.3          
##  [55] XML_3.99-0.8              rapiclient_0.1.3         
##  [57] sass_0.4.0                dbplyr_2.1.1             
##  [59] utf8_1.2.2                RJSONIO_1.3-1.6          
##  [61] labeling_0.4.2            tidyselect_1.1.1         
##  [63] rlang_0.4.11              AnnotationDbi_1.54.1     
##  [65] munsell_0.5.0             cellranger_1.1.0         
##  [67] tools_4.1.1               cachem_1.0.6             
##  [69] cli_3.0.1                 generics_0.1.0           
##  [71] RSQLite_2.2.8             broom_0.7.9              
##  [73] evaluate_0.14             stringr_1.4.0            
##  [75] fastmap_1.1.0             yaml_2.2.1               
##  [77] knitr_1.36                bit64_4.0.5              
##  [79] zip_2.2.0                 survMisc_0.5.5           
##  [81] purrr_0.3.4               KEGGREST_1.32.0          
##  [83] formatR_1.11              xml2_1.3.2               
##  [85] biomaRt_2.48.3            compiler_4.1.1           
##  [87] filelock_1.0.2            curl_4.3.2               
##  [89] png_0.1-7                 ggsignif_0.6.3           
##  [91] tibble_3.1.5              bslib_0.3.1              
##  [93] stringi_1.7.5             highr_0.9                
##  [95] futile.logger_1.4.3       GenomicFeatures_1.44.2   
##  [97] forcats_0.5.1             lattice_0.20-45          
##  [99] Matrix_1.3-4              markdown_1.1             
## [101] KMsurv_0.1-5              RTCGAToolbox_2.22.1      
## [103] vctrs_0.3.8               pillar_1.6.3             
## [105] lifecycle_1.0.1           BiocManager_1.30.16      
## [107] jquerylib_0.1.4           data.table_1.14.2        
## [109] bitops_1.0-7              rtracklayer_1.52.1       
## [111] R6_2.5.1                  BiocIO_1.2.0             
## [113] bookdown_0.24             gridExtra_2.3            
## [115] rio_0.5.27                codetools_0.2-18         
## [117] lambda.r_1.2.4            assertthat_0.2.1         
## [119] rjson_0.2.20              withr_2.4.2              
## [121] GenomicAlignments_1.28.0  Rsamtools_2.8.0          
## [123] GenomeInfoDbData_1.2.6    ggtext_0.1.1             
## [125] hms_1.1.1                 grid_4.1.1               
## [127] tidyr_1.1.4               rmarkdown_2.11           
## [129] carData_3.0-4             restfulr_0.0.13