How do I work out which condition the genes are down-regulated in?
0
0
Entering edit mode
20 months ago

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 • 389 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

Login before adding your answer.

Traffic: 1958 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