2
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ 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). $\endgroup$ – bli Dec 29 '20 at 8:36
4
$\begingroup$
  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.

$\endgroup$
  • 1
    $\begingroup$ @OP If you want a more robust normalization I suggest (disclaimer, I am the author of the post) biostars.org/p/413626/#414440 $\endgroup$ – ATpoint Dec 28 '20 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.