Vladimir Morozov | 15 May 17:47
Favicon

GSEABase how to map gene symbols to mouse EntrezId or Affy

Hi

Any suggestions how to map  gene symbols to mouse EntrezId(preffered) or
Affy. 
mapping to Entez apparently is not supported by GSEABase
> mapIdentifiers(gss,EntrezIdentifier())
Error in .mapIdentifiers_isMappable(from, to) : 
  unable to map from 'Symbol' to 'EntrezId'
    neither GeneIdentifierType has annotation
Error in GeneSetCollection(lapply(what, mapIdentifiers, to, ..., verbose
= verbose)) : 
  error in evaluating the argument 'object' in selecting a method for
function 'GeneSetCollection'

 
Mapping to Affys works for human, but not for mouse
> mapIdentifiers(gss, AnnotationIdentifier("hgu95av2.db"))
GeneSetCollection
  names: chr5q23, chr16q24 (2 total)
  unique identifiers: 35089_at, 35090_g_at, ..., 35807_at (79 total)
  types in collection:
    geneIdType: AnnotationIdentifier (1 total)
    collectionType: BroadCollection (1 total)
> mapIdentifiers(gss, AnnotationIdentifier("mouse4302.db"))
GeneSetCollection
  names: chr5q23, chr16q24 (2 total)
  unique identifiers:  (0 total)
  types in collection:
    geneIdType: AnnotationIdentifier (1 total)
    collectionType: BroadCollection (1 total)
(Continue reading)

Marc Carlson | 15 May 18:26
Favicon

Re: GSEABase how to map gene symbols to mouse EntrezId or Affy

Vladimir Morozov wrote:
> Hi
>  
> Any suggestions how to map  gene symbols to mouse EntrezId(preffered) or
> Affy. 
> mapping to Entez apparently is not supported by GSEABase
>   
Hi Vladimir,

In general if you want to map mouse gene symbols to Entrez Gene IDs, I 
would use the org.Mm.eg.db package like this:
#load the package
library("org.Mm.eg.db")

#you need a some gene symbols to map of course
foo = c("Msx2", "Wnt5a", "Shh")

#Then just find what these symbols map to
mget(foo, org.Mm.egSYMBOL2EG)

If you have more exotic gene symbols in your list (often many symbols 
will map to a single ID), then you can also use the org.Mm.egALIAS2EG 
mapping to try and recover the gene IDs that may have otherwise been lost.

And if you want to map to affy IDs, we probably have a package for that 
too, but you need to tell us which platform you are using in order for 
us to make a recommendation.

   Marc

(Continue reading)

Martin Morgan | 15 May 18:56
Favicon

Re: GSEABase how to map gene symbols to mouse EntrezId or Affy

Hi Vladimir --

"Vladimir Morozov" <vmorozov@...> writes:

> Hi
>  
> Any suggestions how to map  gene symbols to mouse EntrezId(preffered) or
> Affy. 
> mapping to Entez apparently is not supported by GSEABase
>> mapIdentifiers(gss,EntrezIdentifier())
> Error in .mapIdentifiers_isMappable(from, to) : 
>   unable to map from 'Symbol' to 'EntrezId'
>     neither GeneIdentifierType has annotation

mapIdentifiers needs to know where to look for the map. I guess the
way you created gss means that it doesn't know about the organism
you're using, and EntrezIdentifier() also doesn't. What you want is

> mapIdentifiers(gss, EntrezIdentifier("org.Mm.eg.db"))
GeneSetCollection
  names: chr5q23, chr16q24 (2 total)
  unique identifiers:  (0 total)
  types in collection:
    geneIdType: EntrezIdentifier (1 total)
    collectionType: BroadCollection (1 total)

Here I'm using (and I guess you are too) the gss that comes from
example(getBroadSets). These are human genes, and have no
corresponding mouse equivalents (see below)...

(Continue reading)

Vladimir Morozov | 15 May 19:56
Favicon

Re: GSEABase how to map gene symbols to mouse EntrezId or Affy

Martin,

You are right that disagreement beween human and mouse symblos is the
problem. But you still should get some mapping if translate symbols into
capwords
> sum(!is.na(mget(gss[[1]]@geneIds,org.Mm.egSYMBOL2EG,ifnotfound=NA)))
[1] 0
>
sum(!is.na(mget(capwords(tolower(gss[[1]]@geneIds)),org.Mm.egSYMBOL2EG,i
fnotfound=NA)))
[1] 46
Let's say I will figure out some mapping using ortholog or alias names.
Will I screw the GeneSet data structure by
gss2 <- lapply(gss,function(x){x <at> geneIds <-
my.mapping(x <at> geneIds);x <at> geneIdType <at> type <- 'EntrezIdentifier'})
?

Vladimir Morozov 

-----Original Message-----
From: Martin Morgan [mailto:mtmorgan@...] 
Sent: Thursday, May 15, 2008 12:56 PM
To: Vladimir Morozov
Cc: bioconductor@...
Subject: Re: [BioC] GSEABase how to map gene symbols to mouse EntrezId
or Affy

Hi Vladimir --

"Vladimir Morozov" <vmorozov@...> writes:
(Continue reading)

Martin Morgan | 15 May 20:47
Favicon

Re: GSEABase how to map gene symbols to mouse EntrezId or Affy

"Vladimir Morozov" <vmorozov@...> writes:

> Martin,
>
> You are right that disagreement beween human and mouse symblos is the
> problem. But you still should get some mapping if translate symbols into
> capwords
>> sum(!is.na(mget(gss[[1]]@geneIds,org.Mm.egSYMBOL2EG,ifnotfound=NA)))
> [1] 0

Always use accessors, geneIds(gss[[1]]), ...

> sum(!is.na(mget(capwords(tolower(gss[[1]]@geneIds)),org.Mm.egSYMBOL2EG,i
> fnotfound=NA)))
> [1] 46

be nice to your helpers with complete examples, I guess capwords is

> capwords <- function(x) sub("^([a-z])", "\\U\\1", x, perl=TRUE)

then

> cids <- capwords(tolower(geneIds(gss[[1]])))
> egids <- mget(cids, org.Mm.egSYMBOL2EG, ifnotfound=NA)
> egids <- egids[!is.na(egids)]

> Let's say I will figure out some mapping using ortholog or alias names.
> Will I screw the GeneSet data structure by
> gss2 <- lapply(gss,function(x){x <at> geneIds <-
> my.mapping(x <at> geneIds);x <at> geneIdType <at> type <- 'EntrezIdentifier'})
(Continue reading)


Gmane