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

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 • 947 views
ADD COMMENT
0
Entering edit mode
swbarnes2 ★ 1.4k
@swbarnes2-14086
Last seen 22 hours ago
San Diego

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

ADD COMMENT
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!

ADD REPLY

Login before adding your answer.

Traffic: 950 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6