results() function and finding the difference of differences
1
0
Entering edit mode
Nayrouz • 0
@ea088d93
Last seen 11 weeks ago

Hello, in the example below, there are 2 conditions and 3 genotypes.

dds <- makeExampleDESeqDataSet(n=100,m=18)
dds\$genotype <- factor(rep(rep(c("I","II","III"),each=3),2))
design(dds) <- ~ genotype + condition + genotype:condition
dds <- DESeq(dds)
resultsNames(dds)
# "Intercept"              "genotype_II_vs_I"       "genotype_III_vs_I"      "condition_B_vs_A"       "genotypeII.conditionB"
# "genotypeIII.conditionB"


if I want to know if treatment B vs A difference is different in genotype III to II, will I be able to do so with the contrast function as shown below?

results(dds, contrast=list("genotypeIII.conditionB", "genotypeII.conditionB"))

interactions DESeq2 • 396 views
0
Entering edit mode
swbarnes2 ★ 1.2k
@swbarnes2-14086
Last seen 9 hours ago
San Diego

It might be simpler to make II your reference genotype, then "genotypeIII.conditionB" will do what you want by itself.

0
Entering edit mode

That's a great idea.

I was wondering if there is a way to form a 1-row matrix that has a -1 for the genotypeII.conditionB coefficient and a +1 for the genotypeIII.conditionB coefficient. and then provide this matrix as an argument to the results() function?

Any help/thoughts are appreciated!