Hello,
I'm trying to map mouse symbols to human, using R package biomaRt
. Here is my code.
bm <- useMart(biomart = 'ensembl', dataset = "mmusculus_gene_ensembl")
> SymbolMap <- getBM(attributes = c("mgi_symbol", "hgnc_symbol", "ensembl_gene_id"), filters = "mgi_symbol", mart = bm, value = symbols)
> dim(SymbolMap)
[1] 22154 3
> head(SymbolMap)
mgi_symbol hgnc_symbol ensembl_gene_id
1 0610005C13Rik NA ENSMUSG00000109644
2 0610009B22Rik NA ENSMUSG00000007777
3 0610009L18Rik NA ENSMUSG00000043644
4 0610010F05Rik NA ENSMUSG00000042208
5 0610010K14Rik NA ENSMUSG00000020831
6 0610012G03Rik NA ENSMUSG00000107002
> sumis.na(SymbolMap[, "hgnc_symbol"]))
[1] 22154
> allis.na(SymbolMap[, "hgnc_symbol"]))
[1] TRUE
> anyis.na(SymbolMap[, "ensembl_gene_id"]))
[1] FALSE
> length(unique(SymbolMap[, "ensembl_gene_id"]))
[1] 22149
packageVersion("biomaRt")
[1] ‘2.38.0’
To my surprise, none of the mouse symbols get mapped to human. However, obviously the input mouse symbols can be mapped to 22149 Ensembl gene IDs, which means my input should be no problem. So, I'm confused by the results and want to see if anybody has similar issue. Thanks.
...and it should not be any value other than NA because HGNC is for human gene nomenclature.
sumis.na
should besum(is.na
, and same forallis.na
andanyis.na
. Don't know why they are shown differently from the preview...