Search
Question: edgeR coefficients for DEG analysis
0
4 months ago by
nonCodingGene10 wrote:

I'm trying to perform a DEG analysis of two cell types extracted from 8 different patients (data comes from scRNA).

I'm trying to compare the two cells while adjusting for the patients, there are two possible models:

a) ~0+cell.type+patients

b) ~cell.type.patients

lrt <- glmWeightedF(fit, coef = 2)

If I'm not wrong:
Model a, each coefficient represents the average of the samples for each coefficient.
Model b, the intercept represents the average of coefficient A and the 2º coefficient represents the increase in average of coefficient B over A.

Which model should I use if I want to test for DEG between those two cell types?

Thanks

modified 4 months ago by James W. MacDonald48k • written 4 months ago by nonCodingGene10

To me I think the two first ways of doing the analysis are the right ones, but I do not understand what the last two comparison mean, so this confuses my a little bit.

~1+Cell.type+Patient
coef = 2
~0+Cell.type+Patient
contrast = c(-1,1,0,0,0,0,0,0)
~0+Cell.type+Patient
coef = 2
~1+Cell.type+Patient
contrast = c(-1,1,0,0,0,0,0,0)
4
4 months ago by
United States
James W. MacDonald48k wrote:

The last two comparisons don't make any sense. As you already said, for the cell means model (~0), each coefficient represents the mean expression for each group. So the third thing you do in your comment will just test if the mean expression for the genes in the second group are equal to zero or not. Which is an uninteresting question, for several reasons.

For the fourth thing in your comment, as you already noted, the first coefficient is the mean expression of the baseline treatment, for the first patient. The second coefficient is the difference between the B and A treatments. This is just algebra - If you subtract the mean of the A treatment from the difference between the B and A treatments, what do you end up with?