Skip to content

Commit

Permalink
change calculation of splitting [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Dec 3, 2014
1 parent fc8f97a commit 786aaaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions read_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__date__ = "PLACEHOLDER"
__commands__ = []

import argparse, logging, os, tempfile, shutil, subprocess
import argparse, logging, math, os, tempfile, shutil, subprocess
from Bio import SeqIO
import util.cmd, util.file
from util.file import mkstempfname
Expand Down Expand Up @@ -437,7 +437,7 @@ def split_bam(inBam, outBams) :

# get totalReadCount and maxReads
totalReadCount = samtools.count(inBam)
maxReads = int(round(float(totalReadCount) / len(outBams) / 2) * 2)
maxReads = int(math.ceil(float(totalReadCount) / len(outBams) / 2) * 2)
log.info("splitting %d reads into %d files of %d reads each" % (
totalReadCount, len(outBams), maxReads))

Expand Down

0 comments on commit 786aaaf

Please sign in to comment.