Zero pvalues after lfcShrink of DESeq2 package
1
1
Entering edit mode
peibo_xu ▴ 10
@peibo_xu-15153
Last seen 5.1 years ago

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 • 1.5k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 20 minutes ago
United States

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.

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Also see this other question wrt zero pvalues

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

The LFC shrinkage tends to be more “strict” about evidence on the LFC than the null hypothesis test. You can use svalues instead of adjusted pvalues which will give a consistent picture, by setting svalue=TRUE. See the apeglm paper for motivation and details.

ADD REPLY

Login before adding your answer.

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