Combat - error - system is computationally singular
1
0
Entering edit mode
@stefanomangiola-6873
Last seen 3 days ago
Australia

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

combat software error rnaseq complex-design • 6.9k views
ADD COMMENT
1
Entering edit mode
@peter-langfelder-4469
Last seen 5 weeks ago
United States

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 845 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6