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))
You will have to better define "satisfactory result". To remove a batch effect, take a look at removeBatchEffects, also from limma