pairwise comparison + interaction term in DESeq2
1
0
Entering edit mode
Lucas • 0
@9ab37ec8
Last seen 2.3 years ago
South Korea

Hi all, I'm analyzing the cancer sample using DEseq2 but I encountered some errors when using interaction terms.

My Coldata is below.


> coldata
     sample condition patient patient.n       status
1   P03_pre       Pre     P03         1    Responder
2  P03_post      Post     P03         1    Responder
3   P04_pre       Pre     P04         2    Responder
4  P04_post      Post     P04         2    Responder
5   P05_pre       Pre     P05         3    Responder
6  P05_post      Post     P05         3    Responder
7   P07_pre       Pre     P07         1 NonResponder
8  P07_post      Post     P07         1 NonResponder
9   P08_pre       Pre     P08         2 NonResponder
10 P08_post      Post     P08         2 NonResponder
11  P09_pre       Pre     P09         3 NonResponder
12 P09_post      Post     P09         3 NonResponder
13  P10_pre       Pre     P10         4 NonResponder
14 P10_post      Post     P10         4 NonResponder
15  P11_pre       Pre     P11         5 NonResponder
16 P11_post      Post     P11         5 NonResponder
17  P12_pre       Pre     P12         4    Responder
18 P12_post      Post     P12         4    Responder
19  P14_pre       Pre     P14         6 NonResponder
20 P14_post      Post     P14         6 NonResponder
21  P15_pre       Pre     P15         7 NonResponder
22 P15_post      Post     P15         7 NonResponder
23  P16_pre       Pre     P16         8 NonResponder
24 P16_post      Post     P16         8 NonResponder
25  P17_pre       Pre     P17         9 NonResponder
26 P17_post      Post     P17         9 NonResponder
27  P18_pre       Pre     P18        10 NonResponder
28 P18_post      Post     P18        10 NonResponder
29  P19_pre       Pre     P19        11 NonResponder
30 P19_post      Post     P19        11 NonResponder

I want to compare with 1) sample pairwise like P03_pre and P03_post for minimizing sample compounding factor and 2) use interaction terms.

To 1) compare with sample pairwise and 2) correct batch effect due to patient, I used the "patient" as the first factor in the design.

so I used this design


dds <- DESeqDataSetFromMatrix(countData=met, 
                              colData=coldata, 
                              design=~patient + condition + status + condition:status)

But, 'not full rank' error occurred so I added the patient.n column in the my Coldata.

and then retry using this design


dds <- DESeqDataSetFromMatrix(countData=met, 
                              colData=coldata, 
                              design=~patient.n + condition + status + condition:status)

It well works without 'not full rank' error. In this step, I want to try sample pairwise comparison and batch correction by the patient using "patient.n" as the first factor in the design. But P03 and P07 are "1", P04 and P08 are "2", P05 and P09 are "3", P12 and P10 are "4" in patient.n, so I thought this design cannot act as batch correction by the patient.

To 1)compare with sample pairwise, 2) correct batch effect by the patient, and 3) run without 'not full rank' error, what can I do?

As I know, if sample pairwise comparison was well worked, the output of resultsNames is like below.

[1] "Intercept"        "condition_Post_vs_Pre"       "status_Responder_vs_NonResponder"        "conditionPost.statusResponder"

But, my output is below.

[1] "Intercept"             "patient.n_2_vs_1"      "patient.n_3_vs_1"      "patient.n_4_vs_1"      "patient.n_5_vs_1"      "patient.n_6_vs_1"      "patient.n_7_vs_1"      "patient.n_8_vs_1"     
 [9] "patient.n_9_vs_1"      "patient.n_10_vs_1"     "patient.n_11_vs_1"     "condition_Post_vs_Pre"    "status_Responder_vs_NonResponder"        "conditionPost.statusResponder"

I thought this result shows not working as sample pairwise comparison.

Please let me know how can I solve these problems.

Thanks!

DESeq2 interaction pairwise • 915 views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 3 days ago
United States

For choosing a statistical analysis plan, I recommend working with a local statistician or someone familiar with linear models in R. It's not just enough to have a design that is full rank, but you also want to make sure it makes sense with respect to your experiment. Unfortunately, I don't have sufficient time to help with statistical consultation on the support site, but have to reserve time for software-related questions.

ADD COMMENT
0
Entering edit mode

Thanks for replying my question! As you mentioned, I will discuss about this with my co-worker majored in statistics. I just want to know whether my design is wrong, and how can I analyze it the way I want to.

ADD REPLY

Login before adding your answer.

Traffic: 661 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6