Hello,
I was using ComBat-seq
from the sva
package to correct the batch effects for my RNA-seq samples, which were from two different batches but exactly the same platform.
Before doing this, I've checked my data for batch effects, here is the code I used and returned results:
library(DESeq2)
sample_info <- data.frame(sample = colnames(count_mat),
condition = factor(rep(c("pre_treat", "post_treat"),
times = 9)),
batch = factor(c(rep(1, 8), rep(2, 10))))
rownames(sample_info) <- sample_info$sample
dds <- DESeqDataSetFromMatrix(countData = count_mat,
colData = sample_info,
design= ~ condition+batch)
pca_dat <- plotPCA(DESeqTransform(dds), intgroup=c("condition", "batch"),
returnData=TRUE)
I did the batch effects correction with ComBat-seq
, and the input counts was the raw counts matrix, similarly, I also plotted the PCA:
gene_exp_adj <- ComBat_seq(counts = counts, batch = sample_info$batch,
group = sample_info$condition)
but apparently, the results didn't change much:
I also performed same analysis on my lncRNA datasets, and the results of before/after batch correction were very similar. Does anyone know why? Or is there another tool I could try? Any advice would be appreciated!
What do you mean when you say it didn't work. Was there an error, or was the batch effect not resolved?
The later case, the batch effects didn't seem to be resolved.
Are you sure there’s any actual batch effects to begin with? I’m not an RNAseq expert but it doesn’t seem like it.
Maybe the results for my lncRNA datasets is more obvious, nothing seems to have changed: before batch correction
after batch correction