Closed xinwei-sher closed 4 years ago
I wrote a quick function to help me with this since most of the time i work in symbol space as opposed to entrez id -- hope it helps! It takes in one or more symbols and returns the entrez id
get_entrez_from_gene_names <- function(x){ returnList = NULL for (gene in x){ get <- cbio$getGeneUsingGET(gene) ret <- httr::content(get) print(ret$entrezGeneId) returnList <- rbind(returnList,ret$entrezGeneId) } return(returnList) }
Example :: get_entrez_from_gene_names(c("HIST1H1E","HIST1H1E"))
@xinwei-sher @jebard
Please use the cBioPortalData
function and specify the by
argument to "hugoGeneSymbol".
https://waldronlab.io/cBioPortalData/reference/cBioPortalData.html
Also see AnnotationHub
and the mapIds
function (if you really need to use the molecularData
function)
https://www.bioconductor.org/help/course-materials/2019/BSS2019/05_Annotations.html#mapping-between-symbols
@xinwei-sher @jebard Please use the
cBioPortalData
function and specify theby
argument to "hugoGeneSymbol". https://waldronlab.io/cBioPortalData/reference/cBioPortalData.html
Thanks for your response. However, cBioPortalData only supports hugoGeneSymbol in predefined genePanel. There's no parameter for individual hugoGeneSymbols. It also does not support customized genePanel.
I wrote a quick function to help me with this since most of the time i work in symbol space as opposed to entrez id -- hope it helps! It takes in one or more symbols and returns the entrez id
get_entrez_from_gene_names <- function(x){ returnList = NULL for (gene in x){ get <- cbio$getGeneUsingGET(gene) ret <- httr::content(get) print(ret$entrezGeneId) returnList <- rbind(returnList,ret$entrezGeneId) } return(returnList) }
Example :: get_entrez_from_gene_names(c("HIST1H1E","HIST1H1E"))
Thanks for the trick, @jebard. Go Bulls!
This is an open issue, see https://github.com/waldronlab/cBioPortalData/issues/24
Is it possible to retrieve molecular data with hugoGeneSymbol? It looks only entreGeneIds can be used for now:
Molecular Profile Data
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") )