So, I have some data from a bone deformity study where we believe there is an effect of gender on disease and has to be accounted for before identifying differential regulation. We are also interested in the transcriptional signature on either side of the convexity.
Here is what my example colData looks like
cond gender convexity DIS1 M left DIS1 M right DIS1 F left DIS1 F right ....... DIS2 F left DIS2 F right DIS2 M left DIS2 M right
I am interested in identifying contrasts the following contrasts
- Is there a male vs female difference for between left and right convexity in both conditions ( MvsFLeftDis1 and MvsFRightDis1)
- The difference in convexity (leftvsRightDis1 and leftvsRightDis2)
- Dis1 vs Dis2 (taking into account the convexity and gender covariates)
Using the information in the vignette on interactions (http://master.bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#nested-indiv), I combine the gender and condition to a single column and use it in the following model
dds$group <- factor(paste0(dds$convexity, dds$gender_cond)) dds$group= leftM_dis1, leftF_dis1, rightM_dis1 and so on.
Am I correct in the design of the model?
If yes, the contrasts MvsFleftDis1- can be found by contrast = c("group","leftFdis1", "leftM_dis1"), correct?
How would I extract leftDis1 vs RightDis1 (summing the effect of gender covariate) and Dis1 vs Dis2 contrast ?
If my model is not correct- can some one please guide me with the correct model. I unfortunately don't have access to a local statistician who can help me. So, any help would be greatly appreciated.