DESeq2 - test fold change below a threeshold
1
1
Entering edit mode
@samuel-collombet-6574
Last seen 6.9 years ago
France

Hi,

 

I am comparing 2 conditions ; I would like to find all genes that show less than a 2fold increase in condition A vs B, wether the fold change is positive or negative. (and reciprocally genes that show not a 2fold decrease). Is that possible?

I tried results(dds, lfcThreshold=1, altHypothesis="less") and select padj<0.01, but in fact that select the genes for which lfc(A/B) < -1 is significant, whereas I would like  lfc(A/B) < 1 is significant (that is altHypothesis="less" and altHypothesis="lessAbs").

Does the 1-pValue of results(dds, lfcThreshold=1, altHypothesis="greater") would give me the pValue I am looking for? (sorry if this is a statistical nonsense, I cannot judge myself).

DESeq2 • 1.9k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

hi Samuel,

We don't have built-in functions for this, but it's easy to compute the p-values manually, e.g. here for beta < lfcThreshold:

res$pvalue <- pnorm(res$log2FoldChange, mean = lfcThreshold, sd = res$lfcSE, lower.tail = TRUE)

And you can directly compute adjusted p-values with p.adjust() or perform independent filtering using the genefilter package:

library(genefilter)
alpha <- 0.1
filter <- res$baseMean
theta <- seq(mean(filter == 0), 1, length=20)
filtPadj <- filtered_p(filter=filter, test=res$pvalue, theta=theta, method="BH")
numRej  <- colSums(filtPadj < alpha, na.rm = TRUE)
res$padj <- filtPadj[, which.max(numRej), drop=TRUE]

Also, for these tests where the alternative hypothesis includes 0, you should set betaPrior=FALSE, because you don't want the prior to support the alternative hypothesis.

ADD COMMENT

Login before adding your answer.

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