title: Z-scores rounded to infinity for small p-values in R
body: <p>I am working with a genome-wide association study dataset, with p-values ranging from 1E-30 to 1. I have an R data frame "data" which includes a variable "p" for the p-values.</p>
  
  <p>I need to perform genomic correction of the p-values, which I am doing using the following code:</p>
  
  <pre><code>    p=data$p
  
      Zsq = qchisq(1-p, 1)
  
      lambda = median(Zsq)/0.456
  
      newZsq = Zsq/lambda
  
      Newp = 1-pchisq(newZsq, 1)
  </code></pre>
  
  <p>In the command on the second line, where I use the qchisq function to convert p-values to z-scores, z-scores for p-values &lt; 1E-16 are being rounded to infinity. This means the p-values for my most significant data points are rounded to 0 after the genomic correction, and I lose their ranking. </p>
  
  <p>Is there any way around this?</p>