This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Specific DE comparisons with complex design matrix

I have RNAseq count data of hybrid yeast at three different temperatures. There are counts from both alleles. I want to find DE genes at different combinations of comparisons.

This is how I model the data in DESeq2:

colData<-data.frame(
            allele=factor(c(rep("SC",9), rep("SU",9), levels(c("SC","SU")))),
            temperature=factor(rep(c(rep("22",3), rep("33",3), rep("37",3)),2)))

dds <- DESeqDataSetFromMatrix(all_temp_data, colData, formula(~allele+temperature+allele*temperature))

Now, for example, if I want to find DE genes between two alleles at 33 degrees, is the following a correct way of doing it?

dds <- DESeq(dds)
results(dds, contrast=list(c("allele_SU_vs_SC","alleleSU.temperature33")), test="Wald")

Thanks

deseq2

1 answer

Make a new column for colData that concatenates allele with temperature. Then

design <- ~ group

and then

res <- results(dds, contrast=c("group", "SC_33", "SU_33"))

I also don't think your design is right. If you are looking for interactions, and not main effects, I think you do

design <- ~ allele*temperature

or

design <- ~ allele + temperature + allele:temperature

But that's not what you are asking about right now.

Hi swbarnes2, thanks for reply. You are right, I have confused * and :. But given the right design that you mention, could you please elaborate a bit why my solution is not correct (or point out to relevant literature)? I feel that I don't completely understand how design formulas work.

Log in to answer this question.