Help with multiple batch effects
Entering edit mode
Fp • 0
Last seen 4.3 years ago

Hello, I have an expression matrix of 1208 samples (1095 tumor and 113 normal) downloaded from TCGA. I know there are 3 batch effects: type, plateId and TSS. I've tried to correct for them with Combat but I need a little help with the model.matrix. 

There is something wrong. The error message says: Error in ((dat - t(design %% B.hat))^2) %% rep(1/n.array, n.array) : requires numeric/complex matrix/vector arguments

Is there anyone who can help me? I'm a student. Thanks in advance. The code is:



##correct for group

mod.1<- model.matrix(~plateId+TSS, data=batch) 
bat.1<- ComBat(dat=dati, batch$group, mod.1, mean.only = TRUE, par.prior=TRUE, prior.plots=FALSE)

##correct for plateId

mod.2<- model.matrix(~group+TSS, data=batch) 
bat.2<- ComBat(dat=bat.1, batch$plateId, mod.2, mean.only = TRUE,par.prior=TRUE, prior.plots=FALSE)

##correct for TSS

mod.3<- model.matrix(~group+plateId, data=batch) 
bat.3<- ComBat(dat=bat.2, batch$TSS, mod.3, mean.only = TRUE,par.prior=TRUE, prior.plots=FALSE)


combat sva batch effect • 398 views

Login before adding your answer.

Traffic: 617 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6