**0**wrote:

Hi All,

I've been reading all of the posts about interaction terms (and the vignette) and trying to apply them to my own data. I'd very much appreciate confirmation that I'm doing it correctly.

ddsFullCountTable <- DESeqDataSetFromMatrix(

countData = counts.mean.filt,

colData = rnaDesign.filt,

design = ~ Batch + Population + Status + Population:Status

)

ddsFilt <- ddsFullCountTable

DEG <- DESeq(ddsFilt)

> resultsNames(DEG)

[1] "Intercept"

[2] "BatchA"

[3] "BatchB"

[4] "BatchC"

[5] "BatchD"

[6] "PopulationA"

[7] "PopulationB"

[8] "StatusControl"

[9] "StatusExposed"

[10] "StatusInfected"

[11] "PopulationA.StatusControl"

[12] "PopulationB.StatusControl"

[13] "PopulationA.StatusExposed"

[14] "PopulationB.StatusExposed"

[15] "PopulationA.StatusInfected"

[16] "PopulationB.StatusInfected"

And so the interaction between Population and Status is therefore:

res.x <- results(DEG, name = "PopulationB.StatusInfected")

Correct?

Furthermore, each population is composed of many families, which means you cannot include both population and family in the model. I could average the effect of family and then test for interactions again, but this seems to marginalize the effect of family. How might you suggest looking for Population:Status interactions when families are included in the model? I considered pasting the two factors Population and Family together, as as been suggested in the past, but I'm not sure where I'd go from there.

Thanks for your help!