[BioC] Gene names on topTable by limma

Jenny Drnevich drnevich at illinois.edu
Wed Oct 7 16:21:38 CEST 2009


Hi Marcos,

It seems from your code that you already know 
this, but I'll state it for the archives: you can 
put a variety of annotation information in 
fit$genes, and all of it will be automatically 
pulled into the output of topTable, which is 
handy if you'll be using topTable for several 
different contrasts. You already had this in your code to add the gene symbols:

 > fit2$genes$Symbol=getSYMBOL(fit2$genes$ID, "hgu133plus2")

You can add as many other columns as you want:

 > fit2$genes$EG <- getEG(fit2$genes$ID, "hgu133plus2")

 > fit2$genes$GeneName <- unlist(mget(fit$genes$ID, hgu133plus2GENENAME))

etc.

Cheers,
Jenny

At 03:56 PM 10/6/2009, James W. MacDonald wrote:
>Please don't take things off-list.
>
>Marcos Pinho wrote:
>>Jim,
>>
>>thanks for your reply. I was already able to 
>>introduce gene symbols. What I was looking for 
>>was to somehow create a column with short gene names for my final report.
>
>There isn't a getShortName() in annotate, but it 
>isn't difficult to get these data directly:
>
>names <- unlist(mget(fit$genes$ID, hgu133plus2GENENAME))
>
>see ls("package:hgu133plus2.db") for all the annotation possibilities.
>
>Best,
>
>Jim
>
>
>>
>>cheers,
>>
>>Marcos
>>
>>*> library(limma)*
>>*> fit =lmFit (esetF, design)*
>>*> fit2=eBayes(fit)*
>>*> library(annotate)*
>>Loading required package: xtable
>>
>>Attaching package: 'xtable'
>>
>>
>>         The following object(s) are masked from package:widgetTools :
>>
>>          label
>>
>>*> fit2$genes$Symbol=getSYMBOL(fit2$genes$ID, "hgu133plus2")*
>>*> topTable(fit2, coef=2)*
>>* *
>>*fit2$genes$EG <- getEG(fit2$genes$ID, "hgu133plus2")***
>>               ID Symbol     logFC  AveExpr         t      P.Value
>>adj.P.Val
>>5253   209993_at  ABCB1  8.167898 6.410285  28.41936 1.387084e-06 0.008649451
>>3378  1553436_at  MUC19  7.512443 6.097913  25.70956 2.249499e-06 0.008649451
>>9828 206488_s_at   CD36  7.318355 6.081049  22.79634 4.015521e-06 0.008649451
>>6995 222392_x_at   PERP  6.047929 6.736659  20.28712 7.035669e-06 0.008649451
>>8973   210603_at  ARD1B  6.088776 5.773605  20.23547 7.122355e-06 0.008649451
>>1412   235683_at  SESN3  6.589716 5.620394  20.17661 7.222719e-06 0.008649451
>>7573 216191_s_at   TRD@ -6.153962 5.640399 -19.71517 8.071494e-06 0.008649451
>>4013   202948_at  IL1R1 -6.231328 5.580407 -19.61010 8.281240e-06 0.008649451
>>5302   205934_at  PLCL1  5.836512 5.809832  19.53496 8.435274e-06 0.008649451
>>4061 205786_s_at  ITGAM -6.788839 7.957034 -18.03301 1.238036e-05 0.008649451
>>On Tue, Oct 6, 2009 at 4:18 PM, James W. 
>>MacDonald <jmacdon at med.umich.edu <mailto:jmacdon at med.umich.edu>> wrote:
>>     Hi Marcos,
>>
>>     Marcos Pinho wrote:
>>         Dear list,
>>         can anybody suggest how could I insert gene names in additional
>>         to gene
>>         symbols on my topTable generated by limma with my differentially
>>         expressed
>>         genes?
>>
>>     It really depends on what annotation you have for your genes.
>>     However the general idea would be to use one of the org.Xx.eg.db
>>     packages to annotate your genes, or if you are using a commercial
>>     chip, use a chip-specific annotation package.
>>     Say your MArrayLM object is called 'fit'
>>     tabl <- topTable(fit) ##maybe need a coef argument as well.
>>     if you have Entrez Gene IDs
>>     tabl$Genes <- unlist(mget(tabl$ID, org.Xx.eg.dbSYMBOL))
>>     if you have an affy chip
>>     tabl$Genes <- unlist(mget(tabl$ID, theaffychipSYMBOL))
>>     or so.
>>     Does that help?
>>     Best,
>>     Jim
>>
>>         cheers,
>>         Marcos B. Pinho
>>         Programa de Engenharia Química - PEQ
>>         Laboratório de Engenharia de Cultivos Celulares- LECC
>>         Universidade Federal do Rio de Janeiro - UFRJ
>>         Instituto Nacional de Câncer - INCA
>>         Rio de Janeiro - Brasil
>>                [[alternative HTML version deleted]]
>>
>> 
>>------------------------------------------------------------------------
>>         _______________________________________________
>>         Bioconductor mailing list
>>         Bioconductor at stat.math.ethz.ch
>>         <mailto:Bioconductor at stat.math.ethz.ch>
>>         https://stat.ethz.ch/mailman/listinfo/bioconductor
>>         Search the archives:
>>         http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>>     --     James W. MacDonald, M.S.
>>     Biostatistician
>>     Douglas Lab
>>     University of Michigan
>>     Department of Human Genetics
>>     5912 Buhl
>>     1241 E. Catherine St.
>>     Ann Arbor MI 48109-5618
>>     734-615-7826
>>
>>
>>--
>>Marcos B. Pinho
>>Programa de Engenharia Química - PEQ
>>Laboratório de Engenharia de Cultivos Celulares- LECC
>>Universidade Federal do Rio de Janeiro - UFRJ
>>Instituto Nacional de Câncer - INCA
>>Rio de Janeiro - Brasil
>
>--
>James W. MacDonald, M.S.
>Biostatistician
>Douglas Lab
>University of Michigan
>Department of Human Genetics
>5912 Buhl
>1241 E. Catherine St.
>Ann Arbor MI 48109-5618
>734-615-7826
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/bioconductor
>Search the archives: 
>http://news.gmane.org/gmane.science.biology.informatics.conductor

Jenny Drnevich, Ph.D.

Functional Genomics Bioinformatics Specialist
W.M. Keck Center for Comparative and Functional Genomics
Roy J. Carver Biotechnology Center
University of Illinois, Urbana-Champaign

330 ERML
1201 W. Gregory Dr.
Urbana, IL 61801
USA

ph: 217-244-7355
fax: 217-265-5066
e-mail: drnevich at illinois.edu 



More information about the Bioconductor mailing list