Hello everyone,
I came across some chanllangings when using mROAST
to test a small gene set in my data.
My sample contains two cell lines, each with a time series design. I'd like to use makeContrast
to build and compare the time series responses of cell2 relative to cell1 in these gene sets, just like what I did in camera
.
However, I found it is not feasible. The results I'm getting by using the following codes were completely unreliable. I don't know where should I add the makeContrast
design. I think my codes only compare 0.5h vs 0h regardless of cell line factor.
I'd like to know how to achieve my purpose using mROAST
.
All the best,
Jiahao
time <- "0.5h"
target.i <- targets[targets$Time == "0h"|targets$Time == time,]
sample.i <- rownames(target.i)
expr.i <- expr[,sample.i]
treatment = factor(target.i$design, level=c("cell1_0h","cell1_0.5h",
"cell2_0h","cell2_0.5h"))
design <- model.matrix(~ 0 + treatment)
contrast <- makeContrasts(
t0.5h_vs_t0h = (cell2_0.5h - cell2_0h) - (cell1_0.5h - cell1_0h),
levels = design)
voom <- voom(expr.i, design, plot = FALSE)
roast.i <- mroast(voom, GeneList, design = design, contrast = ncol(design), nrot = 1000)
It's also worth pointing out that the syntax for
camera
andmroast
is the same, so I wonder how OP did the earliercamera
analysis.