message: Update coverage_to_regions.py
diff: #!/usr/bin/env python
  -
  +from __future__ import print_function, division
  import sys
  if len(sys.argv) < 3:
  - print "usage: <bamtools_coverage_output ", sys.argv[0], " fasta_index num_regions >regions.bed"
  - print "Generates regions with even sequencing coverage, provided an input of coverage per-position as"
  - print "generated by bamtools coverage. In other words, generates regions such that the integral of"
  - print "coverage is approximately equal for each. These can be used when variant calling to reduce"
  - print "variance in job runtime."
  + print("usage: <bamtools_coverage_output {} fasta_index num_regions >regions.bed").format(sys.argv[0])
  + print("Generates regions with even sequencing coverage, provided an input of coverage per-position as")
  + print("generated by bamtools coverage. In other words, generates regions such that the integral of")
  + print("coverage is approximately equal for each. These can be used when variant calling to reduce")
  + print("variance in job runtime.")
  exit(1)
  lengths = {}
  @@ -35,7 +35,7 @@ for line in positions:
  chrom, pos, depth = line #line.strip().split("\t")
  if lchrom != chrom:
  if lchrom:
  - print lchrom+":"+str(lpos)+"-"+str(lengths[lchrom])
  + print(lchrom+":"+str(lpos)+"-"+str(lengths[lchrom]))
  lpos = 0
  lchrom = chrom
  bp_in_region = 0
  @@ -43,9 +43,8 @@ for line in positions:
  lchrom = chrom
  bp_in_region += depth
  if bp_in_region > bp_per_region:
  - print chrom+":"+str(lpos)+"-"+str(pos) #, pos - lpos
  + print(chrom+":"+str(lpos)+"-"+str(pos)) #, pos - lpos
  lpos = pos
  bp_in_region = 0
  -
  -print lchrom+":"+str(lpos)+"-"+str(lengths[lchrom])
  +print(lchrom+":"+str(lpos)+"-"+str(lengths[lchrom]))
  