Question: Error message with Voom with blocked design matrix
0
gravatar for raf4
14 months ago by
raf420
raf420 wrote:

Dear List,

I have encountered an error message in running Voom with weights with a blocked design matrix using what I hope to be a correct implementation of a method that Gordon Smyth told me about which I found to work well with microarrays. Briefly,

 

 

Here is the target file:

                    FileName                          Name  mouse           Target
    aaa1.1.1.WT_NDM_III_Sham      aaa1.1.1.WT_NDM_III_Sham      1  aaa.wt.ndm.sham
     aab1.1.5.WT_NDM_III_FAL       aab1.1.5.WT_NDM_III_FAL      1   aab.wt.ndm.fal
.
.
.
bba4.16.28.RKO_DM_D8551_Sham  bba4.16.28.RKO_DM_D8551_Sham     16  bba.rko.dm.sham
 bbb4.16.32.RKO_DM_D8551_FAL   bbb4.16.32.RKO_DM_D8551_FAL     16   bbb.rko.dm.fal

In the counts file, the columns, representing sames are in the same direction as the targets file with the same names.

Here is the code inclduing the design matrix and error message:

> des
   (Intercept) mouse2 mouse3 mouse4 mouse5 mouse6 mouse7 mouse8 mouse9 mouse10
1            1      0      0      0      0      0      0      0      0       0
2            1      0      0      0      0      0      0      0      0       0
.
.
.
31           1      0      0      0      0      0      0      0      0       0
32           1      0      0      0      0      0      0      0      0       0
   mouse11 mouse12 mouse13 mouse14 mouse15 mouse16
1        0       0       0       0       0       0
2        0       0       0       0       0       0
.
.
.
31       0       0       0       0       0       1
32       0       0       0       0       0       1
   aab.wt.ndm.falVSaaa.wt.ndm.sham aba.wt.dm.shamVSaaa.wt.ndm.sham
1                                0                               0
2                                1                               0
.
.
.
31                               0                               0
32                               0                               0
   abb.wt.dm.falVSaaa.wt.ndm.sham baa.rko.ndm.shamVSaaa.wt.ndm.sham
1                               0                                 0
2                               0                                 0
.
.
.
31                              0                                 0
32                              0                                 0
   bab.rko.ndm.falVSaaa.wt.ndm.sham bba.rko.dm.shamVSaaa.wt.ndm.sham
1                                 0                                0
2                                 0                                0
.
.
.
31                                0                                1
32                                0                                0
   bbb.rko.dm.falVSaaa.wt.ndm.sham
1                                0
2                                0
.
.
.
31                               0
32                               1
> png("fal.voomplot.png")
> v<-voomWithQualityWeights(y,design=des,normalization="none",plot=TRUE)
Coefficients not estimable: abb.wt.dm.falVSaaa.wt.ndm.sham bab.rko.ndm.falVSaaa.wt.ndm.sham bbb.rko.dm.falVSaaa.wt.ndm.sham 
Coefficients not estimable: abb.wt.dm.falVSaaa.wt.ndm.sham bab.rko.ndm.falVSaaa.wt.ndm.sham bbb.rko.dm.falVSaaa.wt.ndm.sham 
Warning messages:
1: Partial NA coefficients for 13355 probe(s) 
2: Partial NA coefficients for 13355 probe(s) 
> dev.off()

I did not receive the same error message when I ran the sample data with one factor ANOVA with limma-voom.

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] org.Mm.eg.db_3.6.0   AnnotationDbi_1.42.1 IRanges_2.14.5      
[4] S4Vectors_0.18.1     Biobase_2.40.0       BiocGenerics_0.26.0 
[7] edgeR_3.22.1         limma_3.36.1        

loaded via a namespace (and not attached):
 [1] locfit_1.5-9.1  Rcpp_0.12.16    lattice_0.20-35 digest_0.6.15  
 [5] grid_3.5.0      DBI_1.0.0       RSQLite_2.1.1   blob_1.1.1     
 [9] bit64_0.9-7     bit_1.1-12      compiler_3.5.0  pkgconfig_2.0.1
[13] memoise_1.1.0  

Please advise.

Thanks and best wishes, Rich

Richard A. Friedman, PhD
Columbia University Irving Medical Center

limma voom blocked design • 329 views
ADD COMMENTlink modified 14 months ago by Gordon Smyth37k • written 14 months ago by raf420

You haven't supplied enough information about your experimental design. I can guess that you have a matrix that is not of full rank, but without further information, it is not possible to diagnose exactly why that is the case. Please post the experimental design table (i.e., with mouse and Target information) in its entirety.

ADD REPLYlink written 14 months ago by Aaron Lun24k

Dear Aaron,

Thank you. I kept my note short to fit in the character limit. Gordon answered my question below.

Best wishes,

Rich

ADD REPLYlink modified 14 months ago by Gordon Smyth37k • written 14 months ago by raf420

Dear Gordon.

I am sorry I confused "warning" for "error". Thank for answering my question. duplicateCorrelation worked just fine.

Best wishes,

Rich

ADD REPLYlink modified 14 months ago by Gordon Smyth37k • written 14 months ago by raf420

Glad it helped. If my answer was what you were after, could you mark my answer as accepted? Then other readers will know that the question has an accepted answer.

ADD REPLYlink written 14 months ago by Gordon Smyth37k
Answer: Error message with Voom with blocked design matrix
1
gravatar for Gordon Smyth
14 months ago by
Gordon Smyth37k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth37k wrote:

Dear Rich,

As we often have to point out on this support site, you don't have an Error at all, rather you have a Warning.  I will repeat here some text from an answer I gave to someone else a while ago:

In R, an "Error" message always means that the operation has been stopped because of incorrect inputs or an illegal operation. By contrast, a "Warning message" always means the operation has run through to completion. The purpose of a warning message is to alert the user about something that is unusual, so the user can make a judgement call for themselves to decide whether they want to use the results. Users are assumed to have the expertise to make this judgement.

New users of R and Bioconductor often overlook the distinction between errors and warnings, so it's something we often have to point out on this support site. You shouldn't assume we are being rude to users when we do that. I've lost count of the number of times people have asked "why didn't my code run" and we have had to answer "but it did".

In your case, voomWithQualityWeights() has run correctly and has done what it is supposed to do. But it has also pointed out that there is a problem with your design matrix that you will probably need to deal with before you can do any sensible DE analysis. Your design matrix doesn't have linearly independent columns, so that many of the important coefficients can't be estimated.

Naturally you didn't get the same warning from a one-way layout, because for a one-way layout all the coefficients can be estimated.

You are an experienced statistician so I expect you will be able to recognise why your design matrix is over-parametrized, now that it has been pointed out.

I will say this though -- You are doing a paired analysis with only two samples per mouse. If you only have two samples per mouse, how many within-mouse treatments would you expect to be able to estimate? Is it possible that you intended to estimate a duplicateCorrelation for mouse instead of including mouse in the design matrix?

 

ADD COMMENTlink modified 14 months ago • written 14 months ago by Gordon Smyth37k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 322 users visited in the last hour