Question: Zero pvalues after lfcShrink of DESeq2 package
0
gravatar for peibo_xu
4 months 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 • 139 views
ADD COMMENTlink modified 4 months ago by Michael Love25k • written 4 months ago by peibo_xu0
Answer: Zero pvalues after lfcShrink of DESeq2 package
0
gravatar for Michael Love
4 months ago by
Michael Love25k
United States
Michael Love25k 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.

ADD COMMENTlink written 4 months ago by Michael Love25k

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 REPLYlink written 4 months ago by Kevin Blighe160

Also see this other question wrt zero pvalues

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

ADD REPLYlink written 4 months ago by Michael Love25k

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 REPLYlink written 4 months ago by peibo_xu0

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 REPLYlink modified 4 months ago • written 4 months ago by Kevin Blighe160

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 REPLYlink written 4 months ago by Michael Love25k
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 16.09
Traffic: 91 users visited in the last hour