Convert the gene IDs in a SingleCellExperiment object using Bioconductor org.*.eg.db data packages. Because annotation databases do not have a 1:1 relationship, this tool removes rows with no corresponding annotation in your desired annotation, and remove any duplicate annotations after conversion.
convertGeneIDs(inSCE, inSymbol, outSymbol, database = "org.Hs.eg.db")
Input SCtkExperiment object. Required
The input symbol type
The output symbol type
The org.*.eg.db database to use. The default is org.Hs.eg.db
A SCtkExperiment with converted gene IDs.
if(requireNamespace("org.Mm.eg.db", quietly = TRUE)) {
#convert mouse gene symbols to ensembl IDs
library("org.Mm.eg.db")
sample(rownames(mouseBrainSubsetSCE), 50)
mouseBrainSubsetSymbol <- convertGeneIDs(inSCE = mouseBrainSubsetSCE,
inSymbol = "SYMBOL",
outSymbol = "ENSEMBL",
database = "org.Mm.eg.db")
sample(rownames(mouseBrainSubsetSymbol), 50)
}