ANOVA like approach of edgeR
2
0
Entering edit mode
Talip ▴ 10
@talip-zengin-14290
Last seen 2 hours ago
Türkiye

Hi,
I am trying to determine differentially expressed genes between different statuses using edgeR with the ANOVA-like approach. Our experiment is very similar to the mouse mammary gland experiment described in the edgeR user's guide. I can compare the three statuses for either the L cell type or the B cell type separately, as shown below:

> targets
CellType    Status
B   virgin
B   virgin
B   pregnant
B   pregnant
B   lactate
B   lactate
L   virgin
L   virgin
L   pregnant
L   pregnant
L   lactate
L   lactate

> group <- factor(paste0(targets$CellType, ".", targets$Status))
> design <- model.matrix(~ 0 + group)
> fit <- glmQLFit(y, design, robust=TRUE)
> contrast <- makeContrasts(L.PvsL = L.pregnant - L.lactate, 
                          L.VvsL = L.virgin - L.lactate, 
                          L.VvsP = L.virgin - L.pregnant, levels=design)
> anova <- glmQLFTest(fit, contrast=contrast)
> topTags(anova, n=Inf, adjust.method = 'BH', sort.by = 'PValue')

However, I also want to find genes that are differentially expressed between the three statuses regardless of cell type. To do this, I would like to compare the 4 virgin, 4 pregnant, and 4 lactate samples together. How can I achieve this using the design above?

I have tried the following design, but it sets one of the statuses as a reference, and none of the statuses should serve as a reference or control:

> design <- model.matrix(~cell_type + status)
> fit <- glmQLFit(y, design)
> anova <- glmQLFTest(fit, coef=3:4)
> topTags(anova, n=Inf, adjust.method = 'BH', sort.by='PValue')
edgeR • 478 views
ADD COMMENT
3
Entering edit mode
@gordon-smyth
Last seen 34 minutes ago
WEHI, Melbourne, Australia

You need to clarify whether interactions are present for the two factors in your study. In the two factors do not interact, then the code you show is correct:

> design <- model.matrix(~cell_type + status)
> fit <- glmQLFit(y, design)
> anova <- glmQLFTest(fit, coef=3:4)

The fact that one of the statuses is parametrized as the reference is irrelevant, because the anova calculations are invariant to how the factors are parametrized. You will get the same anova tests regardless of which if any of the levels are set as the reference.

If interactions are present, however, then you need to use code like Yunshun has given. That does not give you "differential expression between the three statuses regardless of cell type" because you cannot ignore cell type in the presence of interactions. It is rather a test for "differential expression between the three statuses for either cell type".

ADD COMMENT
0
Entering edit mode

I am comparing the expression patterns of different tissue cell lines (CellType) under five distinct media conditions (Status). Since the cell types inherently have different expression patterns, the effect of a medium may vary across cell types, indicating a potential interaction between medium and cell type. However, I am unsure if this interaction is significant. How can I test for the presence of such an interaction? My ultimate goal is to identify common upregulated or downregulated genes across different cell types under varying medium conditions.

ADD REPLY
0
Entering edit mode

To identify common upregulated or downregulated genes, you would need to test for media condition contrasts for each cell type separately, then overlap.

It's easy to test for interaction. You just test whether the media condition contrasts are themselves different between cell types. A test might not be necesssary however -- if you think that interactions are present in principle, it is usually best to proceed as if they are.

ADD REPLY
2
Entering edit mode
Yunshun Chen ▴ 900
@yunshun-chen-5451
Last seen 5 days ago
Australia

You could try the followings:

> design <- model.matrix(~ 0 + group)
> contrast <- makeContrasts(PvsL = 0.5*(L.pregnant + B.pregnant) - 0.5*(L.lactate + B.lactate), 
                            VvsL = 0.5*(L.virgin + B.virgin) - 0.5*(L.lactate + B.lactate), levels=design)
> anova <- glmQLFTest(fit, contrast=contrast)
ADD COMMENT
0
Entering edit mode

Simply remove the cell type from the model.

design <- model.matrix(~targets$Status)
ADD REPLY
1
Entering edit mode

If you do it this way, the dispersion estimates would be much higher than they should (as the cell type difference is not accounted for in the design).

ADD REPLY

Login before adding your answer.

Traffic: 698 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