SVA combat error covariate is confounded with batch
Entering edit mode
7 months ago
CL ▴ 20

I am analysing RNA-seq data consisting of 3 different groups of samples, 2 different tumour types and the control normal tissue. The design is not balanced since one of the tumour types comes from a different batch (in house), and the other data from the other tumour type and normal come from TCGA downloaded data. Even knowing that, I would like to remove the batch effect but also to retain biological differences when accounting for this.

factor 1-- > group, with 3 levels (tumour type a, tumour type b, and normal )

factor 2 -- > class, with 2 levels (tumour, non tumour)

factor 3 -- > batch, with 25 levels corresponding to 25 different runs

To do so, I am using ComBat as follows, but I am getting this error.

modcombat <- model.matrix(~as.factor(group) + as.factor(class), data=design_data)
combat_data <- ComBat(dat=y_norm, \
                      batch= design_data$run,\
                      mean.only = TRUE)

Using the 'mean only' version of ComBat
Adjusting for3covariate(s) or covariate level(s)
Error in ComBat(dat = y_norm, batch = design_data$run, mod = modcombat,  : 
  At least one covariate is confounded with batch! Please remove confounded covariates and rerun ComBat

I would appreciate any suggestions about the best model to not lose biology.


RNA-Seq R • 1.0k views
Entering edit mode

Can you please show a table where for each sample one can clearly see which covariates are assigned?

Entering edit mode

Here I am showing some bits of the 3 main groups

          SampID Run group  class
1   TCGA.64.1681    2066  tum1 tumour
2   TCGA.78.7166    2066  tum1 tumour
3   TCGA.50.6595    1858  tum1 tumour
4   TCGA.55.6986    1949  tum1 tumour
5   TCGA.97.8547    2403  tum1 tumour
6   TCGA.38.4632    1755  tum1 tumour
7   TCGA.55.6985    1949  tum1 tumour
8   TCGA.50.5044    1858  tum1 tumour
9   TCGA.78.7540    2066  tum1 tumour
10  TCGA.L9.A7SV    A39D  tum1 tumour
11  TCGA.75.7027    1949  tum1 tumour
12  TCGA.55.8616    2403  tum1 tumour
13  TCGA.78.7145    2039  tum1 tumour
14  TCGA.49.4486    1206  tum1 tumour

242 TCGA.32.2463A   5980    normal  nonTumour

           SampID Run group  class
571         Samp1_T       1  tum2 tumour
572  Samp2_T       1  tum2 tumour
573  Samp3_T       2  tum2 tumour
574 Samp4_T       2  tum2 tumour
575   Samp5_T       2  tum2 tumour
576 Samp6_T       2  tum2 tumour`

Login before adding your answer.

Traffic: 2691 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