heatmap with batch effect
1
0
Entering edit mode
tothuhien • 0
@tothuhien-16688
Last seen 16 hours 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 • 55 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 7 hours 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.

Login before adding your answer.

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