Hello everyone!
I have a large dataset of patients with Systemic Lupus Erythematosus (SLE) and Healthy Controls and I would like to perform various DE comparisons using edgeR, but I am having some doubt about my design matrices.
A little more info to better clarify the situation. SLE Patients in my dataset are split into 2 categories, patients with Lupus Nephritis (LN) and non-LN patients. And patients with LN are further split into Active LN and Inactive LN patients. So the Structure looks like this:
Condition | Active |
---|---|
LN | Yes |
LN | No |
non_LN | NA |
Healthy | NA |
The comparisons I want to perform are:
LN vs Healthy
LN vs non-LN
Active LN vs Inactive LN
--So, my question is, what should my matrix formula and contrasts be?
Proposed design: Formula: ~ Condition + Active + 0
Model Matrix would look like:
ConditionLN | Conditionnon_LN | ConditionHealthy | ActiveYes | ActiveNo |
---|---|---|---|---|
1 | 0 | 0 | 1 | 0 |
1 | 0 | 0 | 1 | 0 |
1 | 0 | 0 | 0 | 1 |
0 | 1 | 0 | NA | NA |
0 | 1 | 0 | NA | NA |
0 | 0 | 1 | NA | NA |
0 | 0 | 1 | NA | NA |
Contrasts:
LN vs Healthy: c(1,0,-1,1,1)
LN vs non_LN: c(1,-1,0,1,1)
Active vs Inactive: c(0,0,0,1,-1)
Apologies for the bad post quality. It is my first post here and I could not figure out how to better lay it out.
Thank you very much in advance for all your help.
Thank you very much for your answer! I hadn't noticed the more complex examples mentioned in the guide. I will look more into them.