[BioC] How to save result from limma
Cei Abreu-Goodger
cei at sanger.ac.uk
Tue Aug 12 22:15:18 CEST 2008
In many cases, I tend to prefer the topTable output if only for the
reason that the "ID" column comes first (I know, a very poor reason). Is
there any strong reason why we should never use topTable for full
output? I thought that, at least for single contrasts, the information
is the same than what can be obtained by write.fit. Also, having a
data.frame object helps manipulation prior to saving as a file.
Cei
James W. MacDonald wrote:
> Actually, write.fit() is what you are looking for. From ?topTable:
>
> Note:
>
> This is not the right function to use to create summary statistics
> for all the probes on an array. Please consider using 'write.fit'
> or 'write' for this purpose, rather than using 'topTable' with
> 'number=nrow(fit)'.
>
> ;-P
>
> Jenny Drnevich wrote:
>> Hi Jixin,
>>
>> You're mixing up the functions topTable() and write.table() and their
>> arguments. Try this:
>>
>> > allgenes <- topTable(fit, number= nrow(fit), adjust="BH")
>> > write.table( allgenes, file= "la.txt")
>>
>> HTH,
>> Jenny
>>
>> At 01:58 PM 8/12/2008, Wang, Jixin wrote:
>>> 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 _______________________________________________ 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
>>
>> _______________________________________________
>> 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
>
--
Cei Abreu-Goodger, PhD
Wellcome Trust Sanger Institute
Computational and Functional Genomics
Wellcome Trust Genome Campus
Hinxton, Cambridge, CB10 1SA, UK
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
More information about the Bioconductor
mailing list