Question: How do I work out which condition the genes are down-regulated in?
0
gravatar for microbiotaiota
5 days ago by
microbiotaiota20 wrote:

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.

glm rna-seq edger • 69 views
ADD COMMENTlink modified 5 days ago • written 5 days ago by microbiotaiota20
1

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 REPLYlink written 5 days ago by rpolicastro3.2k

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 REPLYlink written 5 days ago by microbiotaiota20

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 REPLYlink written 4 days ago by ATpoint44k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1762 users visited in the last hour
_