diff resize_coordinate_window.py @ 4:4eb3cc1f8466 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/resize_coordinate_window commit d357611d8d49631f0eb7c5e022e80cb4c9483308"
author iuc
date Wed, 11 Dec 2019 18:06:42 -0500
parents 9ba78e8985dc
children
line wrap: on
line diff
--- a/resize_coordinate_window.py	Mon Jul 10 11:47:19 2017 -0400
+++ b/resize_coordinate_window.py	Wed Dec 11 18:06:42 2019 -0500
@@ -1,3 +1,5 @@
+
+
 import argparse
 import fileinput
 import sys
@@ -7,8 +9,7 @@
 
 
 def stop_err(msg):
-    sys.stderr.write(msg)
-    sys.exit(1)
+    sys.exit(msg)
 
 
 parser = argparse.ArgumentParser()
@@ -23,7 +24,7 @@
 args = parser.parse_args()
 
 extend_existing = args.extend_existing == 'existing'
-out = open(args.output, 'wb')
+out = open(args.output, 'w')
 
 chrom_start = int(args.start_coordinate)
 chrom_lens = dict()
@@ -84,6 +85,6 @@
 out.close()
 
 if len_file_error is not None:
-    print "All chrom lengths set to %d, error in chrom len file: %s" % (MAX_CHROM_LEN, len_file_error)
+    print("All chrom lengths set to %d, error in chrom len file: %s" % (MAX_CHROM_LEN, len_file_error))
 if len_file_missing:
-    print "All chrom lengths set to %d, chrom len files are not installed." % MAX_CHROM_LEN
+    print("All chrom lengths set to %d, chrom len files are not installed." % MAX_CHROM_LEN)