library(limma)
library(edgeR)
data(lymphomaRNAseq)
x <- lymphomaRNAseq
sel <- rowSums(cpm(x$counts)>0.5)>=3
x <- x[sel,]
genotype <- relevel(x$samples$group, "Smchd1-null")
x <- calcNormFactors(x, method="TMM")
des <- model.matrix(~genotype)
## Apply voom with sample quality weights and fit linear model
v <- voomWithQualityWeights(x, design=des, normalization="none", plot=FALSE)
vfit <- lmFit(v,des)
## Apply treat relative to a fold-change of 1.5
vtfit <- treat(vfit,lfc=log2(1.5))
vfit <- eBayes(vfit)
results <- decideTests(vfit,p.value=0.01)
glMDPlot(vfit, counts=x$counts, anno=x$genes, groups=genotype, samples=1:7,
status=results[,2], main="MD plot: Wild-type vs Smchd1",
display.columns=c("Symbols", "GeneID", "GeneName"),
folder="Smchd1-Lymphoma")
Run the code above in your browser using DataLab