This vignette aims to help developers migrate from the now defunct cgdsr
CRAN package. Note that the cgdsr
package code is shown for comparison but it
is not guaranteed to work. If you have questions regarding the contents,
please create an issue at the GitHub repository:
https://github.com/waldronlab/cBioPortalData/issues
library(cBioPortalData)
cBioPortalData
setupHere we show the default inputs to the cBioPortal function for clarity.
cbio <- cBioPortal(
hostname = "www.cbioportal.org",
protocol = "https",
api. = "/api/api-docs"
)
getStudies(cbio)
FALSE # A tibble: 344 × 13
FALSE name description publicStudy groups status importDate allSampleCount
FALSE <chr> <chr> <lgl> <chr> <int> <chr> <int>
FALSE 1 Adrenocortic… "TCGA Adre… TRUE "PUBL… 0 2022-03-0… 92
FALSE 2 Bladder Canc… "Whole exo… TRUE "" 0 2022-03-0… 34
FALSE 3 Basal Cell C… "Whole-exo… TRUE "PUBL… 0 2022-03-0… 293
FALSE 4 Acute Lympho… "Comprehen… TRUE "PUBL… 0 2022-03-0… 93
FALSE 5 Ampullary Ca… "Exome seq… TRUE "PUBL… 0 2022-03-0… 160
FALSE 6 Bladder Urot… "Whole exo… TRUE "PUBL… 0 2022-03-0… 50
FALSE 7 Bladder Canc… "Comprehen… TRUE "PUBL… 0 2022-03-0… 97
FALSE 8 Bladder Urot… "Whole-exo… TRUE "PUBL… 0 2022-03-0… 99
FALSE 9 Bladder Canc… "Genomic P… TRUE "PUBL… 0 2022-03-0… 109
FALSE 10 Hypodiploid … "Whole gen… TRUE "" 0 2022-03-0… 44
FALSE # … with 334 more rows, and 6 more variables: readPermission <lgl>,
FALSE # studyId <chr>, cancerTypeId <chr>, referenceGenome <chr>, pmid <chr>,
FALSE # citation <chr>
Note that the studyId
column is important for further queries.
head(getStudies(cbio)[["studyId"]])
## [1] "acc_tcga" "blca_plasmacytoid_mskcc_2016"
## [3] "bcc_unige_2016" "all_stjude_2015"
## [5] "ampca_bcm_2016" "blca_dfarber_mskcc_2014"
cgdsr
setuplibrary(cgdsr)
cgds <- CGDS("http://www.cbioportal.org/")
getCancerStudies.CGDS(cgds)
cBioPortalData
(Cases)patientId
.sampleListId
identifies groups of patientId
based on profile typesampleLists
function uses studyId
input to return sampleListId
For the sample list identifiers, you can use sampleLists
and inspect the
sampleListId
column.
samps <- sampleLists(cbio, "gbm_tcga_pub")
samps[, c("category", "name", "sampleListId")]
## # A tibble: 15 × 3
## category name sampleListId
## <chr> <chr> <chr>
## 1 all_cases_in_study All samples gbm_tcga_pu…
## 2 other Expression Cluster Classic… gbm_tcga_pu…
## 3 all_cases_with_cna_data Samples with CNA data gbm_tcga_pu…
## 4 all_cases_with_mutation_and_cna_data Samples with mutation and … gbm_tcga_pu…
## 5 all_cases_with_mrna_array_data Samples with mRNA data (Ag… gbm_tcga_pu…
## 6 other Expression Cluster Mesench… gbm_tcga_pu…
## 7 all_cases_with_methylation_data Samples with methylation d… gbm_tcga_pu…
## 8 all_cases_with_methylation_data Samples with methylation d… gbm_tcga_pu…
## 9 all_cases_with_microrna_data Samples with microRNA data… gbm_tcga_pu…
## 10 other Expression Cluster Neural gbm_tcga_pu…
## 11 other Expression Cluster Proneur… gbm_tcga_pu…
## 12 other Sequenced, No Hypermutators gbm_tcga_pu…
## 13 other Sequenced, Not Treated gbm_tcga_pu…
## 14 other Sequenced, Treated gbm_tcga_pu…
## 15 all_cases_with_mutation_data Samples with mutation data gbm_tcga_pu…
It is possible to get case_ids
directly when using the samplesInSampleLists
function. The function handles multiple sampleList
identifiers.
samplesInSampleLists(
api = cbio,
sampleListIds = c(
"gbm_tcga_pub_expr_classical", "gbm_tcga_pub_expr_mesenchymal"
)
)
## CharacterList of length 2
## [["gbm_tcga_pub_expr_classical"]] TCGA-02-0001-01 ... TCGA-12-0615-01
## [["gbm_tcga_pub_expr_mesenchymal"]] TCGA-02-0004-01 ... TCGA-12-0620-01
To get more information about patients, we can query with getSampleInfo
function.
getSampleInfo(api = cbio, studyId = "gbm_tcga_pub", projection = "SUMMARY")
## # A tibble: 206 × 6
## uniqueSampleKey uniquePatientKey sampleType sampleId patientId studyId
## <chr> <chr> <chr> <chr> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAxO… VENHQS0wMi0wMDA… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 2 VENHQS0wMi0wMDAzLTAxO… VENHQS0wMi0wMDA… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 3 VENHQS0wMi0wMDA0LTAxO… VENHQS0wMi0wMDA… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 4 VENHQS0wMi0wMDA2LTAxO… VENHQS0wMi0wMDA… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 5 VENHQS0wMi0wMDA3LTAxO… VENHQS0wMi0wMDA… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 6 VENHQS0wMi0wMDA5LTAxO… VENHQS0wMi0wMDA… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 7 VENHQS0wMi0wMDEwLTAxO… VENHQS0wMi0wMDE… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 8 VENHQS0wMi0wMDExLTAxO… VENHQS0wMi0wMDE… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 9 VENHQS0wMi0wMDE0LTAxO… VENHQS0wMi0wMDE… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## 10 VENHQS0wMi0wMDE1LTAxO… VENHQS0wMi0wMDE… Primary S… TCGA-02… TCGA-02-… gbm_tc…
## # … with 196 more rows
cgdsr
(Cases)case_id
.cancerStudy
identifiercase_list_description
describes the assaysgetCaseLists
and getClinicalData
We obtain the first case_list_id
in the cgds
object from above and the
corresponding clinical data for that case list (gbm_tcga_pub_all
as the case
list in this example).
clist1 <-
getCaseLists.CGDS(cgds, cancerStudy = "gbm_tcga_pub")[1, "case_list_id"]
getClinicalData.CGDS(cgds, clist1)
cBioPortalData
(Clinical)Note that a sampleListId
is not required when using the
fetchAllClinicalDataInStudyUsingPOST
internal endpoint. Data for all
patients can be obtained using the clinicalData
function.
clinicalData(cbio, "gbm_tcga_pub")
## # A tibble: 206 × 24
## patientId DFS_MONTHS DFS_STATUS KARNOFSKY_PERFORMANC… OS_MONTHS OS_STATUS
## <chr> <chr> <chr> <chr> <chr> <chr>
## 1 TCGA-02-0001 4.504109589 1:Recurred 80.0 11.60547… 1:DECEAS…
## 2 TCGA-02-0003 1.315068493 1:Recurred 100.0 4.734246… 1:DECEAS…
## 3 TCGA-02-0004 10.32328767 1:Recurred 80.0 11.34246… 1:DECEAS…
## 4 TCGA-02-0006 9.928767123 1:Recurred 80.0 18.34520… 1:DECEAS…
## 5 TCGA-02-0007 17.03013699 1:Recurred 80.0 23.17808… 1:DECEAS…
## 6 TCGA-02-0009 8.679452055 1:Recurred 80.0 10.58630… 1:DECEAS…
## 7 TCGA-02-0010 11.53972603 1:Recurred 80.0 35.40821… 1:DECEAS…
## 8 TCGA-02-0011 4.734246575 1:Recurred 80.0 20.71232… 1:DECEAS…
## 9 TCGA-02-0014 <NA> <NA> 100.0 82.55342… 1:DECEAS…
## 10 TCGA-02-0015 14.99178082 1:Recurred 80.0 20.61369… 1:DECEAS…
## # … with 196 more rows, and 18 more variables: PRETREATMENT_HISTORY <chr>,
## # PRIOR_GLIOMA <chr>, SAMPLE_COUNT <chr>, SEX <chr>, sampleId <chr>,
## # ACGH_DATA <chr>, CANCER_TYPE <chr>, CANCER_TYPE_DETAILED <chr>,
## # COMPLETE_DATA <chr>, FRACTION_GENOME_ALTERED <chr>, MRNA_DATA <chr>,
## # MUTATION_COUNT <chr>, ONCOTREE_CODE <chr>, SAMPLE_TYPE <chr>,
## # SEQUENCED <chr>, SOMATIC_STATUS <chr>, TMB_NONSYNONYMOUS <chr>,
## # TREATMENT_STATUS <chr>
You can use a different endpoint to obtain data for a single sample.
First, obtain a single sampleId
with the samplesInSampleLists
function.
clist1 <- "gbm_tcga_pub_all"
samplist <- samplesInSampleLists(cbio, clist1)
onesample <- samplist[["gbm_tcga_pub_all"]][1]
onesample
## [1] "TCGA-02-0001-01"
Then we use the API endpoint to retrieve the data. Note that you would run
httr::content
on the output to extract the data.
cbio$getAllClinicalDataOfSampleInStudyUsingGET(
sampleId = onesample, studyId = "gbm_tcga_pub"
)
## Response [https://www.cbioportal.org/api/studies/gbm_tcga_pub/samples/TCGA-02-0001-01/clinical-data]
## Date: 2022-06-16 20:07
## Status: 200
## Content-Type: application/json
## Size: 3.31 kB
cgdsr
(Clinical)getClinicalData
uses case_list_id
as input without specifying the
study_id
as case list identifiers are unique to each study.We query clinical data for the gbm_tcga_pub_expr_classical
case list
identifier which is part of the gbm_tcga_pub
study.
getClinicalData.CGDS(x = cgds,
caseList = "gbm_tcga_pub_expr_classical"
)
cgdsr
allows you to obtain clinical data for a case list subset
(54 cases with gbm_tcga_pub_expr_classical
) and cBioPortalData
provides
clinical data for all 206 samples in gbm_tcga_pub
using the clinicalData
function.
cgdsr
returns a data.frame
with sampleId
(TCGA.02.0009.01) but not
patientId
(TCGA.02.0009)cBioPortalData
returns sampleId
(TCGA-02-0009-01) and patientId
(TCGA-02-0009).cgdsr
provides case_id
s with .
and cBioPortalData
returns patientId
s
with -
.You may be interested in other clinical data endpoints. For a list, use
the searchOps
function.
searchOps(cbio, "clinical")
## [1] "getAllClinicalAttributesUsingGET"
## [2] "fetchClinicalAttributesUsingPOST"
## [3] "fetchClinicalDataUsingPOST"
## [4] "getAllClinicalAttributesInStudyUsingGET"
## [5] "getClinicalAttributeInStudyUsingGET"
## [6] "getAllClinicalDataInStudyUsingGET"
## [7] "fetchAllClinicalDataInStudyUsingPOST"
## [8] "getAllClinicalDataOfPatientInStudyUsingGET"
## [9] "getAllClinicalDataOfSampleInStudyUsingGET"
cBioPortalData
(molecularProfiles)molecularProfiles(api = cbio, studyId = "gbm_tcga_pub")
## # A tibble: 10 × 8
## molecularAlteration… datatype name description showProfileInAn… patientLevel
## <chr> <chr> <chr> <chr> <lgl> <lgl>
## 1 COPY_NUMBER_ALTERAT… DISCRETE Puta… Putative c… TRUE FALSE
## 2 COPY_NUMBER_ALTERAT… DISCRETE Puta… Putative c… TRUE FALSE
## 3 MUTATION_EXTENDED MAF Muta… Mutation d… TRUE FALSE
## 4 METHYLATION CONTINU… Meth… Methylatio… FALSE FALSE
## 5 MRNA_EXPRESSION CONTINU… mRNA… mRNA expre… FALSE FALSE
## 6 MRNA_EXPRESSION Z-SCORE mRNA… 18,698 gen… TRUE FALSE
## 7 MRNA_EXPRESSION Z-SCORE mRNA… Log-transf… TRUE FALSE
## 8 MRNA_EXPRESSION CONTINU… micr… expression… FALSE FALSE
## 9 MRNA_EXPRESSION Z-SCORE micr… microRNA e… FALSE FALSE
## 10 MRNA_EXPRESSION Z-SCORE mRNA… mRNA and m… TRUE FALSE
## # … with 2 more variables: molecularProfileId <chr>, studyId <chr>
Note that we want to pull the molecularProfileId
column to use in other
queries.
cgdsr
(getGeneticProfiles)getGeneticProfiles.CGDS(cgds, cancerStudy = "gbm_tcga_pub")
cBioPortalData
(Indentify samples and genes)Currently, some conversion is needed to directly use the molecularData
function, if you only have Hugo symbols. First, convert to Entrez gene IDs
and then obtain all the samples in the sample list of interest.
hugoGeneSymbol
to entrezGeneId
genetab <- queryGeneTable(cbio,
by = "hugoGeneSymbol",
genes = c("NF1", "TP53", "ABL1")
)
genetab
## # A tibble: 3 × 3
## entrezGeneId hugoGeneSymbol type
## <int> <chr> <chr>
## 1 4763 NF1 protein-coding
## 2 25 ABL1 protein-coding
## 3 7157 TP53 protein-coding
entrez <- genetab[["entrezGeneId"]]
allsamps <- samplesInSampleLists(cbio, "gbm_tcga_pub_all")
In the next section, we will show how to use the genes and sample identifiers to obtain the molecular profile data.
cgdsr
(Profile Data)The getProfileData
function allows for straightforward retrieval of the
molecular profile data with only a case list and genetic profile identifiers.
getProfileData.CGDS(x = cgds,
genes = c("NF1", "TP53", "ABL1"),
geneticProfiles = "gbm_tcga_pub_mrna",
caseList = "gbm_tcga_pub_all"
)
cBioPortalData
cBioPortalData
provides a number of options for retrieving molecular profile
data depending on the use case. Note that molecularData
is mostly used
internally and that the cBioPortalData
function is the user-friendly method
for downloading such data.
molecularData
We use the translated entrez
identifiers from above.
molecularData(cbio, "gbm_tcga_pub_mrna",
entrezGeneIds = entrez, sampleIds = unlist(allsamps))
## $gbm_tcga_pub_mrna
## # A tibble: 618 × 8
## uniqueSampleKey uniquePatientKey entrezGeneId molecularProfil… sampleId
## <chr> <chr> <int> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## 2 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_mr… TCGA-02…
## 3 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_mr… TCGA-02…
## 4 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## 5 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_mr… TCGA-02…
## 6 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_mr… TCGA-02…
## 7 VENHQS0wMi0wMDA0LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## 8 VENHQS0wMi0wMDA0LTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_mr… TCGA-02…
## 9 VENHQS0wMi0wMDA0LTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_mr… TCGA-02…
## 10 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## # … with 608 more rows, and 3 more variables: patientId <chr>, studyId <chr>,
## # value <dbl>
getDataByGenes
The getDataByGenes
function automatically figures out all the sample
identifiers in the study and it allows Hugo and Entrez identifiers, as well
as genePanelId
inputs.
getDataByGenes(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_mrna"
)
## $gbm_tcga_pub_mrna
## # A tibble: 618 × 10
## uniqueSampleKey uniquePatientKey entrezGeneId molecularProfil… sampleId
## <chr> <chr> <int> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## 2 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_mr… TCGA-02…
## 3 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_mr… TCGA-02…
## 4 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## 5 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_mr… TCGA-02…
## 6 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_mr… TCGA-02…
## 7 VENHQS0wMi0wMDA0LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## 8 VENHQS0wMi0wMDA0LTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_mr… TCGA-02…
## 9 VENHQS0wMi0wMDA0LTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_mr… TCGA-02…
## 10 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_mr… TCGA-02…
## # … with 608 more rows, and 5 more variables: patientId <chr>, studyId <chr>,
## # value <dbl>, hugoGeneSymbol <chr>, type <chr>
cBioPortalData
: the main end-user functionIt is important to note that end users who wish to obtain the data as
easily as possible should use the main cBioPortalData
function:
gbm_pub <- cBioPortalData(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"), by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_mrna"
)
assay(gbm_pub[["gbm_tcga_pub_mrna"]])[, 1:4]
## TCGA-02-0001-01 TCGA-02-0003-01 TCGA-02-0004-01 TCGA-02-0006-01
## ABL1 -0.1744878 -0.177096729 -0.08782114 -0.1733767
## NF1 -0.2966920 -0.001066810 -0.23626512 -0.1691507
## TP53 0.6213171 0.006435625 -0.30507285 0.3967758
cBioPortalData
(mutationData)Similar to molecularData
, mutation data can be obtained with the
mutationData
function or the getDataByGenes
function.
mutationData(
api = cbio,
molecularProfileIds = "gbm_tcga_pub_mutations",
entrezGeneIds = entrez,
sampleIds = unlist(allsamps)
)
## $gbm_tcga_pub_mutations
## # A tibble: 57 × 28
## uniqueSampleKey uniquePatientKey molecularProfil… sampleId patientId
## <chr> <chr> <chr> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 2 VENHQS0wMi0wMDAxLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 3 VENHQS0wMi0wMDAzLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 4 VENHQS0wMi0wMDAzLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 5 VENHQS0wMi0wMDEwLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 6 VENHQS0wMi0wMDEwLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 7 VENHQS0wMi0wMDEwLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 8 VENHQS0wMi0wMDExLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 9 VENHQS0wMi0wMDE0LTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 10 VENHQS0wMi0wMDI0LTAxOmd… VENHQS0wMi0wMDI… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## # … with 47 more rows, and 23 more variables: entrezGeneId <int>,
## # studyId <chr>, center <chr>, mutationStatus <chr>, validationStatus <chr>,
## # startPosition <int>, endPosition <int>, referenceAllele <chr>,
## # proteinChange <chr>, mutationType <chr>, functionalImpactScore <chr>,
## # fisValue <dbl>, linkXvar <chr>, linkPdb <chr>, linkMsa <chr>,
## # ncbiBuild <chr>, variantType <chr>, keyword <chr>, chr <chr>,
## # variantAllele <chr>, refseqMrnaId <chr>, proteinPosStart <int>, …
getDataByGenes(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_mutations"
)
## $gbm_tcga_pub_mutations
## # A tibble: 57 × 30
## uniqueSampleKey uniquePatientKey molecularProfil… sampleId patientId
## <chr> <chr> <chr> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 2 VENHQS0wMi0wMDAxLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 3 VENHQS0wMi0wMDAzLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 4 VENHQS0wMi0wMDAzLTAxOmd… VENHQS0wMi0wMDA… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 5 VENHQS0wMi0wMDEwLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 6 VENHQS0wMi0wMDEwLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 7 VENHQS0wMi0wMDEwLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 8 VENHQS0wMi0wMDExLTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 9 VENHQS0wMi0wMDE0LTAxOmd… VENHQS0wMi0wMDE… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## 10 VENHQS0wMi0wMDI0LTAxOmd… VENHQS0wMi0wMDI… gbm_tcga_pub_mu… TCGA-02… TCGA-02-…
## # … with 47 more rows, and 25 more variables: entrezGeneId <int>,
## # studyId <chr>, center <chr>, mutationStatus <chr>, validationStatus <chr>,
## # startPosition <int>, endPosition <int>, referenceAllele <chr>,
## # proteinChange <chr>, mutationType <chr>, functionalImpactScore <chr>,
## # fisValue <dbl>, linkXvar <chr>, linkPdb <chr>, linkMsa <chr>,
## # ncbiBuild <chr>, variantType <chr>, keyword <chr>, chr <chr>,
## # variantAllele <chr>, refseqMrnaId <chr>, proteinPosStart <int>, …
cgdsr
(getMutationData)getMutationData.CGDS(
x = cgds,
caseList = "getMutationData",
geneticProfile = "gbm_tcga_pub_mutations",
genes = c("NF1", "TP53", "ABL1")
)
cBioPortalData
(CNA)Copy Number Alteration data can be obtained with the getDataByGenes
function
or by the main cBioPortal
function.
getDataByGenes(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_cna_rae"
)
## $gbm_tcga_pub_cna_rae
## # A tibble: 609 × 10
## uniqueSampleKey uniquePatientKey entrezGeneId molecularProfil… sampleId
## <chr> <chr> <int> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_cn… TCGA-02…
## 2 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_cn… TCGA-02…
## 3 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_cn… TCGA-02…
## 4 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_cn… TCGA-02…
## 5 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_cn… TCGA-02…
## 6 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_cn… TCGA-02…
## 7 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_cn… TCGA-02…
## 8 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_cn… TCGA-02…
## 9 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_cn… TCGA-02…
## 10 VENHQS0wMi0wMDA3LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_cn… TCGA-02…
## # … with 599 more rows, and 5 more variables: patientId <chr>, studyId <chr>,
## # value <int>, hugoGeneSymbol <chr>, type <chr>
cBioPortalData(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_cna_rae"
)
## harmonizing input:
## removing 3 colData rownames not in sampleMap 'primary'
## A MultiAssayExperiment object of 1 listed
## experiment with a user-defined name and respective class.
## Containing an ExperimentList class object of length 1:
## [1] gbm_tcga_pub_cna_rae: SummarizedExperiment with 3 rows and 203 columns
## Functionality:
## experiments() - obtain the ExperimentList instance
## colData() - the primary/phenotype DataFrame
## sampleMap() - the sample coordination DataFrame
## `$`, `[`, `[[` - extract colData columns, subset, or experiment
## *Format() - convert into a long or wide DataFrame
## assays() - convert ExperimentList to a SimpleList of matrices
## exportClass() - save data to flat files
cgdsr
(CNA)getProfileData.CGDS(
x = cgds,
genes = c("NF1", "TP53", "ABL1"),
geneticProfiles = "gbm_tcga_pub_cna_rae",
caseList = "gbm_tcga_pub_cna"
)
cBioPortalData
(Methylation)Similar to Copy Number Alteration, Methylation can be obtained by
getDataByGenes
function or by ‘cBioPortalData’ function.
getDataByGenes(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_methylation_hm27"
)
## $gbm_tcga_pub_methylation_hm27
## # A tibble: 174 × 10
## uniqueSampleKey uniquePatientKey entrezGeneId molecularProfil… sampleId
## <chr> <chr> <int> <chr> <chr>
## 1 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_me… TCGA-02…
## 2 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_me… TCGA-02…
## 3 VENHQS0wMi0wMDAxLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_me… TCGA-02…
## 4 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_me… TCGA-02…
## 5 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_me… TCGA-02…
## 6 VENHQS0wMi0wMDAzLTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_me… TCGA-02…
## 7 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_me… TCGA-02…
## 8 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 4763 gbm_tcga_pub_me… TCGA-02…
## 9 VENHQS0wMi0wMDA2LTAx… VENHQS0wMi0wMDA… 7157 gbm_tcga_pub_me… TCGA-02…
## 10 VENHQS0wMi0wMDA3LTAx… VENHQS0wMi0wMDA… 25 gbm_tcga_pub_me… TCGA-02…
## # … with 164 more rows, and 5 more variables: patientId <chr>, studyId <chr>,
## # value <dbl>, hugoGeneSymbol <chr>, type <chr>
cBioPortalData(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("NF1", "TP53", "ABL1"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_methylation_hm27"
)
## harmonizing input:
## removing 148 colData rownames not in sampleMap 'primary'
## A MultiAssayExperiment object of 1 listed
## experiment with a user-defined name and respective class.
## Containing an ExperimentList class object of length 1:
## [1] gbm_tcga_pub_methylation_hm27: SummarizedExperiment with 3 rows and 58 columns
## Functionality:
## experiments() - obtain the ExperimentList instance
## colData() - the primary/phenotype DataFrame
## sampleMap() - the sample coordination DataFrame
## `$`, `[`, `[[` - extract colData columns, subset, or experiment
## *Format() - convert into a long or wide DataFrame
## assays() - convert ExperimentList to a SimpleList of matrices
## exportClass() - save data to flat files
cgdsr
(Methylation)getProfileData.CGDS(
x = cgds,
genes = c("NF1", "TP53", "ABL1"),
geneticProfiles = "gbm_tcga_pub_methylation_hm27",
caseList = "gbm_tcga_pub_methylation_hm27"
)