This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Correct model matrix design with R

I have two microarray datasets with sample information like below:

**Patient Replicates** -------- **Disease/Control** -------- **Muscle Type**


Patient A  ------------  Disease  ------------ X

Patient A  ------------ Disease  ------------ Y

Patient B  ------------  Disease  ------------ X

Patient B  ------------ Disease  ------------ Y

Patient C  ------------  Disease  ------------ X

Patient C  ------------ Disease  ------------ Y

Patient D  ------------  Control  ------------ X

Patient D  ------------ Control  ------------ Y

Patient E  ------------  Control  ------------ X

Patient E  ------------ Control  ------------ Y

I want to perform differential gene expression analysis to get the significantly expressed genes in Control vs Disease for both Muscle types. No need to compare between muscles.

How can I code this in R with limma/edgeR packages?

edger matrix limma model differential

If that is all that you wish to do, then, in your design formula, you would just need something like ~ DiseaseControl, where DiseaseControl is the middle column in your pasted data, containing values of either Disease or Control.

Have you searched for code examples and tutorials online? - there are many.

You might also regress out difference between muscle types (while not testing for them) by using ~MuscleType + DiseaseControl

0 answers

No answers yet.

Log in to answer this question.