Question: Zero pvalues after lfcShrink of DESeq2 package
0
8 weeks ago by
peibo_xu0
peibo_xu0 wrote:

Hi, I am using results by results() function from DESeq2 package to do volcano plot.

I found after I did lfcShrink function, I got many zero pvalues, but not before lfcShrink, even though I set independentFiltering=FALSE,cooksCutoff=FALSE.

How should I solve this? Any suggestion which one I should represent for a publication-ready plot?

deseq2 pvalue lfcshrink • 90 views
modified 8 weeks ago by Michael Love23k • written 8 weeks ago by peibo_xu0
Answer: Zero pvalues after lfcShrink of DESeq2 package
0
8 weeks ago by
Michael Love23k
United States
Michael Love23k wrote:

Please post your code. lfcShrink doesn’t computer pvalues, but just calls results() internally, so unless I can see your code I can’t help much. I find the shrunken LFC better for publication as the noisy LFC are removed in a data driven way.

Hi Michael, the user had posted a similar question as an issue to my EnhancedVolcano Bioconductor package: https://github.com/kevinblighe/EnhancedVolcano/issues/14

I forwarded them here in relation to their query about lfcshrink.

Also see this other question wrt zero pvalues

https://support.bioconductor.org/p/119574/#119575

Hi Michael, Thanks for helping. First, I should re-edit the issue, I before lfcShrink, I can see volcano plot is more flat(some pvalues are large), but after lfcShrink, many gene points are on the middle part of plot(very small pvaluse but about zero fold changes).

After checking with https://support.bioconductor.org/p/119574/#119575 this question, and the answer posted by Kevin, I guess zero pvalues may be due to lfcShrink and machine-specific lowest value set by EnhancedVolcano

Here is the code I run

res=results(dds, contrast = c("cell", "type1", "type2"),independentFiltering=FALSE,cooksCutoff=FALSE)
res1=lfcShrink(dds,contrast=c("cell", "type1", "type2"),independentFiltering=FALSE,cooksCutoff=FALSE)
res2=lfcShrink(dds,contrast=c("cell", "type1", "type2"),independentFiltering=TRUE,cooksCutoff=TRUE)


So for me, shrunken LFC looks better, but I do not how to deal with gene points very small pvaluse but about zero fold changes, is this a 'volcano plot' related issue?

Sorry for the confusion at the first time.

Hey peibo_xu, just to confirm the steps:

if EnhancedVolcano detects a p-value equal to 0, it will automatically convert these to the value of .Machine$double.xmin. On my computer, this value is: .Machine$double.xmin
[1] 2.225074e-308


Obviously, this is necessary because one cannot plot the negative log10 of 0:

-log10(0)
[1] Inf


You have the option of converting these p-values of 0 to something else, prior to using EnhancedVolcano. For example, you may simply convert them (just for plotting) to a magnitude of 10 lower than the lowest non-zero p-value, as this quick example shows:

pvalues <- c(0, 0.01, 0.05, 0, 0.0002)

min(pvalues[pvalues > 0])
[1] 0.0002

min(pvalues[pvalues > 0]) * 10^-1
[1] 0.00002


Now convert (impute) the p-values of 0:

pImpute <- min(pvalues[pvalues > 0]) * 10^-1
pvalues[pvalues == 0] <- pImpute
pvalues
[1] 0.00002 0.01 0.05 0.00002 0.0002