Question: design matrix for 4 groups in edgeR
0
10 weeks ago by
sandraggava0 wrote:

Hello,

I have RNASeq data from 4 groups with 3 biological replicates. The conditions are: 1) untreated, 2) treated with a drug, 3)infected with a virus, and 4) treated and infected. I am looking for DE genes unique for the treated and infected group (condition 4). I am wondering which model is the best for these data? I used "design <- model.matrix(~treatment + infection + treatment*infection)", but it is quite difficult to interpret.

Thanks in advance for any help.

Sandra

edger • 151 views
modified 10 weeks ago by Gordon Smyth38k • written 10 weeks ago by sandraggava0
Answer: Question: design matrix for 4 groups in edgeR
0
10 weeks ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:

Why don't you follow the simpler approach that we almost always recommend, which is to combine treatment and infection into one factor with four levels? It's much easier to work with, see Section 3.3.1 of the edgeR User's Guide.

Dear Smyth,

Thank you for your answer. When I tried to combine treatment and infection into one factor with four levels and used the infected+treated group as the contrast, the program returned that all genes were down-regulated.

Follows the code I have used, if you kindly could help me. Am I wrong? I will be extremely grateful.

group <- factor(c(rep("Treated cells",3), rep("Infected/Treated cells",3),
rep("Untreated cells",3), rep("Infected cells",3)))
y = DGEList(counts=x, group = group)

y <- calcNormFactors(y)

design <- model.matrix(~0+group)

y <- estimateDisp(y, design, robust=TRUE)
fit <- glmQLFit(y, design, robust=TRUE)

res <- glmQLFTest(fit, coef = 3)

is.de <- decideTestsDGE(res, lfc=log2(1.5), p.value=0.01)

summaryis.de)
Infected/Treated cells
Down       13530
NotSig         0
Up             0


But you haven't defined a contrast. To do a meaningful test of differential expression, you have to compare one group with another. So far, you haven't made any comparison. Which of the other groups do you want to compare infected+treated with?

Please have a look at the section of the User's Guide I referred you to or else to one of the worked examples.