Hi! I'm using cBioPortalData in place of cgdsr to calculate the alteration frequency of different genes, but when I try to use getDataByGenes() to obtain mutation data for genes that are not altered (i.e. there's no data) I get an error, which causes my loop to break.
x <- getDataByGenes(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("ACTB"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_mutations"
)
Error in byGeneList[mutation] <- mutationData(api, molecularProfileIds[mutation], :
replacement has length zero
In addition: Warning message:
In mutationData(api, molecularProfileIds[mutation], entrezGeneIds, :
No data found for molecularProfileId: gbm_tcga_pub_mutations
In contrast, when I do this for cna, the function simply returns an empty list.
x <- getDataByGenes(
api = cbio,
studyId = "gbm_tcga_pub",
genes = c("ACTB"),
by = "hugoGeneSymbol",
molecularProfileIds = "gbm_tcga_pub_cna_rae"
)
x
named list()
Would it be possible to modify the function so that it also returns an empty list in the case of mutations?
Hi! I'm using cBioPortalData in place of cgdsr to calculate the alteration frequency of different genes, but when I try to use getDataByGenes() to obtain mutation data for genes that are not altered (i.e. there's no data) I get an error, which causes my loop to break.
In contrast, when I do this for cna, the function simply returns an empty list.
Would it be possible to modify the function so that it also returns an empty list in the case of mutations?