What is the purpose behind making a design and contrast matrix in limma analysis?
What is the purpose behind making a design and contrast matrix in limma analysis?
Check out this recent paper by the authors which is precisely focused on explaining design matrices.
Basically, limma (and other software) are focused on using linear models to analyse your data, because these tools let you represent/model your study, taking into account any variables which are of interest to you.
For example, you may want to compare expression of gene X between young and old samples. A t-test will simply compare the means of the groups. However, sex may influence the expression of gene X. A linear model lets you take into account sex when comparing the expression between young and old groups.
Having said this, design matrices are the way that you indicate the study variables to model (e.g., age and sex), and contrast matrices are the way that you indicate which variables you want to test (e.g. age) between which groups.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
what about edgeR?
edgeR also uses design matrices and contrasts in a very similar way to limma, I recommend you check the tutorials for each package which provide detailed explanations.
but deseq2 normally does not take it?
DESeq2 uses a
coldata
table and adesign
formula to input the model design and sample information, so it is basically the same thing.Of course, it does. You need them as soon as you have more than one explanatory variable.