[BioC] How to save result from limma
Jenny Drnevich
drnevich at illinois.edu
Tue Aug 19 17:03:44 CEST 2008
At 06:14 PM 8/13/2008, Gordon K Smyth wrote:
>OK, I've added sort="none" to the possibilities.
>
>Best wishes
>Gordon
Hi Gordon,
Should this change to topTable be up on BioC by now? I just updated
my packages on R 2.7.1 and the latest limma_2.14.5 does not have it.
Neither does the developmental version limma_2.15.10 on R 2.8.0 dev.
Usually your changes appear very quickly...
Thanks again for adding it!
Jenny
>On Wed, 13 Aug 2008, Jenny Drnevich wrote:
>
>>Hi Gordon,
>>
>>I guess a sort="none" would be better - I was just thinking about
>>what I have to do, and not what would make the most sense in the
>>function! One advantage of the output from topTable over the fitted
>>model object is that it contains adjusted p-values while the other
>>only contains the raw p-values. I do different manipulations with
>>the topTable results depending on what my clients want, but almost
>>invariably I back calculate to regular fold-changes and remove the
>>t and B columns at the very least. Some want separate "up" and
>>"down" lists, some want me to put "up" and "down" in the output,
>>some want expression levels added, etc.
>>
>>Cheers,
>>Jenny
>>
>>At 06:07 PM 8/12/2008, Gordon K Smyth wrote:
>>>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
>>>>>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
>>
>
>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