Question: DESeq 2, interaction model design
0
gravatar for agbioinformatics
4.3 years ago by
United States
agbioinformatics0 wrote:

Gonna try my luck here...


So in my experiment, we have 2 different treatments applied to 2 groups of mice (ctrl vs trt, 5 each). Within each mouse, we took 2 different tissue types (tissue, A and B). We'd like to know basically how trt different (within each tissue type and overall) (I guess after the model design, we will do contrast of various sort?). Since each experimental unit (mice) have 2 tissue types, it would be wise to block on individuals. In essence, we have:
sampleCondition <- c(
rep("T",2),
rep("C",4),
rep("T",8),
rep("C",6)
)

individual <- c(
rep("11",2),
rep("12",2),
rep("13",2),
rep("14",2),
rep("15",2),
rep("16",2),
rep("17",2),
rep("18",2),
rep("19",2),
rep("20",2)
)

tissue=rep( c("A","B"), 10)

sampleTable<-data.frame(sampleName=sampleFiles,
filename=sampleFiles,
treatment=sampleCondition,
tissue=tissue,
individual=individual)

dds<-DESeqDataSetFromHTSeqCount(sampleTable=sampleTable,
directory=directory,
design=~ individual + individual:tissue + individual:treatment
)

and also tired:
design=~ individual + tissue + tissue:treatment

both of these design gave us:
Error in DESeqDataSet(se, design = design, ignoreRank) :
the model matrix is not full rank, so the model cannot be fit as specified.
one or more variables or interaction terms in the design formula
are linear combinations of the others and must be removed

I am stuck here,... sort thinking my model might be wrong? Thanks for any help!

   
deseq2 • 2.4k views
ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by agbioinformatics0
Answer: DESeq 2, interaction model design
1
gravatar for Michael Love
4.3 years ago by
Michael Love24k
United States
Michael Love24k wrote:

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))

 

ADD COMMENTlink written 4.3 years ago by Michael Love24k
Answer: DESeq 2, interaction model design
0
gravatar for agbioinformatics
4.3 years ago by
United States
agbioinformatics0 wrote:

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

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by agbioinformatics0

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))

ADD REPLYlink written 4.3 years ago by Michael Love24k
Answer: DESeq 2, interaction model design
0
gravatar for agbioinformatics
4.3 years ago by
United States
agbioinformatics0 wrote:

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?)?

ADD COMMENTlink written 4.3 years ago by agbioinformatics0

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.

ADD REPLYlink written 4.3 years ago by Michael Love24k
Answer: DESeq 2, interaction model design
0
gravatar for agbioinformatics
4.3 years ago by
United States
agbioinformatics0 wrote:

Thanks Michael, will try that!

ADD COMMENTlink written 4.3 years ago by agbioinformatics0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 166 users visited in the last hour