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")

Arguments

inSCE

Input SingleCellExperiment object.

inSymbol

The input symbol type

outSymbol

The output symbol type

database

The org.*.eg.db database to use. The default is org.Hs.eg.db

Value

A SingleCellExperiment object with converted gene IDs.

Examples

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) }
#>
#> Loading required package: AnnotationDbi
#> 'select()' returned 1:many mapping between keys and columns
#> 127 ENSEMBL are NA after conversion. Removing
#> 29 SYMBOL are duplicated after conversion. Removing additional copies
#> 2314 SYMBOL originally, 2187 ENSEMBLs
#> [1] "ENSMUSG00000028797" "ENSMUSG00000066129" "ENSMUSG00000002102" #> [4] "ENSMUSG00000027087" "ENSMUSG00000024194" "ENSMUSG00000006005" #> [7] "ENSMUSG00000030726" "ENSMUSG00000021796" "ENSMUSG00000028790" #> [10] "ENSMUSG00000031812" "ENSMUSG00000026509" "ENSMUSG00000062234" #> [13] "ENSMUSG00000030663" "ENSMUSG00000024952" "ENSMUSG00000057134" #> [16] "ENSMUSG00000022404" "ENSMUSG00000091803" "ENSMUSG00000026675" #> [19] "ENSMUSG00000003534" "ENSMUSG00000006800" "ENSMUSG00000024853" #> [22] "ENSMUSG00000041685" "ENSMUSG00000026833" "ENSMUSG00000020431" #> [25] "ENSMUSG00000073676" "ENSMUSG00000057236" "ENSMUSG00000000581" #> [28] "ENSMUSG00000013236" "ENSMUSG00000005125" "ENSMUSG00000107722" #> [31] "ENSMUSG00000032637" "ENSMUSG00000059119" "ENSMUSG00000021670" #> [34] "ENSMUSG00000026421" "ENSMUSG00000052698" "ENSMUSG00000053119" #> [37] "ENSMUSG00000038936" "ENSMUSG00000010277" "ENSMUSG00000059173" #> [40] "ENSMUSG00000039716" "ENSMUSG00000019528" "ENSMUSG00000031342" #> [43] "ENSMUSG00000028795" "ENSMUSG00000037608" "ENSMUSG00000022427" #> [46] "ENSMUSG00000000326" "ENSMUSG00000035649" "ENSMUSG00000071866" #> [49] "ENSMUSG00000027457" "ENSMUSG00000027523"