I believe I have understood now how the grouping of variables work:
dds$group <- factor(paste0(dds$genotype, dds$condition)) design(dds) <- ~ group dds <- DESeq(dds) resultsNames(dds)
the condition effect for genotypeIII
results(dds, contrast=c("group", "IIIB", "IIIA"))
My orginal code was:
dds4 <- DESeqDataSetFromMatrix(countData = cts, colData = colData, design = ~ BATCH + AGE + SEX + CONDITION
So if I use above code will my experiment not be controlled for BATCH, AGE and SEX? Or means "design(dds) <- ~ group" that i am adding "group" to " ~ BATCH + AGE + SEX + CONDITION" ... making it " ~ BATCH + AGE + SEX + CONDITION + group"? But then "condition" would be twice kind of in my formula as "CONDITON" and as "group"?!
I am confused, thank you! Bine