This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Question regarding generated p-values from RPKM data

Hi there,

I want to fully disclose that I have practically 0 bioinformatics experience and coding in R or any language for that matter. But I think perhaps I can still be aided in my issue.

I have been given the RPKM data as well as the p-value numbers and the corrected p-value. My lab has received RNAseq data, and I have been asked to run GSEA on it. I have managed to get GSEAPreranked going and the enrichment plots look for the most part normal.

The issue I'm having is that many of the p-values have come up as 0, and after correction are 0 still. So when I am making my ranking list, and taking the inverse of the p-value which I have read to do, I get this error saying i cannot divide by zero.

Now I am assuming that this is because the calculated p-value that was computed was just very small when the bioinformatics group ran our samples, and the software has just rounded down those numbers to 0. When comparing the two RPKM values this looks to support my assumption, as the difference between the two is often over 1000 fold.

For someone with almost no coding experience, would it be possible to use excel to recalculate the p-values from the RPKM numbers? Or can I somehow use R in a relatively easy way for the same purpose?

de rpkm rnaseq r

1 answer

There are a few issues here, the division by zero problem isn't really one. 1/p is not an 'inverse' (ignoring further the exact definition of inverse applies to functions not a single value) of a p-value, instead rather 1-p is, because p is (lower bound of) a probability. For GSEA, it should not be required that values are strictly non-zero. If it does matter due to implementation quirks, you could still quick fix that by adding a very small constant to all zero values.

  • Yes if many p-values are zero, it is likely due to a rounding error, the problem is you cannot determine the precision of your pipeline.

  • Can you re-calculate the p-values based on the RPKM values? That depends on how they were calculated (obviously). Most accepted protocols are based on the raw counts. Thus, the problem first is to get the raw data and provenance information. I'd recommend that in your case it might be best to discus and get all necessary data and protocols from your upstream provider. Having access to raw data and provenance is essential for most biologically meaningful analyses.

  • Can you re-create p-values in Excel without programming? Excel is not equipped with a rich set of statistical functions. If one of the more complex functions was used (DEseq edger, etc..) then it is not possible to reproduce in Excel without re-implementing the function in VBA. You could use a Galaxy instance which provides the same method of p-value calculation (given you are able to get information about it in the first place) instead to generate the p-values.

Thank you very much for your reply! This was very useful. The inverse p-value was throwing off the graphs, after switching it to 1-p, everything looks for the most part normal.

I'm also as a check, going to contact the bioinformatics group who sent the results and makes sure what I've done looks right.

Log in to answer this question.