text: user1852: I'm trying to normalize the coverage signals of ATAC-seq reads against its own background using normal distribution, described in this paper
  It says: 
  
  Finally, all open chromatin coverage measurements were normalized by
    standardization to the mean and standard deviation of coverage over a
    set of 25,000 randomly selected background regions. To select
    background regions, the set of peak open regions were widened to
    20,000 bp, reduced, and subtracted from the genome assembly.
    Thereafter, 25,000 random positions were selected and widened to
    reflect the distribution of widths in the set of open peaks. Coverage
    within these background regions was then calculated, and regions with
    zero coverage were discarded (~5%). The distribution of counts within
    background regions approximated a log-normal distribution. Mean and
    standard deviation of these background regions was calculated and used
    to transform the coverage measurements for the entire genome.
  
  Does anyone know any existing codes doing that? I know Anshul's pipeline does that but can't find the specific script for that step. 
  
  user2346: Supplementary File 5 and 6 contain the code you're looking for. 
  
original_text: 1852: <p>I'm trying to normalize the coverage signals of ATAC-seq reads against its own background using normal distribution, described in this <a href="https://elifesciences.org/articles/20148" rel="nofollow noreferrer">paper</a></p>
  
  <p>It says: </p>
  
  <blockquote>
    <p>Finally, all open chromatin coverage measurements were normalized by
    standardization to the mean and standard deviation of coverage over a
    set of 25,000 randomly selected background regions. To select
    background regions, the set of peak open regions were widened to
    20,000 bp, reduced, and subtracted from the genome assembly.
    Thereafter, 25,000 random positions were selected and widened to
    reflect the distribution of widths in the set of open peaks. Coverage
    within these background regions was then calculated, and regions with
    zero coverage were discarded (~5%). The distribution of counts within
    background regions approximated a log-normal distribution. Mean and
    standard deviation of these background regions was calculated and used
    to transform the coverage measurements for the entire genome.</p>
  </blockquote>
  
  <p>Does anyone know any existing codes doing that? I know Anshul's <a href="https://github.com/kundajelab/atac_dnase_pipelines" rel="nofollow noreferrer">pipeline</a> does that but can't find the specific script for that step. </p>
   2346: <p>Supplementary File <a href="https://doi.org/10.7554/eLife.20148.041" rel="nofollow noreferrer">5</a> and <a href="https://doi.org/10.7554/eLife.20148.042" rel="nofollow noreferrer">6</a> contain the code you're looking for. </p>
  