[BioC] How to save result from limma

Wang, Jixin jixinwang at neo.tamu.edu
Tue Aug 12 20:58:45 CEST 2008


Dear all,

I am using limma to analyze my microarray data. I have a simple question to ask. I want to save the summary table of ALL genes into local drive. I had tried to use write, write.table or save command but I always got error message. 

write.table(topTable, "la.txt")
Error in as.data.frame.default(x[[i]], optional = TRUE) : 
  Cannot coerce class "function" into a data.frame
 
write.table(fit,number=100,adjust="BH",file="la.txt")
Error in write.table(fit, number = 100, adjust = "BH", file = "la.txt") : 
  unused argument(s) (number = 100, adjust = "BH")


When I use write.table (fit, file="la.txt"),
I got something like this: 
 "coefficients" "stdev.unscaled" "sigma" "df.residual" "genes.Block" "genes.Row" "genes.Column" "genes.ID" "genes.Name" "Amean" "s2.post" "t" "p.value" "lods" "F" "F.p.value"
"1" 0.191491534183039 0.5 0.58043881130755 3 1 1 1 5103 NA 6.32074826791933 0.303968848417341 0.694648392759644 0.509374409393106 -4.86326047572600 0.482536389563556 0.509374409393106
"2" -0.293787384283484 0.5 1.20366297838960 3 1 1 2 5124 NA 8.24502874291735 0.774060196679415 -0.667845140479293 0.525351390376272 -4.87400797979679 0.446017131661806 0.525351390376272
"3" -0.513890138933438 0.5 0.298947585330255 3 1 1 3 5145 NA 6.24632903576038 0.199313133368442 -2.30214313044810 0.0543270719852833 -3.89174526089124 5.29986299306939 0.0543270719852833
"4" -0.192900665446982 0.5 0.202699077289498 3 1 1 4 5166 NA 5.4719589146908 0.178899971606802 -0.912133876540687 0.391633127283331 -4.76408991981505 0.831988208733142 0.391633127283331
"5" -0.519787414790754 0.5 0.971899999883875 3 1 1 5 5187 NA 4.79242047112468 0.560886278852435 -1.38809230856769 0.207129224092528 -4.49088947369315 1.92680025710479 0.207129224092528………………….

What I want is same as below (contain logFC, P Value and adj.P.Val) of ALL genes,  
 options(digits=3)
 topTable(fit,number=100,adjust="BH")
    Block Row Column    ID Name logFC AveExpr     t  P.Value adj.P.Val     B
20830    46   2     18  5921   NA  3.22    8.42 15.76 8.78e-07    0.0195 -1.78
5073     11  21     13 15499   NA  3.09   11.56 12.58 4.15e-06    0.0460 -1.86
6457     14  21     11  9451   NA  2.93   10.48 10.88 1.11e-05    0.0617 -1.93
4193     10   2     13  9974   NA  2.69   10.25 10.87 1.11e-05    0.0617 -1.93
292       1  14      6  5195   NA  2.22    9.67 10.35 1.55e-05    0.0689 -1.95
12237    27  11      5 13493   NA  3.80    8.45  9.17 3.46e-05    0.1145 -2.03
15180    33  18     22  1831   NA  4.62    9.16  9.11 3.61e-05    0.1145 -2.03
 …………………


Many thanks,


Jixin
 



More information about the Bioconductor mailing list