Gonna try my luck here...
|
|
Gonna try my luck here...
|
|
hi,
This issue is that the comparison you are interested in: treatment vs control is confounded with the 'individual' effects. Individuals are either in the control or the treatment group, so the main treatment vs control effect is also equal to a linear combination of 'individual' effects. So this would present a problem when trying to find fitted means (it is caught earlier when the design matrix is formed). You should be able to analyze without the individual blocking effect, though. The simplest approach is to combine condition and tissue into one factor:
dds$group <- factor(paste0(dds$condition, dds$tissue))
design(dds) <- ~ group
dds <- DESeq(dds)
# e.g. for the treatment vs control effect in tissue B:
results(dds, contrast=c("group","TB","CB"))
# e.g. the overall effect, an average of the effect in A and B:
results(dds, contrast=list(c("groupTA","groupTB"),c("groupCA","groupCB")),listValues=c(1/2,-1/2))
Hello Michael,
Thanks for the response! So is there a way to block in deseq2 (1.6) (especially in this case, since the 2 tissues were from the same individual)?
Also, can you explain a little more about the dds$group command? After I run this, I get results, so when I look at dds$group, i only see my tissue types A, B repeating (I thought this would turn into a combined term, i.e. CA, CB, TA, TB?)
thanks,
~jd
Thanks Michael! If I do block on individual, would you recommend on running separate designs (i.e. within tissue A, block on individuals and find DE?)?
As I said before, you can't block for individual and compare across condition with fixed effects in DESeq2. Your design looks something like this (focusing on a single tissue):
individual condition
1 A
2 A
3 B
4 B
If the individuals were *across* instead of *within* the condition, you could block these with fixed effects.
But with your design you can't say what is a B vs A effect vs a 3+4 vs 1+2 effect, because they are collinear.
As I said above, I believe you can still use duplicateCorrelation with the limma package to inform the analysis of the individual effects.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
You can block in DESeq2, for example if you wanted to block individual and compare tissues that would be straightforward. The problem is your design, you can't block individual and simultaneously fit the main condition effect because they are collinear: the condition effect is equal to the sum of individual effects. You can use limma's duplicateCorrelation() though, I believe.
You need to combine the condition and tissue columns. Looking back, if your condition column is "sampleCondition", then you should
factor(paste0(dds$sampleCondition, dds$tissue))