Returning less assigned genes than expected
2
0
Entering edit mode
David ▴ 860
@david-3335
Last seen 6.1 years ago

Hi,

length(res$geneID)
[1] 45487

      allgenes = bitr(res$geneID, fromType="SYMBOL", toType="ENTREZID", OrgDb="org.Hs.eg.db",drop=FALSE)

'select()' returned 1:many mapping between keys and columns

Warning message:
In bitr(res$geneID, fromType = "SYMBOL", toType = "ENTREZID", OrgDb = "org.Hs.eg.db",  :
  32.63% of input gene IDs are fail to map...

> length(allgenes$ENTREZID)
[1] 44399

 

I don´t understand why bitr does not return the same number of entries it has read as input. I would expect 45487 entries to be returned with NA for missing values. Am i missing something ?

 

clusterprofiler • 1.3k views
ADD COMMENT
0
Entering edit mode
Guangchuang Yu ★ 1.2k
@guangchuang-yu-5419
Last seen 28 days ago
China/Guangzhou/Southern Medical Univer…
> geneID = as.character(1:100)
> allgenes = bitr(geneID, toType="SYMBOL", fromType="ENTREZID", OrgDb="org.Hs.eg.db",drop=FALSE)
'select()' returned 1:1 mapping between keys and columns
Warning message:
In bitr(geneID, toType = "SYMBOL", fromType = "ENTREZID", OrgDb = "org.Hs.eg.db",  :
  17% of input gene IDs are fail to map...
> dim(allgenes)
[1] 100   2
> head(allgenes)
  ENTREZID SYMBOL
1        1   A1BG
2        2    A2M
3        3  A2MP1
4        4   <NA>
5        5   <NA>
6        6   <NA>
>

 

I can't reproduce your issue. 

 

pls follow the guide and make a reproducible example.

 

ADD COMMENT
0
Entering edit mode
David ▴ 860
@david-3335
Last seen 6.1 years ago
Ok got the problem.

I have duplicated geneIDS so the number of input ids is different from the returned number of entries. 

 geneID = c("1","2","3","3")
allgenes = bitr(geneID, toType="SYMBOL", fromType="ENTREZID", OrgDb="org.Hs.eg.db",drop=FALSE)
'select()' returned 1:1 mapping between keys and columns
 allgenes
  ENTREZID SYMBOL
1        1   A1BG
2        2    A2M
3        3  A2MP1

Ok thanks, i will match the ids back to my original table...

 

 

 

ADD COMMENT

Login before adding your answer.

Traffic: 465 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6