Thanks Fred and Martin.

---- On Sun, 06 May 2012 08:28:58 -0700 Martin Morgan &lt;mtmorgan@fhcrc.org&gt; wrote ---- 


On 05/06/2012 07:23 AM, Fred Boehm wrote: 
&gt; Greetings, Michelle, 
&gt; 
&gt; I haven't worked with mouse data, but I think that the function getBM() 
&gt; in the bioconductor package biomaRt can help. 
 
also 
 
 library(mouse4302.db) 
 unlist(mget(fit$genes$ID, mouse4302ENSEMBL, ifnotfound=NA) 
 
or even better in R 2.14.0 or greater 
 
 select(mouse4302.db, ids, "ENSEMBL") 
 
(see ?select, ?keys, ?cols, ?keytype) 
 
Martin 
 
&gt; 
&gt; For instance, one could use the code below (replacing mySymbols with the 
&gt; vector of symbols that interest you) to output a data.frame with both 
&gt; ensembl gene ID and mgi symbol. 
&gt; 
&gt; The creators of biomaRt have generated some nice tutorial materials and 
&gt; posted them at: 
&gt; 
&gt; http://www.bioconductor.org/packages/2.2/bioc/html/biomaRt.html 
&gt; 
&gt; If I've misinterpreted your question, you may be able to find the answer 
&gt; by viewing the biomaRt materials. 
&gt; 
&gt; I hope that this helps. 
&gt; 
&gt; Cheers, 
&gt; Fred 
&gt; -------------- 
&gt; 
&gt; source("http://bioconductor.org/biocLite.R") 
&gt; biocLite("biomaRt") 
&gt; 
&gt; library(biomaRt) 
&gt; mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl") 
&gt; listFilters(mouse) 
&gt; listAttributes(mouse) 
&gt; mySymbols&lt;- "2310015A10Rik" # mySymbols is a vector of MGI symbols. 
&gt; getBM( attributes=c("ensembl_gene_id", "mgi_symbol") , filters= 
&gt; "mgi_symbol" , values =mySymbols ,mart=mouse) 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; On 5/6/12 5:41 AM, michelle_low wrote: 
&gt;&gt; Hi all, 
&gt;&gt; 
&gt;&gt; I have a list of gene symbols generated from the differential expression analysis below. How do I convert these symbols to emsembl id? Thanks 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Regards, 
&gt;&gt; Michelle 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; R version 2.14.1 (2011-12-22) 
&gt;&gt; Platform: x86_64-pc-mingw32/x64 (64-bit) 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; &amp;gt; library(affy) 
&gt;&gt; &amp;gt; library(limma) 
&gt;&gt; &amp;gt; pd=read.AnnotatedDataFrame("phenodata.txt",header=TRUE,sep="",row.names=1) 
&gt;&gt; &amp;gt; a=ReadAffy(filenames=rownames(pData(pd)),phenoData=pd,verbose=TRUE) 
&gt;&gt; 1 reading Control-1.cel ...instantiating an AffyBatch (intensity a 1004004x6 matrix)...done. 
&gt;&gt; Reading in : Control-1.cel 
&gt;&gt; Reading in : Control-2.cel 
&gt;&gt; Reading in : Dicer-1.cel 
&gt;&gt; Reading in : Dicer-2.cel 
&gt;&gt; Reading in : Drosha-1.cel 
&gt;&gt; Reading in : Drosha-2.cel 
&gt;&gt; &amp;gt; x=rma(a) 
&gt;&gt; Loading required package: AnnotationDbi 
&gt;&gt; Background correcting 
&gt;&gt; Normalizing 
&gt;&gt; Calculating Expression 
&gt;&gt; Warning message: 
&gt;&gt; package âEUR~AnnotationDbiâEUR^(TM) was built under R version 2.14.2 
&gt;&gt; &amp;gt; c=paste(pd$treatment,pd$n,sep="") 
&gt;&gt; &amp;gt; f=factor(c) 
&gt;&gt; &amp;gt; design=model.matrix(~0+f) 
&gt;&gt; &amp;gt; colnames(design)=levels(f) 
&gt;&gt; &amp;gt; fit=lmFit(x,design) 
&gt;&gt; &amp;gt; library(mouse4302.db) 
&gt;&gt; Loading required package: org.Mm.eg.db 
&gt;&gt; Loading required package: DBI 
&gt;&gt; 
&gt;&gt; Warning messages: 
&gt;&gt; 1: package âEUR~RSQLiteâEUR^(TM) was built under R version 2.14.2 
&gt;&gt; 2: package âEUR~DBIâEUR^(TM) was built under R version 2.14.2 
&gt;&gt; &amp;gt; library(annotate) 
&gt;&gt; Warning message: 
&gt;&gt; package âEUR~annotateâEUR^(TM) was built under R version 2.14.2 
&gt;&gt; &amp;gt; fit$genes$Symbol&amp;lt;- getSYMBOL(fit$genes$ID,"mouse4302.db") 
&gt;&gt; &amp;gt; contrast.matrix=makeContrasts(E1="present-absent.Dicer",E2="present-absent.Drosha",E3="absent.Drosha-absent.Dicer",levels=design) 
&gt;&gt; &amp;gt; fit2=contrasts.fit(fit,contrast.matrix) 
&gt;&gt; &amp;gt; 
&gt;&gt; &amp;gt; fit2=eBayes(fit2) 
&gt;&gt; &amp;gt; 
&gt;&gt; &amp;gt; results1&amp;lt;-topTable (fit2, coef=1, p.value=0.0001,number=nrow(fit2)) 
&gt;&gt; &amp;gt; write.table(results1, file="control-Dicer5.txt") 
&gt;&gt; &amp;gt; results2&amp;lt;-topTable (fit2, coef=2, p.value=0.0001,number=nrow(fit2)) 
&gt;&gt; &amp;gt; write.table(results2, file="control-Drosha5.txt") 
&gt;&gt; &amp;gt; results3&amp;lt;-topTable (fit2, coef=3, p.value=0.0001,number=nrow(fit2)) 
&gt;&gt; &amp;gt; results=decideTests(fit2) 
&gt;&gt; &amp;gt; summary(results2) 
&gt;&gt; &amp;gt; b=venncounts(results2) 
&gt;&gt; &amp;gt; print(b) 
&gt;&gt; &amp;gt; vennDiagram(results) 
&gt;&gt; &amp;gt; a=vennDiagram(results,include=c("up","down"),counts.col=c("red","green")) 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt;     [[alternative HTML version deleted]] 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; _______________________________________________ 
&gt;&gt; Bioconductor mailing list 
&gt;&gt; Bioconductor@r-project.org 
&gt;&gt; https://stat.ethz.ch/mailman/listinfo/bioconductor 
&gt;&gt; Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor 
&gt; 
&gt;     [[alternative HTML version deleted]] 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; _______________________________________________ 
&gt; Bioconductor mailing list 
&gt; Bioconductor@r-project.org 
&gt; https://stat.ethz.ch/mailman/listinfo/bioconductor 
&gt; Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor 
 
 
-- 
Computational Biology 
Fred Hutchinson Cancer Research Center 
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 
 
Location: M1-B861 
Telephone: 206 667-2793 



	[[alternative HTML version deleted]]

