heatmap with batch effect
1
0
Entering edit mode
tothuhien • 0
@tothuhien-16688
Last seen 29 days ago
Norway

Hi, We have 2 groups of control samples that belong to 2 different batches, so I used DESeq2 with the desgin ~Batch+Condition for the test. We are pretty happy with the results. Then we want to visualize the counts with heatmap. I used the function limma::removeBatchEffect to get the counts to plot but we still see very clear different pattern between the 2 batches. Is it expected and should we be worry about this? Here's the code I used the get the couns

vsd <- vst(dds)
vsd$Batch <- as.factor(vsd$Batch)
assay(vsd) <- limma::removeBatchEffect(assay(vsd), vsd$Batch)
top <- assay(vsd)[top_index,] %>% as.data.frame()
pheatmap(top,annotation_col = annot_col, scale = "row", cluster_cols = F,  show_rownames = F

The heatmap

Thanks a lot.

DESeq2 BatchEffect • 493 views
ADD COMMENT
0
Entering edit mode

When you are wondering what game to play for fun and entertainment, I recommend you try the eggy car game once, it is really interesting and funny. Let's explore happily.

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States

You have only one condition in the second batch, so it's not possible to remove the batch effect. You can probably adjust for it somewhat, but you are likely also removing some biological signal, as batch and treatment are correlated. In the future you want to make sure you have both conditions in both batches, which will make batch and condition orthogonal.

0
Entering edit mode

Hi, thank you very much for your reply. Yes what you said is true. Sorry I forgot to say that this is a just subset of samples. There are more samples with different conditions and batches, this is the full experiment we have:

enter image description here

and the subset I asked previously is marked in the red rectangle.

Including all samples in the experiement, DESeq2 did not complain anything as it did when I only used a subset samples (full model matrix is less than full rank).

So do you think that the batch effects still can not be removed in this case, or should we only keep the control samples in the same batch with the treatment one.

Thanks again.

ADD REPLY
0
Entering edit mode

When you use removeBatchEffect it is simply computing the mean expression for each group and subtracting that out. If you have variability within each batch then that will remain.

ADD REPLY
0
Entering edit mode

ok I got it, thank you very much. That was very helpful.

ADD REPLY

Login before adding your answer.

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