[BioC] How to save result from limma

Gordon K Smyth smyth at wehi.EDU.AU
Wed Aug 13 01:07:24 CEST 2008


Hi Jenny,

It would seem a waste to resort toptable by names ... that would 
essentially amount to sorting the table, and then unsorting it again. 
Something like sort="none" would be better.  Also given that limma handles 
data from all sorts of microarray platforms, it always can't be relied on 
that the rownames are gene names.

My comment about toptable not being the right function, was on the 
assumption that anyone creating a toptable of all probes was likely to 
write it out to a file.

If you find topTable a useful way to get summary statistics for the whole 
arrays, that's fine.  What sort fo manipulations do you do with the 
toptable in R?  I guess my thought was that most calculations in R would 
be done with the fitted model object directly.

Best wishes
Gordon

On Tue, 12 Aug 2008, Jenny Drnevich wrote:

> Yeah, now I remember that being in the help page for topTable(). However, I'm 
> not sure why it's not the "right" function. Assuming all the arguments are 
> equivalent, the values are the same as those output from write.fit(). I like 
> topTable() better because it gives you both the raw p-values and the adjusted 
> P-values. Maybe it's wrong function because it will give you the genes in 
> different orders for each coefficient? I prefer it to write.fit so I can work 
> with the values in R without having to read the output file back in! However, 
> I do have to re-sort it if I want to use with other objects I've created. 
> I've always wanted a resort.by option of "gene" that would do my resorting 
> automatically:
>
>> allgenes <- topTable(fit,number=nrow(fit))
>
>> allgenes <- allgenes[order(as.numeric(rownames(allgenes))),]
>
> Any chance of you adding that in the future, Gordon? If not, maybe you can 
> expand upon why topTable is not the "right" function.
>
> Thanks!
> Jenny
>
> At 02:47 PM 8/12/2008, 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



More information about the Bioconductor mailing list