Question: Appropriate DESeq2 design for multi-factor comparison within group?
0
gravatar for hrishi27n
22 months ago by
hrishi27n20
hrishi27n20 wrote:

Hello All,

I am trying to run DE analysis using DESeq2 and wanted to know what would be a better/correct design matrix for my analysis. I have two disease condition A and B. Cells(CD4) from patient groups A and B were treated with different concentration of a certain chemical. The concentrations are 10ml, 50ml, 100ml, 150ml and 200ml. We would like to make the following comparisons for groups A and B separately.

10ml vs 150ml
50ml vs 150ml
100ml vs 150ml
10ml vs 200ml
50ml vs 200ml
100ml vs 200ml

Sample phenoFile:

Groups  Sample  Concentration
A            Well1     10ml
A            Well2     50ml
A            Well3     100ml
A            Well4     150ml
.
.
.
B            Well20    10ml
B            Well21    50ml
B            Well23    100ml
B            Well24    150ml

Considering the fact that we are interested in performing comparisons within the groups and not between groups A and B, I was considering splitting the pheno file into two by groups. Then further subset the pheno file by comparison combinations like 10ml and 150ml, 50ml and 150ml, 100ml and 150 etc and then use design as design=~concentration. Is there a better method to do all the comparisons instead of subsetting the pheno file by concentrations? I really don't mind subsetting by groups but the other subsetting seems too much and there should be a better way to do this. Hope the question is clear. I appreciate all your inputs.

Thanks!!!

deseq deseq2 • 349 views
ADD COMMENTlink modified 22 months ago by Michael Love25k • written 22 months ago by hrishi27n20
Answer: Appropriate DESeq2 design for multi-factor comparison within group?
1
gravatar for Michael Love
22 months ago by
Michael Love25k
United States
Michael Love25k wrote:

You can get concentration effects for each group by using a design: ~0 + concentration:group.

You can mock up how this will look with model.matrix:

> group <- factor(c("a","a","a","b","b","b"))
> conc <- factor(c(1,2,3,1,2,3))
> model.matrix(~0 + conc:group)
  conc1:groupa conc2:groupa conc3:groupa conc1:groupb conc2:groupb conc3:groupb
1            1            0            0            0            0            0
2            0            1            0            0            0            0
3            0            0            1            0            0            0
4            0            0            0            1            0            0
5            0            0            0            0            1            0
6            0            0            0            0            0            1
ADD COMMENTlink written 22 months ago by Michael Love25k

Thanks Micheal. I really appreciate your help. 

ADD REPLYlink written 21 months ago by hrishi27n20
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: 144 users visited in the last hour