RUVg correction
0
0
Entering edit mode
21 days ago

RUVg correction

How can I improve RUVg correction? The RLE plot isn't still perfect

design = model.matrix(~factor, data = pData(set1))
design=as.matrix(design)
y <- DGEList(counts=counts(set1), group=factor)
y <- calcNormFactors(y, method="TMM")
y <- estimateGLMCommonDisp(y, design)
y <- estimateGLMTagwiseDisp(y, design)
fit <- glmFit(y, design)
lrt <- glmLRT(fit, coef=ncol(fit$design))
top <- topTags(lrt, n=nrow(set1))$table
empirical <- rownames(set1)[which(!(rownames(set1) %in% rownames(top)[1:5000]))]

library(RUVSeq)

set2 <- RUVg(set1, empirical, k=3)

W=pData(set2)

ruv_counts=as.data.frame(set2@assayData[["normalizedCounts"]])

rownames(W)=NULL

W=W[,-1]

W=as.matrix(W)

sce2 <- SingleCellExperiment(assays = list(counts =ruv_counts))

colData(sce2)$Institute=sampleInfo$Sample.supplying.institution
colData(sce2)

plotRLE(sce2, exprs_values = "counts", exprs_logged=FALSE, color_by = colData(sce2), style = "minimal")+
 ggtitle("After RUVg correction")
differential-expression ruvseq • 125 views
ADD COMMENT

Login before adding your answer.

Traffic: 1983 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6