I am using edgeR for DEG analysis, the following is a description of my data:
11 patients, taken two types of tissue from each patient, each type of tissue taken both affected region and unaffected region. For example, for patient01, tissue1_affected, tissue1_unaffected, tissue2_affected, tissue2_unaffected, four samples are taken from this patient
3 other patients, taken only one type of tissue from each of these three patients, both affected region and unaffected region. For example, for patient12, tissue1_affected, tissue1_unaffected
3 normal people, taken two types of tissue from each normal, people. For example, for normal01, tissue1_unaffected, tissue2_unaffected, two samples are taken from this person
I am interested in comparing all the unaffected tissue1 with all the affected tissues1 across different subjects including both from the same subject or different subjects scenario
The same for tissue2
How to design one matrix for this? And how will the contrast matrix look like?
If use each person as a block, and combine the tissue type and affected status as treatment, I am thinking the following design matrix:
block=c(001,002,..........)
treatment=c(tissue1_affected,tissue1_unaffected,tissue2_affected,tissue2_unaffected,........)
design=model.matrix(~0+treatment+block)
The design matrix column names (coefficients) will be look like this:
tissue1_affected tissue1_unaffected tissue2_affected tissue2_unaffected 001 002 ..........
Then I realize in the design matrix I am missing one coefficient which stand for one block person
If I want to get the DEG from comparing affected tissue1 with unaffected tissue1, should I just give the contrast matrix as
for tissue1: contrast=c(-1,1,0,0.........) (the rest are all 0s)
for tissue2: contrast=c(0,0,-1,1,0.........) (the rest are all 0s)
Thanks
Thanks a lot
For starters, put the edgeR tag in your post, otherwise we won't get notified about your question. And if you want to add information, either edit your post or add a comment, rather than making a new answer.