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: 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…
## # … with 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 58 more elements
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…
## # … with 55 more rows
head(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: 365 × 13
## name descr…¹ publi…² groups status impor…³ allSa…⁴ readP…⁵ studyId cance…⁶
## <chr> <chr> <lgl> <chr> <int> <chr> <int> <lgl> <chr> <chr>
## 1 Adreno… "TCGA … TRUE "PUBL… 0 2022-1… 92 TRUE acc_tc… acc
## 2 Acute … "Compr… TRUE "PUBL… 0 2022-1… 93 TRUE all_st… bll
## 3 Hypodi… "Whole… TRUE "" 0 2022-1… 44 TRUE all_st… myeloid
## 4 Adenoi… "Whole… TRUE "ACYC… 0 2022-1… 12 TRUE acbc_m… acbc
## 5 Adenoi… "Targe… TRUE "ACYC… 0 2022-1… 28 TRUE acyc_f… acyc
## 6 Adenoi… "Whole… TRUE "ACYC… 0 2022-1… 25 TRUE acyc_j… acyc
## 7 Adenoi… "WGS o… TRUE "ACYC… 0 2022-1… 102 TRUE acyc_m… acyc
## 8 Adenoi… "Whole… TRUE "ACYC" 0 2022-1… 10 TRUE acyc_m… acyc
## 9 Adenoi… "Whole… TRUE "ACYC… 0 2022-1… 24 TRUE acyc_s… acyc
## 10 Acute … "Whole… TRUE "PUBL… 0 2022-1… 73 TRUE all_st… bll
## # … with 355 more rows, 3 more variables: referenceGenome <chr>, pmid <chr>,
## # citation <chr>, and abbreviated variable names ¹description, ²publicStudy,
## # ³importDate, ⁴allSampleCount, ⁵readPermission, ⁶cancerTypeId
Obtain the clinical data for a particular study:
clinicalData(cbio, "acc_tcga")
## # A tibble: 92 × 85
## patie…¹ AGE AJCC_…² ATYPI…³ CAPSU…⁴ CLIN_…⁵ CT_SC…⁶ CYTOP…⁷ DAYS_…⁸ DFS_M…⁹
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 TCGA-O… 58 Stage … Atypic… Invasi… M0 [Unkno… Cytopl… 0 24.77
## 2 TCGA-O… 44 Stage … Atypic… Invasi… M1 YES Cytopl… 0 9.49
## 3 TCGA-O… 23 Stage … Atypic… Invasi… M0 YES Cytopl… 0 37.75
## 4 TCGA-O… 23 Stage … Atypic… Invasi… M1 YES Cytopl… 0 4.14
## 5 TCGA-O… 30 Stage … Atypic… Invasi… M0 YES Cytopl… 0 1.64
## 6 TCGA-O… 29 Stage … Atypic… Invasi… M0 YES Cytopl… 0 88.80
## 7 TCGA-O… 30 Stage … Atypic… Invasi… M0 YES Cytopl… 0 5.32
## 8 TCGA-O… 66 Stage … Atypic… Invasi… M0 YES Cytopl… 0 17.41
## 9 TCGA-O… 22 Stage … Atypic… Invasi… M0 YES Cytopl… 0 13.60
## 10 TCGA-O… 53 Stage … Atypic… Invasi… M1 YES Cytopl… 0 <NA>
## # … with 82 more rows, 75 more variables: DFS_STATUS <chr>,
## # DIFFUSE_ARCHITECTURE <chr>, ETHNICITY <chr>, FORM_COMPLETION_DATE <chr>,
## # HISTOLOGICAL_DIAGNOSIS <chr>, HISTORY_ADRENAL_HORMONE_EXCESS <chr>,
## # HISTORY_BASIS_ADRENAL_HORMONE_DX <chr>, HISTORY_NEOADJUVANT_TRTYN <chr>,
## # HISTORY_OTHER_MALIGNANCY <chr>, ICD_10 <chr>, ICD_O_3_HISTOLOGY <chr>,
## # ICD_O_3_SITE <chr>, INFORMED_CONSENT_VERIFIED <chr>,
## # INITIAL_PATHOLOGIC_DX_YEAR <chr>, LATERALITY <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_linear_CNA"
## [5] "acc_tcga_mutations"
## [6] "acc_tcga_methylation_hm450"
## [7] "acc_tcga_rna_seq_v2_mrna"
## [8] "acc_tcga_rna_seq_v2_mrna_median_Zscores"
## [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 uniqu…¹ entre…² molec…³ sampl…⁴ patie…⁵ studyId value
## <chr> <chr> <int> <chr> <chr> <chr> <chr> <dbl>
## 1 VENHQS1PUi1BNUoxLTAxOm… VENHQS… 1 acc_tc… TCGA-O… TCGA-O… acc_tc… 1.63e1
## 2 VENHQS1PUi1BNUoxLTAxOm… VENHQS… 2 acc_tc… TCGA-O… TCGA-O… acc_tc… 1.04e4
## 3 VENHQS1PUi1BNUoyLTAxOm… VENHQS… 1 acc_tc… TCGA-O… TCGA-O… acc_tc… 9.60e0
## 4 VENHQS1PUi1BNUoyLTAxOm… VENHQS… 2 acc_tc… TCGA-O… TCGA-O… acc_tc… 9.84e3
## # … with abbreviated variable names ¹uniquePatientKey, ²entrezGeneId,
## # ³molecularProfileId, ⁴sampleId, ⁵patientId
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 -3624 MIR-10A/10A miRNA
## 2 -3712 MIR-559/559 miRNA
## 3 -3042 MIR-4315-2/4315 miRNA
## 4 -3204 MIR-4535/4535 miRNA
## 5 -3763 MIR-607/607 miRNA
## 6 -3457 MIR-1269A/1269A miRNA
## 7 -3286 MIR-4679-1/4679 miRNA
## 8 -3295 MIR-4686/4686 miRNA
## 9 -3054 MIR-4325/4325 miRNA
## 10 -3510 MIR-124A-1/5P miRNA
## # … with 990 more rows
genePanels(cbio)
## # A tibble: 55 × 2
## description geneP…¹
## <chr> <chr>
## 1 Targeted (27 cancer genes) sequencing of adenoid cystic carcinomas o… ACYC_F…
## 2 Targeted panel of 232 genes. Agilent
## 3 Targeted panel of 8 genes. AmpliS…
## 4 ARCHER-HEME gene panel (199 genes) ARCHER…
## 5 ARCHER-SOLID Gene Panel (62 genes) ARCHER…
## 6 Targeted sequencing of various tumor types via bait v3. bait_v3
## 7 Targeted sequencing of various tumor types via bait v4. bait_v4
## 8 Targeted sequencing of various tumor types via bait v5. bait_v5
## 9 Targeted panel of 387 cancer-related genes. bcc_un…
## 10 Research (CMO) IMPACT-Heme gene panel version 3. HemePA…
## # … with 45 more rows, and abbreviated variable name ¹genePanelId
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
## # … with 331 more rows
gprppa <- genePanelMolecular(cbio,
molecularProfileId = "acc_tcga_rppa",
sampleListId = "acc_tcga_all")
gprppa
## # A tibble: 92 × 7
## uniqueSampleKey uniqu…¹ molec…² sampl…³ patie…⁴ studyId profi…⁵
## <chr> <chr> <chr> <chr> <chr> <chr> <lgl>
## 1 VENHQS1PUi1BNUoxLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… FALSE
## 2 VENHQS1PUi1BNUoyLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 3 VENHQS1PUi1BNUozLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 4 VENHQS1PUi1BNUo0LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… FALSE
## 5 VENHQS1PUi1BNUo1LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… FALSE
## 6 VENHQS1PUi1BNUo2LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 7 VENHQS1PUi1BNUo3LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 8 VENHQS1PUi1BNUo4LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 9 VENHQS1PUi1BNUo5LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 10 VENHQS1PUi1BNUpBLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## # … with 82 more rows, and abbreviated variable names ¹uniquePatientKey,
## # ²molecularProfileId, ³sampleId, ⁴patientId, ⁵profiled
getGenePanelMolecular(cbio,
molecularProfileIds = c("acc_tcga_rppa", "acc_tcga_gistic"),
sampleIds = allSamples(cbio, "acc_tcga")$sampleId
)
## # A tibble: 184 × 7
## uniqueSampleKey uniqu…¹ molec…² sampl…³ patie…⁴ studyId profi…⁵
## <chr> <chr> <chr> <chr> <chr> <chr> <lgl>
## 1 VENHQS1PUi1BNUoxLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 2 VENHQS1PUi1BNUoyLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 3 VENHQS1PUi1BNUozLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 4 VENHQS1PUi1BNUo0LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 5 VENHQS1PUi1BNUo1LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 6 VENHQS1PUi1BNUo2LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 7 VENHQS1PUi1BNUo3LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 8 VENHQS1PUi1BNUo4LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 9 VENHQS1PUi1BNUo5LTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## 10 VENHQS1PUi1BNUpBLTAxOmFjY190… VENHQS… acc_tc… TCGA-O… TCGA-O… acc_tc… TRUE
## # … with 174 more rows, and abbreviated variable names ¹uniquePatientKey,
## # ²molecularProfileId, ³sampleId, ⁴patientId, ⁵profiled
getDataByGenes(cbio, "acc_tcga", genePanelId = "IMPACT341",
molecularProfileId = "acc_tcga_rppa", sampleListId = "acc_tcga_rppa")
## $acc_tcga_rppa
## # A tibble: 2,622 × 9
## uniqueSampl…¹ uniqu…² entre…³ molec…⁴ sampl…⁵ patie…⁶ studyId value hugoG…⁷
## <chr> <chr> <int> <chr> <chr> <chr> <chr> <dbl> <chr>
## 1 VENHQS1PUi1B… VENHQS… 5728 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.303 PTEN
## 2 VENHQS1PUi1B… VENHQS… 595 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.151 CCND1
## 3 VENHQS1PUi1B… VENHQS… 596 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.0994 BCL2
## 4 VENHQS1PUi1B… VENHQS… 10413 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.147 YAP1
## 5 VENHQS1PUi1B… VENHQS… 3791 acc_tc… TCGA-O… TCGA-O… acc_tc… -0.268 KDR
## 6 VENHQS1PUi1B… VENHQS… 7157 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.0161 TP53
## 7 VENHQS1PUi1B… VENHQS… 207 acc_tc… TCGA-O… TCGA-O… acc_tc… -0.580 AKT1
## 8 VENHQS1PUi1B… VENHQS… 208 acc_tc… TCGA-O… TCGA-O… acc_tc… -0.580 AKT2
## 9 VENHQS1PUi1B… VENHQS… 57521 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.0258 RPTOR
## 10 VENHQS1PUi1B… VENHQS… 2064 acc_tc… TCGA-O… TCGA-O… acc_tc… 0.130 ERBB2
## # … with 2,612 more rows, and abbreviated variable names ¹uniqueSampleKey,
## # ²uniquePatientKey, ³entrezGeneId, ⁴molecularProfileId, ⁵sampleId,
## # ⁶patientId, ⁷hugoGeneSymbol
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 descr…¹ sampl…² studyId
## <chr> <chr> <chr> <chr> <chr>
## 1 all_cases_with_mrna_rnaseq_data Samples… Sample… acc_tc… acc_tc…
## 2 all_cases_in_study All sam… All sa… acc_tc… acc_tc…
## 3 all_cases_with_cna_data Samples… Sample… acc_tc… acc_tc…
## 4 all_cases_with_mutation_and_cna_data Samples… Sample… acc_tc… acc_tc…
## 5 all_cases_with_mutation_and_cna_and_mrna_data Complet… Sample… acc_tc… acc_tc…
## 6 all_cases_with_methylation_data Samples… Sample… acc_tc… acc_tc…
## 7 all_cases_with_methylation_data Samples… Sample… acc_tc… acc_tc…
## 8 all_cases_with_rppa_data Samples… Sample… acc_tc… acc_tc…
## 9 all_cases_with_mutation_data Samples… Sample… acc_tc… acc_tc…
## # … with abbreviated variable names ¹description, ²sampleListId
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
allSamples(cbio, "acc_tcga")
## # A tibble: 92 × 6
## uniqueSampleKey uniquePati…¹ sampl…² sampl…³ patie…⁴ studyId
## <chr> <chr> <chr> <chr> <chr> <chr>
## 1 VENHQS1PUi1BNUoxLTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 2 VENHQS1PUi1BNUoyLTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 3 VENHQS1PUi1BNUozLTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 4 VENHQS1PUi1BNUo0LTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 5 VENHQS1PUi1BNUo1LTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 6 VENHQS1PUi1BNUo2LTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 7 VENHQS1PUi1BNUo3LTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 8 VENHQS1PUi1BNUo4LTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 9 VENHQS1PUi1BNUo5LTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## 10 VENHQS1PUi1BNUpBLTAxOmFjY190Y2dh VENHQS1PUi1… Primar… TCGA-O… TCGA-O… acc_tc…
## # … with 82 more rows, and abbreviated variable names ¹uniquePatientKey,
## # ²sampleType, ³sampleId, ⁴patientId
getSampleInfo(cbio, studyId = "acc_tcga",
sampleListIds = c("acc_tcga_rppa", "acc_tcga_gistic"))
## # A tibble: 1 × 1
## message
## <chr>
## 1 Sample list not found: acc_tcga_gistic
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: 2023-01-04 21:24
## 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"
For users who wish to clear the entire cBioPortalData
cache, it is
recommended that they use:
unlink("~/.cache/cBioPortalData/")
sessionInfo()
## R version 4.2.2 (2022-10-31)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.5 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.16-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.16-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] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] survminer_0.4.9 ggpubr_0.5.0
## [3] ggplot2_3.4.0 survival_3.4-0
## [5] cBioPortalData_2.10.3 MultiAssayExperiment_1.24.0
## [7] SummarizedExperiment_1.28.0 Biobase_2.58.0
## [9] GenomicRanges_1.50.2 GenomeInfoDb_1.34.6
## [11] IRanges_2.32.0 S4Vectors_0.36.1
## [13] BiocGenerics_0.44.0 MatrixGenerics_1.10.0
## [15] matrixStats_0.63.0 AnVIL_1.10.1
## [17] dplyr_1.0.10 BiocStyle_2.26.0
##
## loaded via a namespace (and not attached):
## [1] backports_1.4.1 BiocBaseUtils_1.0.0
## [3] BiocFileCache_2.6.0 RCircos_1.2.2
## [5] splines_4.2.2 BiocParallel_1.32.5
## [7] TCGAutils_1.18.0 digest_0.6.31
## [9] htmltools_0.5.4 magick_2.7.3
## [11] fansi_1.0.3 magrittr_2.0.3
## [13] memoise_2.0.1 tzdb_0.3.0
## [15] limma_3.54.0 Biostrings_2.66.0
## [17] readr_2.1.3 vroom_1.6.0
## [19] prettyunits_1.1.1 colorspace_2.0-3
## [21] blob_1.2.3 rvest_1.0.3
## [23] rappdirs_0.3.3 xfun_0.36
## [25] crayon_1.5.2 RCurl_1.98-1.9
## [27] jsonlite_1.8.4 RaggedExperiment_1.22.0
## [29] zoo_1.8-11 glue_1.6.2
## [31] GenomicDataCommons_1.22.0 gtable_0.3.1
## [33] zlibbioc_1.44.0 XVector_0.38.0
## [35] DelayedArray_0.24.0 car_3.1-1
## [37] abind_1.4-5 scales_1.2.1
## [39] futile.options_1.0.1 DBI_1.1.3
## [41] rstatix_0.7.1 miniUI_0.1.1.1
## [43] Rcpp_1.0.9 gridtext_0.1.5
## [45] xtable_1.8-4 progress_1.2.2
## [47] archive_1.1.5 bit_4.0.5
## [49] km.ci_0.5-6 DT_0.26
## [51] htmlwidgets_1.6.0 httr_1.4.4
## [53] ellipsis_0.3.2 farver_2.1.1
## [55] pkgconfig_2.0.3 XML_3.99-0.13
## [57] rapiclient_0.1.3 sass_0.4.4
## [59] dbplyr_2.2.1 utf8_1.2.2
## [61] RJSONIO_1.3-1.6 labeling_0.4.2
## [63] tidyselect_1.2.0 rlang_1.0.6
## [65] later_1.3.0 AnnotationDbi_1.60.0
## [67] munsell_0.5.0 tools_4.2.2
## [69] cachem_1.0.6 cli_3.5.0
## [71] generics_0.1.3 RSQLite_2.2.20
## [73] broom_1.0.2 evaluate_0.19
## [75] stringr_1.5.0 fastmap_1.1.0
## [77] yaml_2.3.6 knitr_1.41
## [79] bit64_4.0.5 survMisc_0.5.6
## [81] purrr_1.0.0 KEGGREST_1.38.0
## [83] mime_0.12 formatR_1.13
## [85] xml2_1.3.3 biomaRt_2.54.0
## [87] compiler_4.2.2 filelock_1.0.2
## [89] curl_4.3.3 png_0.1-8
## [91] ggsignif_0.6.4 tibble_3.1.8
## [93] bslib_0.4.2 stringi_1.7.8
## [95] highr_0.10 futile.logger_1.4.3
## [97] GenomicFeatures_1.50.3 lattice_0.20-45
## [99] Matrix_1.5-3 commonmark_1.8.1
## [101] markdown_1.4 KMsurv_0.1-5
## [103] RTCGAToolbox_2.28.0 vctrs_0.5.1
## [105] pillar_1.8.1 lifecycle_1.0.3
## [107] BiocManager_1.30.19 jquerylib_0.1.4
## [109] data.table_1.14.6 bitops_1.0-7
## [111] httpuv_1.6.7 rtracklayer_1.58.0
## [113] R6_2.5.1 BiocIO_1.8.0
## [115] bookdown_0.31 promises_1.2.0.1
## [117] gridExtra_2.3 codetools_0.2-18
## [119] lambda.r_1.2.4 assertthat_0.2.1
## [121] rjson_0.2.21 withr_2.5.0
## [123] GenomicAlignments_1.34.0 Rsamtools_2.14.0
## [125] GenomeInfoDbData_1.2.9 ggtext_0.1.2
## [127] parallel_4.2.2 hms_1.1.2
## [129] grid_4.2.2 tidyr_1.2.1
## [131] rmarkdown_2.19 carData_3.0-5
## [133] shiny_1.7.4 restfulr_0.0.15