Thank you very much for your answers! I realised that I have not described the situation clearly enough. I'm sorry for that. Especially the column title "Batch" was misleading. New attempt..
This is the renamed table:
SampleID Phenotype Genotype Treatment
Sample01 LLF LLF1 untreated
Sample02 LLF LLF1 untreated
Sample03 LLF LLF1 untreated
Sample04 LLF LLF1 treated
Sample05 LLF LLF1 treated
Sample06 LLF LLF1 treated
Sample07 LLF LLF2 untreated
Sample08 LLF LLF2 untreated
Sample09 LLF LLF2 untreated
Sample10 LLF LLF2 treated
Sample11 LLF LLF2 treated
Sample12 LLF LLF2 treated
Sample13 WT WT1 untreated
Sample14 WT WT1 untreated
Sample15 WT WT1 untreated
Sample16 WT WT1 treated
Sample17 WT WT1 treated
Sample18 WT WT1 treated
Sample19 WT WT2 untreated
Sample20 WT WT2 untreated
Sample21 WT WT2 untreated
Sample22 WT WT2 treated
Sample23 WT WT2 treated
Sample24 WT WT2 treated
There are wildtype samples and samples with a disease phenotype (Phenotype). For each Phenotype, there are samples from two patients each (Genotype). These samples were treated or not (Treatment).
I already did comparisons "treated vs untreated" for each genotype (WT1, WT2, LLF1, LLF2), design: ~Treatment. I also analyzed "treated vs untreated" for each phenotype (WT, LLF), design: ~Genotype+Treatment.
Now I want to analyze "LLF vs WT" for the untreated and the treated samples each. For both cases, the respective table would look like this:
SampleID Phenotype Genotype
Sample01 LLF LLF1
Sample02 LLF LLF1
Sample03 LLF LLF1
Sample07 LLF LLF2
Sample08 LLF LLF2
Sample09 LLF LLF2
Sample13 WT WT1
Sample14 WT WT1
Sample15 WT WT1
Sample19 WT WT2
Sample20 WT WT2
Sample21 WT WT2
(A) I could of course use the design ~Phenotype, but this would lack the variation information (e.g. WT is composed of WT1 and WT2) and might not be the correct approach.
(B) If I use the design ~Genotype+Phenotype to provide the variation information, I get "model matrix is not full rank" due to the linear combination of Genotypes.
(C) The third option I see is to make four comparisons (LLF1 vs. WT1, LLF2 vs. WT1, LLF1 vs. WT2, LLF2 vs. WT2) and look at the individual results. This would make analysing the experiment cumbersome. As the next step is gene set enrichment analysis (GSEA), four different results would have to be compared.
What procedure would you recommend? Is there another option?
Were the samples actually sequenced/generated in (a) two total batches (batch1 and batch2), or (b) four total batches (two per phenotype: LLFbatch1, LLFbatch2, WTbatch1, WTbatch2)? If it was (a), you should reformulate the batch column to be batch1 and batch2 (i.e., remove the phenotype prefix) and then the model will be full rank. If (b), then the model matrix isn't full rank because of perfect collinearity: batch is nested within phenotype.