[BioC] lmFit not keeping rownames of arg object?
Gordon K Smyth
smyth at wehi.EDU.AU
Fri Apr 19 01:20:34 CEST 2013
Dear Leif,
I cannot reproduce the behaviour that your example shows. Here is a
reproducible example showing that the rownames do not disappear:
----
y <- matrix(rnorm(26*4),26,4)
rownames(y) <- letters[1:26]
design <- cbind(1,c(0,0,1,1))
fit <- lmFit(y,design)
fit <- eBayes(fit)
rownames(topTable(fit))[1:5]
rownames(topTable(fit,coef=1))[1:5]
This gives
> rownames(topTable(fit))[1:5]
[1] "c" "k" "o" "x" "b"
> rownames(topTable(fit,coef=1))[1:5]
[1] "c" "b" "o" "a" "j"
>
[1] limma_3.17.3
> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] limma_3.17.3
------
Your example shows exactly the behavior that the change in 3.17.3 was
intended to fix. Could you please give some example code that I can run
together with output from sessionInfo().
BTW, note that
rownames(fit)
is equivalent to
rownames(fit$coefficients)
Best wishes
Gordon
---------------------------------------------
Professor Gordon K Smyth,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
http://www.statsci.org/smyth
On Thu, 18 Apr 2013, Leif Väremo wrote:
> Dear Gordon,
>
> Thanks for clarifying this. My followup question will then regard the
> rownames of the topTable output.
>
> If I use topTable with only an input, the table looks fine.
> But if I use the argument coef=1, the rownames disappear.
> See my example (using limma_3.17.3):
>
>> rownames(fitContrasts$coefficients)[1:5]
> [1] "1769308_at" "1769311_at" "1769312_at" "1769313_at" "1769314_at"
>> rownames(topTable(fitContrasts))[1:5]
> [1] "1774122_at" "1775717_at" "1779660_at" "1770580_at" "1771091_at"
>> rownames(topTable(fitContrasts,coef=1))[1:5]
> [1] "2492" "655" "5398" "5090" "2233"
>
> Is this also intended?
> Sorry if I am making an obvious mistake.
>
> Kind regards
> Leif
> ____________________________________________________
>
> *Leif Väremo*,* *PhD student
>
> *Systems and Synthetic Biology*
> Department of Chemical and Biological Engineering
> Chalmers University of Technology
> Kemivägen 10, SE-412 96 Göteborg
>
>
> On Thu, Apr 18, 2013 at 2:25 AM, Gordon K Smyth <smyth at wehi.edu.au> wrote:
>
>> Dear Leif,
>>
>> I've cc'd to the Bioconductor mailing list because this will be of
>> interest to others.
>>
>> Yes, this is an intended update. The rownames are passed on, but as
>> rownames of fit$coefficients, rather than as a column in the $genes
>> component.
>>
>> If you use topTable() you will see that the rownames of object are now
>> preserved as rownames of the output table. This is new in limma 3.17.3.
>>
>> See the recent discussion:
>>
>> https://www.stat.math.ethz.ch/**pipermail/bioconductor/2013-**
>> April/052127.html<https://www.stat.math.ethz.ch/pipermail/bioconductor/2013-April/052127.html>
>> https://stat.ethz.ch/**pipermail/bioconductor/**
>> attachments/20130415/b0009b65/**attachment.pl<https://stat.ethz.ch/pipermail/bioconductor/attachments/20130415/b0009b65/attachment.pl>
>>
>> Best wishes
>> Gordon
>>
>> ------------------------------**---------------
>> Professor Gordon K Smyth,
>> Bioinformatics Division,
>> Walter and Eliza Hall Institute of Medical Research,
>> 1G Royal Parade, Parkville, Vic 3052, Australia.
>> http://www.statsci.org/smyth
>>
>>
>> On Wed, 17 Apr 2013, Leif Väremo wrote:
>>
>> Dear Gordon,
>>>
>>> In the limma function lmFit, the output object contains an element $genes
>>> which is the rownames of the input argument 'object'. This is true for
>>> version 3.16.0.
>>>
>>> However in the current devel version (3.17.3) the rownames seem not to be
>>> passed, and the $genes element is simply NULL.
>>>
>>> Is this an intended update or will it be fixed?
>>>
>>> Sincerely,
>>> Leif
>>> ______________________________**______________________
>>>
>>> *Leif Väremo*,* *PhD student
>>>
>>> *Systems and Synthetic Biology*
>>>
>>> Department of Chemical and Biological Engineering
>>> Chalmers University of Technology
>>> Kemivägen 10, SE-412 96 Göteborg
>>>
>>> Mobile: +46 (0)705 44 26 43
>>> Office: +46 (0)31 772 38 86
>>> Fax: +46 (0)31 772 38 01
>>> Room: 3057B
>>> www.sysbio.se
>>> www.chalmers.se
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:5}}
More information about the Bioconductor
mailing list