Question: design matrix for 4 groups in edgeR
0
12 days 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 • 106 views
modified 11 days ago by Gordon Smyth38k • written 12 days ago by sandraggava0
Answer: Question: design matrix for 4 groups in edgeR
0
11 days 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.

I want to compare the infected+treated group to the other 3 groups (untreated, infected, and treated). To search for DE genes unique for the treated+infected group. I look for genes that are differentially expressed in the group that I have both conditions simultaneously (Infection and treatment), to know the effect of this conditions simultaneously, without taking into account the effects only of infection or treatment (which I have already compared by untreated vs infected and untreated vs treated).

Content
Help
Access

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