I wish to raise a question regarding the detection of differentially expressed genes from combined datasets. So as to merge two expression microarray datasets, following the combination of series matrices and their corresponding annotation files, I used the ComBat function in sva package to remove the batch effect. However, as a beginner bioinformatician, I have almost no idea how to take advantage of the retrieved output of ComBat function of sva package in the Limma package in order to find differentially expressed genes. Therefore, some errors occur usually while I am trying to do so. Accordingly, I pasted an excerpt from my codes in the following to gain your precious help in providing me easy-to-do R codes for approaching my purpose.
If you have time to guide me I will be immensely grateful.
I am looking forward to your response.
*An excerpt from my code:
library(sva) library(limma) allc <- ComBat(as.matrix(all), batch = batch) allm <- allc - rowMeans(allc) allm$description <- factor(gr) design <- model.matrix(~ description + 0, as.data.frame(allm)) colnames(design) <- levels(factor(gr)) fit <- lmFit(as.matrix(allm), design) cont.matrix <- makeContrasts(Case-Control, levels=design) fit2 <- contrasts.fit(fit, cont.matrix) fit2 <- eBayes(fit2, 0.01) tT <- topTable(fit2, adjust="fdr", sort.by="B", number=Inf)