Dear Michael,
i have a question regarding the usage of covariates in DESeq2 modelling. I am thinking about including a covariate, e.g. gender.
1. The model with covariate gender:
condition <- factor(c("CTRL","CTRL","CTRL","CTRL","Disease","Disease","Disease","Disease")) sex <-factor(c("Male","Male","Female","Female","Male","Male","Female","Female")) dds <- DESeqDataSetFromMatrix(countData = mycountdata, colData= mymatrix, design =(~ sexMale + conditionDisease))
2. The simpler model without covariate:
colData <- data.frame(condition= factor(c("CTRL","CTRL","CTRL","CTRL","Disease","Disease", "Disease","Disease")) dds2 <- DESeqDataSetFromMatrix(countData = mycountdata, colData, formula(~ condition))
My question: Is there a function in DESeq2 to compare if my model including gender explains (significantly) more variance than my simple model, to make sure that i actually should include this covariate?
Best regards,Markus
I have a follow-up question on this. I have done this and gotten many genes where sex influences expression, but what I am interested in is how sex influences expression in a given condition. So I don't care about the Normal condition, ideally in the normal condition expression would not be significantly different. I am interested in genes whose expression is different in the test condition in one gender but not the other. Basically gender-specific differences in gene expression only in the test condition. Is there an easy way to do with with LRT?
Thanks, Joe
You can just do a test of the condition in normal using altHypothesis=“lessAbs”. You can obtain this by asking results() for the main effect (which is the condition effect for the reference level of other variable). You’d then just combine the genes that are differential across condition and have evidence of not changing in normal by using the intersect() function.