about MapIds function
1
1
Entering edit mode
Bogdan ▴ 620
@bogdan-2367
Last seen 2 days ago
Palo Alto, CA, USA

Dear all,

would you please help me on the following please ; I am using MapIds function in order to map a set of ENSEMLTRANS to gene SYMBOL(s) by using the piece of code below :

    library("AnnotationDbi")
    library("org.Mm.eg.db")
    library("clusterProfiler")

    noc.mapids = mapIds(org.Mm.eg.db,
                keys = as.character(noc.simple$geneName),
                keytype="ENSEMBLTRANS",
                column="SYMBOL", multiVals = "first")

noc.mapids.df = as.data.frame(as.matrix(noc.mapids))

i do get a set of results where some ENSEMBLTRANS are not mapped on Gene Symbols, for example :

ENSMUST00000041618             <NA>
ENSMUST00000072334             <NA>
ENSMUST00000136481             <NA>

however, when i copy/paste these ENSEMBL IDs that did not map into GenomeBrowser mm10, i can see genes associated with the transcripts, for example :

ENSMUST00000041618 maps to Taf4.

is there anything that i am missing in the R mapIds function ? Thanks a lot !

-- bogdan

mapIds • 96 views
ADD COMMENT
4
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

If you use an OrgDb package to map gene symbols to Ensembl transcript IDs, what you are really asking for is Gene symbol -> NCBI Gene ID -> Ensembl Transcript ID. Which assumes that the mapping from NCBI to Ensembl will give you all the stuff. But that's not how it works! NCBI and EBI have way different methods of determining where genes are, what transcripts are available, where the transcripts are, etc. And when they map between their content, there are a set of rules to decide if they agree closely enough to say a particular transcript is the same thing. They don't always agree!

Rather than taking the naive approach that they should agree and that you should be able to use an NCBI-based database to map gene symbols to Ensembl Transcript IDs, you should instead use Ensembl-based data from the start. You could use the biomaRt package, or any of the EnsDb packages that Johannes Rainier provides.

0
Entering edit mode

thanks a lot, James. Warm greetings from us.

ADD REPLY

Login before adding your answer.

Traffic: 463 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