Entering edit mode
I have scRNAseq data collected from donors of 3 different ages (p056, p540, p720), and I am interested in seeing the effect of age on gene expression between all pairs of ages. I am using lrTest to test different contrasts, but not sure if thats the best way to do that.
What would be the best way to do this? Here are two approaches I've taken so far that I thought would give identical results, but they do not:
## First approach
zlm <- zlm(~0 + age_cat + sex + log.gene.counts.0 + z.qc.score, sca)
lr1 <- lrTest(zlm, Hypothesis('age_catp540 - age_catp056'))
lr2 <- lrTest(zlm, Hypothesis('age_catp720 - age_catp540'))
lr3 <- lrTest(zlm, Hypothesis('age_catp720 - age_catp056'))
## Second approach
zlm2 <- zlm(~age_cat + sex + log.gene.counts.0 + z.qc.score, sca)
lr1.2 <- summary(zlm2 , doLRT = "age_catp540") # i expect pvalues from this to be the same as results from lr1 above
lr1.3 <- summary(zlm2 , doLRT = "age_catp720") # i expect pvalues from this to be the same as results from lr3 above
## p-values from lr1 and lr1.2 are not the same (they are similar though). which one is more appropriate?
Questions:
- I thought the two approaches should give the same p-values, but the P-values from lr1 and lr1.2 are not the same (they are similar though). Which approach is more appropriate?
- Is there a way to perform doLRT with contrast 'age_catp720 - age_catp540' using the second approach where I've included an intercept?
- Is there a way to have MAST calculate logFC with the first approach?
Thanks in advance.