When I convert gene_id from ENSEMBL
to SYMBOL
or ENTREZID
using org.Mm.eg.db
package, most of the genes failed.
So I checked the package org.Mm.eg.db
:
It turns out that, a total of 71927 ENTREZID
records, but only 33045 ENSEMBL
records.
only 45.7% of the ENTREZID
could be converted to ENSEMBL
.
library(org.Mm.eg.db)
orgdb <- org.Mm.eg.db
g1 <- keys(orgdb, "ENSEMBL")
length(g1)
g2 <- keys(orgdb, "ENTREZID")
length(g2)
g2e <- mapIds(orgdb, keys = g2, column = "ENSEMBL", keytype = "ENTREZID", multiVals = "first")
g2e <- g2e[! is.na(g2e)]
length(g2e)
length(g2e) / length(g2)