Interaction term vs grouping variable design considerations
1
0
Entering edit mode
nhaus ▴ 70
@789c70a6
Last seen 8 weeks ago
Switzerland

I am currently performing a differential gene expression analysis containing 1000s of samples. The samples have 3 different genotypes and were treated either with A or B, so the meta data looks something like this:

# this is an example subset
mdata <- data.frame(condition=rep(c("A","B"),each=3, 3),
                    genotype=rep(c("I","II","III"),each=6))
mdata <- mdata %>% mutate(type=paste(genotype, condition,sep="_"))

I understand, that when running the differential expression, an appropriate design would look something like this (i am excluding all batch effects for simplicity):

~ 0 + genotype + condition + genotype:condition

However, I usually find interactions a bit more challenging to interpret and also sometimes have a difficult time extracting the right comparisions using results from DESeq2, so instead I like to do what was suggested by the DESeq2 vignette to use a grouping variable (called type in my case), which means my design looks very simple ~ 0+type.

After running DESeq2 (by calling DESeq()), I want to answer the following question:

Does the condition (A or B) have different effects depending on the genotype (for example genotype III vs genotype I).

So my first question is, if this is equivalent of asking "is the interaction term genotypeII.conditionB significantly different from genotypeIII.conditionB?. Also, is it correct that to extract this comparisions I would run

res_interaction <- results(dds_interaction_term, contrast=list("genotypeIII.conditionB", "genotypeII.conditionB"))

As I mentioned before, I usually like to use a grouping variable. Is it correct to use the following contrast to answer my question from above:

# create the contrast matrix for the combined object
design <- model.matrix(~ 0+type, colData(dds_combined))
contrasts <- limma::makeContrasts(
    interaction= (typeIII_B - typeIII_A) - (typeII_B - typeII_A),
    levels = design
)
res_comb <- results(dds_combined, contrast = contrasts[,1])

Any insights are very much appreciated!

Cheers!

DESeq2 DifferentialExpression • 490 views
ADD COMMENT
0
Entering edit mode

is it correct that to extract this comparisions I would run...

Yes, asking, 'is term X different than term Z' can be extracted with results(dds, contrast=list("X", "Z"))

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 6 hours ago
United States

For questions about statistical analysis plan and interpretation, I recommend consulting with a local statistician or someone familiar with linear models in R. I have to restrict my time on the support site to software-related questions.

ADD COMMENT

Login before adding your answer.

Traffic: 620 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