How do I work out which condition the genes are down-regulated in?
1
0
Entering edit mode
3.3 years ago
Tota ▴ 20

Hi all, I am using edgeR to find DEG. I have paired samples for cancerous tissue and adjacent non-cancerous tissue.

> type <- factor(c("benign", "tumour", "benign", "tumour", "benign", "tumour") 
> subject <- factor(c(1, 1, 2, 2, 3, 3)) 
> design <- model.matrix(~subject+type)
> keep <- filterByExpr(y)
> y <- y[keep, , keep.lib.sizes=FALSE]
> y <- calcNormFactors(y)
> fit <- glmQLFit(y,design)
> qlf <- glmQLFTest(fit)

Then I used glmQLFit and glmQLFTest and got the below result for one gene for example

> Gene                       logFC          logCPM      F           PValue      FDR 
> ENSG00000165186.12|PTCHD1 -4.570433395    5.571673968 88.74868282 2.53E-09    6.31E-06

What I'm trying to understand for the logFC in which condition is it down-regulated? Looking at the cpm table output, I can't see in which condition it is down-regulated (or up-regulate).

Thank you.

edgeR RNA-Seq glm • 892 views
ADD COMMENT
1
Entering edit mode

Since you didn't include all of your code we can't see the exact contrast you did, but the wald test will by default compare each factor to the first factor level. For subject the first factor level is 1, so the contrasts would be 2 vs 1 and 3 vs 1, and for type the first factor level is benign so the contrasts would be tumor vs benign.

ADD REPLY
0
Entering edit mode

Perfect, thank you. Is it right to say the first factor level for type is benign because it's written first? Initially I thought it would be alphabetical. I'll add all my code.

ADD REPLY
0
Entering edit mode

By default the QLFTest tests the last column of the design because the preset is coef=ncol(glmfit$design). You have to change it is you want individual contrasts/coefs being tested.

ADD REPLY
0
Entering edit mode

Just noting that edgeR doesn't use Wald tests. The above code will compute quasi-F-tests where the numerator is the likelihood ratio test statistic.

ADD REPLY
0
Entering edit mode
10 weeks ago
Gordon Smyth ★ 7.0k

The logFCs are for tumour vs benign. A negative logFC means that the gene is down-regulated in tumour compared to benign.

The output from topTags(qlf) tells you which contrast is being tested. The first line of output will say Coef: type:tumour, which is telling you that the contrast is for the tumour level of type vs the reference level.

ADD COMMENT

Login before adding your answer.

Traffic: 1933 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6