Hello,
I'd like to get some help on my RNAseq data analysis with DESeq2. The experiment is balanced design with multiple factors with biological/technical replicates.
> coldata
group variety treatment
BeC-1 T Be control
BeC-2 T Be control
BeT-1 T Be treated
BeT-2 T Be treated
LoC-1 S Lo control
LoC-2 S Lo control
LoT-1 S Lo treated
LoT-2 S Lo treated
NiC-1 T Ni control
NiC-2 T Ni control
NiT-1 T Ni treated
NiT-2 T Ni treated
SaC-1 T Sa control
SaC-2 T Sa control
SaT-1 T Sa treated
SaT-2 T Sa treated
SoC-1 S So control
SoC-2 S So control
SoT-1 S So treated
SoT-2 S So treated
ViC-1 S Vi control
ViC-2 S Vi control
ViT-1 S Vi treated
ViT-2 S Vi treated
To eliminate the "model matrix is not full rank" as suggested in the manual, I used:
> coldata$ind.n <- factor(rep(rep(1:2, each=2), 2) > model.matrix(~ group + group:ind.n + group:variety, coldata) > dds <- DESeq(ddsHTSeq)
Now I want to test the significance for factors:
1) between groups: T vs S;
2) among varieties,
3) between control vs treated for each variety: i.e. what are the genes differentially expressed for each variety Be, Lo, Ni, Sa, So and Vi.
I have tried 2) as following:
>results(dds, contrast=c("treatment", "treated", "control"))
>results(dds, contrast=c("group", "T", "S"))
But I am not sure for each individual variety, sth like this?
>results(dds, contrast=c("group$T.Be", "treated", "control"))
>results(dds, contrast=c("group$T.Lo", "treated", "control"))
Thanks a lot!

I'm going to 'Add Comment' here to begin a threaded discussion.
So there are some conceptual issues with testing T vs S, because you also have the different varieties, and want to make inference on these as well. It makes it not so clear what exactly you want to test. The varieties are not random samples within the groups. These are a specifically chosen set of varieties.
When you say you want to test T vs S, or across varieties, do you mean test the control samples? Or do you mean test the treatment vs control effect across T and S, or across varieties? In other words testing if the fold change is different across group or variety?
What I might recommend is an approach where you can test treatment vs control within a variety, and you can also test where treatment vs control differs between two varieties that you choose.
But I need a bit more precise information to help direct you.