Answers.Body: <ol>
  <li>Yes</li>
  <li>The total RPKM for the region in the bedgraph file is the value already present in the bedgraph file. If you want to estimate the RPKM for a larger region composed of multiple bins then you can average the per-bin RPKM values. Note that adjacent bins with the same value are merged by deepTools, so you will need to account for this.</li>
  </ol>
  <p>Note that RPKM is NOT a robust normalization and that I should remove it from deepTools so people stop using it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-28T16:27:27.863Z
Answers.LastActivityDate: 2020-12-28T16:27:27.863Z
Answers.UserDisplayName: Devon Ryan
Body: <p>Im using bamCoverage on a file and ive set the bin size to 1 but also normalizing using RPKM for defined regions using a bedgraph file.  The output from bamCoverage however is in binned segments each with a (RPKM) score.  Am I correct in interpreting then that</p>
  <p>1 - the output bedgraph tells me the (total) RPKM score for that particular bin?</p>
  <p>2 - to get the total RPKM score for the region defined in the bedgraph I need to sum all the RPKM scores given for that particular region?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-29T08:36:44.450Z
Comments.Text: If I'm not mistaken, RPKM includes a "normalization" by unit of length, so it does not make sense to sum these values along a region. A weighted average makes more sense (were the weights would be the bin widths).
Comments.UserDisplayName: bli
Tags: <rna-seq><deeptools>
Title: Clarification regarding (deepTools) bamCoverage output
ThreadText: # Clarification regarding (deepTools) bamCoverage output
  
  (Asked by: username_0 on 2020-12-28)
  
  Im using bamCoverage on a file and ive set the bin size to 1 but also normalizing using RPKM for defined regions using a bedgraph file. The output from bamCoverage however is in binned segments each with a (RPKM) score. Am I correct in interpreting then that
  
  1 - the output bedgraph tells me the (total) RPKM score for that particular bin?
  
  2 - to get the total RPKM score for the region defined in the bedgraph I need to sum all the RPKM scores given for that particular region?
  
  **Tags:** rna-seq, deeptools
  
  > **Comments:**
  > **username_1**: If I'm not mistaken, RPKM includes a "normalization" by unit of length, so it does not make sense to sum these values along a region. A weighted average makes more sense (were the weights would be the bin widths).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-12-28. Score: 3
  
  1. Yes
  2. The total RPKM for the region in the bedgraph file is the value already present in the bedgraph file. If you want to estimate the RPKM for a larger region composed of multiple bins then you can average the per-bin RPKM values. Note that adjacent bins with the same value are merged by deepTools, so you will need to account for this.
  
  Note that RPKM is NOT a robust normalization and that I should remove it from deepTools so people stop using it.
  
  
  ---
  
  