Search
Question: Combat - error - system is computationally singular
0
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

modified 3.9 years ago by Peter Langfelder1.5k • written 3.9 years ago by stefano.mangiola0
1
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

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