diff tools/seq_select_by_id/seq_select_by_id.py @ 9:3b0a14722175 draft default tip

v0.0.14 - Script works on Python 2 and 3 (fixed output file mode)
author peterjc
date Wed, 23 May 2018 09:15:13 -0400
parents 8e1a90917fa7
children
line wrap: on
line diff
--- a/tools/seq_select_by_id/seq_select_by_id.py	Wed May 17 09:23:03 2017 -0400
+++ b/tools/seq_select_by_id/seq_select_by_id.py	Wed May 23 09:15:13 2018 -0400
@@ -26,7 +26,7 @@
 import sys
 
 if "-v" in sys.argv or "--version" in sys.argv:
-    print("v0.0.13")
+    print("v0.0.14")
     sys.exit(0)
 
 # Parse Command Line
@@ -128,7 +128,7 @@
 else:
     # Avoid overhead of parsing into SeqRecord objects,
     # just re-use the original formatting from the input file.
-    out_handle = open(out_file, "w")
+    out_handle = open(out_file, "wb")
     count = 0
     for name in parse_ids(tabular_file, column):
         try: