This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Batch correction and DE analysis of miRNA Seq data

Hello everyone,

I want to do the batch correction and DE analysis. I have miRNA seq read count for 448 samples. Total no of batches 25 but 7,8 and 25 batch showing the problem. I have 04 growth function wants to do a pairwise comparison between them. I am using limma, but not getting a satisfactory result, please give your suggestion what should I need to do.

Here is the script:

d<-DGEList(counts=count)
y<-calcNormFactors(d,method = "TMM")
design <- model.matrix(~0+type+batch)
colnames(design) <- gsub("type", "", colnames(design))
contr.matrix <- makeContrasts(Ng1vsEd2 = Ng1-Ed2,
                              Ed2vsRg3 = Ed2 - Rg3,
                              Rg3vsrged4 = Rg3 - rged4,
                              Ng1vsRg3 = Ng1 - Rg3, 
                              Ng1vsrged4 = Ng1 - rged4, 
                              Ed2vsrged4 = Ed2 - rged4, 
                              levels = colnames(design))
v <- voom(y, design, plot=TRUE)
vfit <- lmFit(v, design)
fit2 <- eBayes(vfit)
topTable(fit2, coef=ncol(design))
summary(decideTests(fit2))
mirnaseq differential-expression batch-effect

You will have to better define "satisfactory result". To remove a batch effect, take a look at removeBatchEffects, also from limma

1 answer

How have you determined the batch effect? A PCA/MDS plot?

Batch effects are normally removed from the data set (e.g., using removeBatchEffects) for visualisation purposes. For example, you can observe PCA plots with a) the batch still there; and b) the batch removed. However, you should not feed batch-corrected data into differential expression analysis.

It's much better to incorporate the batch into your linear model design for differential expression, as you have done. However, your variable of interest should go at the end of the formula. So, instead of design <- model.matrix(~0+type+batch), do design <- model.matrix(~0+batch+type). See if that makes your results better.

If you still observe "weird" batch effects, you could also detect, and model for, any other batch effects using sva (see "Removing hidden batch effects" at https://f1000research.com/articles/4-1070/v2).

Ok!! Thank you for your response. I will Try.

Please up-vote answers/comments that have helped. If this answer by cfos4698 solves your problem, then please mark it as accepted.

Log in to answer this question.