[BioC] lmFit not keeping rownames of arg object?

Gordon K Smyth smyth at wehi.EDU.AU
Sat Apr 20 10:01:46 CEST 2013


Dear Leif,

Yes, you're right.  I made two sets of changes to limma on the same day 
(15 April 2013) but didn't bump the version number the second time, 
thereby confusing biocLite().  Version number now bumped to 3.17.4.

Best wishes
Gordon

On Fri, 19 Apr 2013, Leif Väremo wrote:

> Dear Gordon,
>
> An update to my previous mail. I did now try with the latest version of
> limma through svn (still version 3.17.3 though), built and installed, and
> the problem disappeared. Did you just not bump the version number so it did
> not get passed to the build system?
>
> My previous tries were on installations through biocLite().
>
> Kind regards
> Leif
>
>
> On Fri, Apr 19, 2013 at 12:49 PM, Leif Väremo <varemo at chalmers.se> wrote:
>
>> Dear Gordon,
>>
>> I removed and reinstalled limma, just to be sure. Here is my output when
>> running your example in a "fresh" R session, still I have the problem when
>> using the coef argument:
>>
>>> library(limma)
>>> 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]
>> [1] "b" "s" "v" "e" "y"
>>>   rownames(topTable(fit,coef=1))[1:5]
>> [1] "19" "2"  "25" "18" "16"
>>> sessionInfo()
>> R version 3.0.0 (2013-04-03)
>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>>
>> locale:
>> [1] LC_COLLATE=Swedish_Sweden.1252  LC_CTYPE=Swedish_Sweden.1252
>>  LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C
>>  LC_TIME=Swedish_Sweden.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] limma_3.17.3         BiocInstaller_1.11.0
>>
>> loaded via a namespace (and not attached):
>> [1] tools_3.0.0
>>
>>
>> The above is run on my laptop. I also tried on a linux remote computer
>> with the same result, here is the session info for that:
>>
>>> sessionInfo()
>> R version 3.0.0 (2013-04-03)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>
>> locale:
>>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>>  [7] LC_PAPER=C                 LC_NAME=C
>>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] limma_3.17.3         BiocInstaller_1.10.0
>>
>> loaded via a namespace (and not attached):
>> [1] tools_3.0.0
>>
>> Kind regards
>> Leif
>>
>>
>> On Fri, Apr 19, 2013 at 1:20 AM, Gordon K Smyth <smyth at wehi.edu.au> wrote:
>>
>>> 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-****<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://www.stat.math.ethz.ch/pipermail/bioconductor/2013-April/052127.html>
>>>>>>
>>>>> https://stat.ethz.ch/****pipermail/bioconductor/**<https://stat.ethz.ch/**pipermail/bioconductor/**>
>>>>> attachments/20130415/b0009b65/****attachment.pl<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 intended solely for the
>>> addressee.
>>> You must not disclose, forward, print or use it without the permission of
>>> the sender.
>>> ______________________________**______________________________**
>>> __________
>>>
>>
>>
>

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:5}}


More information about the Bioconductor mailing list