[BioC] DESeq2 error: inv(): matrix appears to be singular
Michael Love
michaelisaiahlove at gmail.com
Tue Mar 11 23:02:03 CET 2014
hi Hugo,
I've commited DESeq2 version 1.3.48, which fixes the error when I run your dds.
Mike
On Tue, Mar 11, 2014 at 1:02 PM, Michael Love
<michaelisaiahlove at gmail.com> wrote:
> Hi Hugo,
>
> Thanks for the reproducible example. This also occurs in devel. I'll
> email when I've come up with a fix.
>
> Meanwhile, i think the following line should resolve the error, which
> centers and scales the continuous variable. If you want the log2 fold
> change back on the original scale by afterwards dividing out
> attr(colData(dds)$conti, "scaled:scale").
>
>> colData(dds)$conti <- scale(colData(dds)$conti)
>> DESeq(dds)
> using pre-existing size factors
> estimating dispersions
> gene-wise dispersion estimates
> mean-dispersion relationship
> final dispersion estimates
> fitting model and testing
> class: DESeqDataSet
> dim: 14499 16
> exptData(0):
> assays(3): counts mu cooks
> rownames(14499): feature1 feature2 ... feature14498 feature14499
> rowData metadata column names(29): baseMean baseVar ... deviance
> maxCooks
> colnames(16): sample1 sample2 ... sample15 sample16
> colData names(4): sample dicho conti sizeFactor
>
>
>
> Mike
>
> On Tue, Mar 11, 2014 at 11:12 AM, Michael Love
> <michaelisaiahlove at gmail.com> wrote:
>> Hi Hugo,
>>
>> Thanks.
>>
>> Could you possibly send me a small reproducible example (dds object which
>> throws this error)? I've worked on the dispersion estimation in the
>> development version, and this might clear up the error.
>>
>> Mike
>>
>> On Mar 11, 2014 10:55 AM, "Hugo Varet" <hugo.varet at pasteur.fr> wrote:
>>>
>>> Sure, here it is :
>>>
>>> R version 3.0.2 (2013-09-25)
>>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>>>
>>> locale:
>>> [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
>>> LC_MONETARY=French_France.1252 LC_NUMERIC=C
>>> [5] LC_TIME=French_France.1252
>>>
>>> attached base packages:
>>> [1] parallel stats graphics grDevices utils datasets methods
>>> base
>>>
>>> other attached packages:
>>> [1] DESeq2_1.2.10 RcppArmadillo_0.4.100.2.1 Rcpp_0.11.0
>>> GenomicRanges_1.14.4 XVector_0.2.0
>>> [6] IRanges_1.20.7 BiocGenerics_0.8.0
>>>
>>> loaded via a namespace (and not attached):
>>> [1] annotate_1.40.1 AnnotationDbi_1.24.0 Biobase_2.22.0
>>> DBI_0.2-7 genefilter_1.44.0 grid_3.0.2
>>> lattice_0.20-27
>>> [8] locfit_1.5-9.1 RColorBrewer_1.0-5 RSQLite_0.11.4
>>> splines_3.0.2 stats4_3.0.2 survival_2.37-7 XML_3.98-1.1
>>> [15] xtable_1.7-3
>>>
>>> Hugo
>>>
>>> Hugo Varet
>>> Plate-Forme Transcriptome et Epigénome
>>> Institut Pasteur
>>> Mél. : hugo.varet at pasteur.fr
>>> Tél. : 01-40-61-35-13
>>>
>>> Le 11/03/2014 15:50, Michael Love a écrit :
>>>
>>> Hi Hugo,
>>>
>>> Can you provide the ouput of sessionInfo()
>>>
>>> Mike
>>>
>>> On Mar 11, 2014 10:38 AM, "Hugo Varet" <hugo.varet at pasteur.fr> wrote:
>>>>
>>>> Dear Mike Love and list members,
>>>>
>>>> I'm running DESeq2 with a design containing two covariates: the first is
>>>> dichotomous while the second is continuous. Here is the data.frame I put in
>>>> colData(dds):
>>>> sample dicho conti
>>>> 1 0 4.577032
>>>> 2 0 4.462997
>>>> 3 1 5.024896
>>>> 4 1 4.543696
>>>> 5 1 5.542576
>>>> 6 1 5.356217
>>>> 7 1 4.593729
>>>> 8 1 4.243286
>>>> 9 1 5.164055
>>>> 10 0 4.565966
>>>> 11 0 4.565966
>>>> 12 0 4.760724
>>>> 13 1 5.428459
>>>> 14 1 4.515874
>>>> 15 1 4.412964
>>>> 16 1 4.426836
>>>>
>>>> I chose to study the design (~ dicho + conti) and to test the effect of
>>>> the continuous covariate on the counts (about 15,000 features). I can
>>>> compute the size factors, but when estimating the dispersions, I get the
>>>> following error:
>>>> > dds <- estimateDispersions(dds)
>>>> gene-wise dispersion estimates
>>>> error: inv(): matrix appears to be singular
>>>> Erreur : inv(): matrix appears to be singular
>>>>
>>>> I think the error does not come from the design which is of full rank and
>>>> which works if I use a subset of the features. Moreover, with a design as (~
>>>> dicho + conti + dicho:conti), I do not meet the error ! Do you have any idea
>>>> of the origin of the problem ?
>>>>
>>>> Best regards,
>>>>
>>>> Hugo
>>>>
>>>> --
>>>> Hugo Varet
>>>> Plate-Forme Transcriptome et Epigénome
>>>> Institut Pasteur
>>>> Mél. : hugo.varet at pasteur.fr
>>>> Tél. : 01-40-61-35-13
>>>>
>>>> _______________________________________________
>>>> Bioconductor mailing list
>>>> Bioconductor at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>>> Search the archives:
>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>
>>>
>>
More information about the Bioconductor
mailing list