Is it possible to specify random nested factor in DEseq2?
1
0
Entering edit mode
yampolsk • 0
@194b0276
Last seen 20 months ago
United States

I would like to test differential gene expression in two groups of genotypes using genotypes nested within groups as a random effect. All genotypes measured in 2 treatments.

I understand that I can specify nested effect

dds <- DESeqDataSetFromMatrix(countData,
                              colData,
                              design= ~  treatment + group + group:treatment + group:genotype)

and this will test treatment and group as main effects and their interaction, but will group be tested against genotypes within groups?

Thanks!

nested DESeq2 • 1.3k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 7 hours ago
United States

I’d recommend to work out your statistical design with a local statistician or someone familiar with linear models in R. Unfortunately due to limits on my time I can only provide software-related support here.

ADD COMMENT
0
Entering edit mode

I'm sorry, but this is a software question. If one specifies a nested effect as described in http://www.bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#model-matrix-not-full-rank, like this:

grp ind cnd ind.n

1 X 1 A 1

2 X 1 B 1

3 X 2 A 2

4 X 2 B 2

5 X 3 A 3

6 X 3 B 3

7 Y 4 A 1

8 Y 4 B 1

9 Y 5 A 2

10 Y 5 B 2

11 Y 6 A 3

12 Y 6 B 3

and then uses grp:ind.n term in the design, this creates a crossed (interaction) term in the model, wrongly assuming that ind 1 in grp X is somehow related to ind 4 in grp Y, etc. If ind are truly nested in grp this is definitely not right.

So, I am correct that nested effects cannot be specified in DESeq2 design?

ADD REPLY
0
Entering edit mode

They are separate coefficients and not related in any way. Create the design matrix and take a look at the columns.

ADD REPLY

Login before adding your answer.

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