From d1b712d3a2c659b173c3713201ae7fdb9d226302 Mon Sep 17 00:00:00 2001 From: Danny Park Date: Wed, 3 Dec 2014 15:28:24 -0500 Subject: [PATCH] comments [ci skip] --- read_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/read_utils.py b/read_utils.py index beab48f34..0a114c5cb 100755 --- a/read_utils.py +++ b/read_utils.py @@ -436,6 +436,10 @@ def split_bam(inBam, outBams) : picard = tools.picard.PicardTools() # get totalReadCount and maxReads + # maxReads = totalReadCount / num files, but round up to the nearest + # even number in order to keep read pairs together (assuming the input + # is sorted in query order and has no unmated reads, which can be + # accomplished by Picard RevertSam with SANITIZE=true) totalReadCount = samtools.count(inBam) maxReads = int(math.ceil(float(totalReadCount) / len(outBams) / 2) * 2) log.info("splitting %d reads into %d files of %d reads each" % (