Combine multiple groups on comparison by edgeR
0
1
Entering edit mode
3.7 years ago
camelest ▴ 50

I'm trying to compare multiple conditions on edgeR. I have looked up into previous posts and read through edgeR's user guide, yet still don't have a clear answer.

My question is whether we can combine subgroups as one group by design matrix on comparison.

For example, if I have 4 groups to compare, after normalization as below,

d <- DGEList(counts=count, lib.size=size, group=group)
d <- calcNormFactors(d, method="RLE")
d <- estimateDisp(d)
design <- model.matrix(~0+group, data=d$samples)
colnames(design) <- levels(d$samples$group)
fit <- glmQLFit(d, design)

I understand that if we want to compare group 2 vs group 1, the pipeline would be

group2vs1 <- makeContrasts(group2-group1, levels=design)
qlf.2vs1 <- glmQLFTest(fit, contrast=group2vs1)

In this case,

coef = (-1, 1, 0, 0)

How about if I want to compare group 1 vs the rest? Does the codes below do what is desired?

group1vsrest <- makeContrasts(group1-(group2+group3+group4)/3, levels=design)

which gives

coef = (-1, 0.333, 0.333, 0.333)

Or should I do without multiple by 1/3

group1vsrest <- makeContrasts(group1-(group2+group3+group4), levels=design)

which corresponds to

coef = (-1, 1, 1, 1)

I've read some lines on edgeR's user guide mentioning the former would compare group1 and the mean of group 2-4. Does the "mean" mean that we treat group2-4 as one group? Do I need to make another design variable attributing group1 and the rest separately into two categories to do this comparison?

I really appreciate your help.

glm rna-seq edgeR • 1.1k views
ADD COMMENT

Login before adding your answer.

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