Is it possible to specify random nested factor in DEseq2?
1
0
Entering edit mode
yampolsk • 0
@194b0276
Last seen 4 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 • 433 views
0
Entering edit mode
@mikelove
Last seen 1 day 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.

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:

## 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?

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.