Greetings, Michelle,

I haven't worked with mouse data, but I think that the function getBM() 
in the bioconductor package biomaRt can help.

For instance, one could use the code below (replacing mySymbols with the 
vector of symbols that interest you) to output a data.frame with both 
ensembl gene ID and mgi symbol.

The creators of biomaRt have generated some nice tutorial materials and 
posted them at:

http://www.bioconductor.org/packages/2.2/bioc/html/biomaRt.html

If I've misinterpreted your question, you may be able to find the answer 
by viewing the biomaRt materials.

I hope that this helps.

Cheers,
Fred
--------------

source("http://bioconductor.org/biocLite.R")
biocLite("biomaRt")

library(biomaRt)
mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
listFilters(mouse)
listAttributes(mouse)
mySymbols <- "2310015A10Rik" # mySymbols is a vector of MGI symbols.
getBM( attributes=c("ensembl_gene_id", "mgi_symbol") , filters= 
"mgi_symbol"    , values =mySymbols ,mart=mouse)




On 5/6/12 5:41 AM, michelle_low wrote:
> Hi all,
>
> I have a list of gene symbols generated from the differential expression analysis below. How do I convert these symbols to emsembl id? Thanks
>
>
> Regards,
> Michelle
>
>
>
>
> R version 2.14.1 (2011-12-22)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
>
> &gt; library(affy)
> &gt;  library(limma)
> &gt; pd=read.AnnotatedDataFrame("phenodata.txt",header=TRUE,sep="",row.names=1)
> &gt;  a=ReadAffy(filenames=rownames(pData(pd)),phenoData=pd,verbose=TRUE)
> 1 reading Control-1.cel ...instantiating an AffyBatch (intensity a 1004004x6 matrix)...done.
> Reading in : Control-1.cel
> Reading in : Control-2.cel
> Reading in : Dicer-1.cel
> Reading in : Dicer-2.cel
> Reading in : Drosha-1.cel
> Reading in : Drosha-2.cel
> &gt; x=rma(a)
> Loading required package: AnnotationDbi
> Background correcting
> Normalizing
> Calculating Expression
> Warning message:
> package âEUR~AnnotationDbiâEUR^(TM) was built under R version 2.14.2
> &gt; c=paste(pd$treatment,pd$n,sep="")
> &gt;  f=factor(c)
> &gt;  design=model.matrix(~0+f)
> &gt; colnames(design)=levels(f)
> &gt; fit=lmFit(x,design)
> &gt; library(mouse4302.db)
> Loading required package: org.Mm.eg.db
> Loading required package: DBI
>
> Warning messages:
> 1: package âEUR~RSQLiteâEUR^(TM) was built under R version 2.14.2
> 2: package âEUR~DBIâEUR^(TM) was built under R version 2.14.2
> &gt; library(annotate)
> Warning message:
> package âEUR~annotateâEUR^(TM) was built under R version 2.14.2
> &gt;  fit$genes$Symbol&lt;- getSYMBOL(fit$genes$ID,"mouse4302.db")
> &gt; contrast.matrix=makeContrasts(E1="present-absent.Dicer",E2="present-absent.Drosha",E3="absent.Drosha-absent.Dicer",levels=design)
> &gt;  fit2=contrasts.fit(fit,contrast.matrix)
> &gt;
> &gt; fit2=eBayes(fit2)
> &gt;
> &gt; results1&lt;-topTable (fit2, coef=1, p.value=0.0001,number=nrow(fit2))
> &gt; write.table(results1, file="control-Dicer5.txt")
> &gt; results2&lt;-topTable (fit2, coef=2, p.value=0.0001,number=nrow(fit2))
> &gt; write.table(results2, file="control-Drosha5.txt")
> &gt; results3&lt;-topTable (fit2, coef=3, p.value=0.0001,number=nrow(fit2))
> &gt; results=decideTests(fit2)
> &gt; summary(results2)
> &gt; b=venncounts(results2)
> &gt; print(b)
> &gt; vennDiagram(results)
> &gt; a=vennDiagram(results,include=c("up","down"),counts.col=c("red","green"))
>
>
>
> 	[[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

	[[alternative HTML version deleted]]

