Skip to content

Commit

Permalink
comments [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Dec 3, 2014
1 parent 786aaaf commit d1b712d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions read_utils.py
Expand Up @@ -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" % (
Expand Down

0 comments on commit d1b712d

Please sign in to comment.