Search
Question: Combat - error - system is computationally singular
0
gravatar for stefano.mangiola
3.9 years ago by
Australia
stefano.mangiola0 wrote:

Hello,

I am using Combat over a RNA-seq dataset, transformed with Voom. Combat is giving me a strange error, since my design matrix seems unambiguous.

----------------------------------------------------

#Conditions

> myGroups

 [1] b     b     b     b     b     lgnmi lgnmi lgnmi lgnmi hgnmi hgnmi hgnmi
Levels: b hgnmi lgnmi

> d <- calcNormFactors(d)
> v <- voom(d,myDesign,plot=TRUE)

> myDesign
   myGroupsb myGroupshgnmi myGroupslgnmi myBatch
1          1             0             0       1
2          1             0             0       1
3          1             0             0       1
4          1             0             0       2
5          1             0             0       2
6          0             0             1       1
7          0             0             1       2
8          0             0             1       2
9          0             0             1       2
10         0             1             0       1
11         0             1             0       1
12         0             1             0       2
attr(,"assign")
[1] 1 1 1 2
attr(,"contrasts")
attr(,"contrasts")$myGroups
[1] "contr.treatment"

> ComBat(
    dat=as.matrix(v$E), 
    batch=myBatch, 
    mod=myDesign[,1:3],
    prior.plots=T
  )

Found 2 batches
Found 3  categorical covariate(s)
Standardizing Data across genes
Error in solve.default(t(design) %*% design) : 
  system is computationally singular: reciprocal condition number = 1.4803e-17

----------------------------------------------------

 

Some idea? Thanks

ADD COMMENTlink modified 3.9 years ago by Peter Langfelder1.5k • written 3.9 years ago by stefano.mangiola0
1
gravatar for Peter Langfelder
3.9 years ago by
United States
Peter Langfelder1.5k wrote:

Remove one of the covariates (myGroup<something>) - they are not linearly independent. Some of any two gives one minus the third one. It shouldn't matter which one you remove; run ComBat with two of them as covariates.

HTH,

Peter

ADD COMMENTlink written 3.9 years ago by Peter Langfelder1.5k

"Some of any two" shoudl have read "Sum of any two"... sorry.

ADD REPLYlink written 3.9 years ago by Peter Langfelder1.5k

Your own posts have an "edit" link below them that you can use to modify them to fix this error ;-)

ADD REPLYlink written 3.9 years ago by Steve Lianoglou12k
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 2.2.0
Traffic: 337 users visited in the last hour