Question: Responder Vs Non-Responders Paired Comparison DESEQ2
gravatar for pennakiza
4 weeks ago by
pennakiza0 wrote:

Hello all,

I have 16 patient rna samples who belong to 8 patients, taken before and after their treatment.

My samples table is that: 

   no      sample condition replicate reponse
1   1  102_screen    screen        P1       N
2   2 102_treated treatment        P1       N
3   3 105_treated treatment        P2       N
4   4         105    screen        P2       N
5   5 107_treated treatment        P3       N
6   6         107    screen        P3       N
7   7 108_treated treatment        P4       N
8   8         108    screen        P4       N
9   9 110_treated treatment        P5       Y
10 10         110    screen        P5       Y
11 11 111_treated treatment        P6       N
12 12         111    screen        P6       N
13 13 115_treated treatment        P7       N
14 14         115    screen        P7       N
15 15 116_treated treatment        P8       N
16 16         116    screen        P8       N

One of them responded to the treatment and I would like to check the significance of the gene count difference between the responder and the others, but taking into consideration that the samples are paired.

I am not sure if it is correct to use this design, because I think that it considers all the samples as indipendant.

 dds <- DESeqDataSetFromTximport(txi, coldata, ~reponse)


Is there anyone who can help me sort this out please?

ADD COMMENTlink modified 4 weeks ago by Michael Love12k • written 4 weeks ago by pennakiza0
gravatar for Michael Love
4 weeks ago by
Michael Love12k
United States
Michael Love12k wrote:

Firstly, you should appreciate that this is a really under-powered analysis, because it all hinges on the after vs before treatment for a single patient. So unless that patient is very strongly different in after vs before compared to the others, you won't find anything. And then, if that patient is very different, you don't really know if it's just an outlier.

That said, it is technically possible to do the analysis you're suggesting using the interaction model described in the DESeq2 vignette.

In your case, the group is response (yes vs no), and condition is after vs before treatment. See the vignette on how to specify the reference level of factors. The design will be group + group:individual + group:condition, and you are interested in contrasting "groupY.conditionAfter" with "groupN.conditionAfter". You can do this using the list() argument of results() after running DESeq(). It would look like contrast=list("groupY.conditionAfter","groupN.conditionAfter").

The individual variables should be a factor taking levels 1-7 for the non-responders and 1 for the responder. Then you will have to remove a number of columns of the model matrix for which there are all zeros (because there are no patients 2-7 in the non-responder group).

mm <- model.matrix(~ group + group:individual + group:condition, colData(dds))
mm2 <- mm[,!apply(mm,2,function(x) all(x==0))]


dds <- DESeq(dds, full=mm2, betaPrior=FALSE)
ADD COMMENTlink written 4 weeks ago by Michael Love12k

Dear Michael,

Thank you very much for your help, that was exactly what I needed to understand how it works! :)




ADD REPLYlink written 4 weeks ago by pennakiza0
Please log in to add an answer.


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