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 SCtkExperiment object. Required

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 SCtkExperiment 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
#> 1832 ENSEMBL are NA after conversion. Removing
#> 36 ENSEMBL are duplicated after conversion. Removing additional copies
#> 299 SYMBOL are duplicated after conversion. Removing additional copies
#> 19972 SYMBOL originally, 18106 ENSEMBLs
#> [1] "ENSMUSG00000070421" "ENSMUSG00000036412" "ENSMUSG00000022311" #> [4] "ENSMUSG00000049576" "ENSMUSG00000025481" "ENSMUSG00000027244" #> [7] "ENSMUSG00000031862" "ENSMUSG00000022636" "ENSMUSG00000029627" #> [10] "ENSMUSG00000013367" "ENSMUSG00000060780" "ENSMUSG00000039838" #> [13] "ENSMUSG00000103037" "ENSMUSG00000036172" "ENSMUSG00000028278" #> [16] "ENSMUSG00000041915" "ENSMUSG00000017950" "ENSMUSG00000032496" #> [19] "ENSMUSG00000057982" "ENSMUSG00000024370" "ENSMUSG00000029223" #> [22] "ENSMUSG00000043702" "ENSMUSG00000027270" "ENSMUSG00000027824" #> [25] "ENSMUSG00000030008" "ENSMUSG00000034751" "ENSMUSG00000021257" #> [28] "ENSMUSG00000072492" "ENSMUSG00000094230" "ENSMUSG00000057497" #> [31] "ENSMUSG00000079625" "ENSMUSG00000049680" "ENSMUSG00000056824" #> [34] "ENSMUSG00000027695" "ENSMUSG00000026404" "ENSMUSG00000045594" #> [37] "ENSMUSG00000041954" "ENSMUSG00000022235" "ENSMUSG00000054770" #> [40] "ENSMUSG00000034245" "ENSMUSG00000079434" "ENSMUSG00000011305" #> [43] "ENSMUSG00000042109" "ENSMUSG00000035354" "ENSMUSG00000018340" #> [46] "ENSMUSG00000029390" "ENSMUSG00000026123" "ENSMUSG00000007815" #> [49] "ENSMUSG00000015377" "ENSMUSG00000014245"