diff tools/protein_analysis/tmhmm2.py @ 18:eb6ac44d4b8e draft

Suite v0.2.8, record Promoter 2 verion + misc internal updates
author peterjc
date Tue, 01 Sep 2015 09:56:36 -0400
parents 99b82a2b1272
children f3ecd80850e2
line wrap: on
line diff
--- a/tools/protein_analysis/tmhmm2.py	Fri Nov 21 08:19:09 2014 -0500
+++ b/tools/protein_analysis/tmhmm2.py	Tue Sep 01 09:56:36 2015 -0400
@@ -43,12 +43,12 @@
 import sys
 import os
 import tempfile
-from seq_analysis_utils import stop_err, split_fasta, run_jobs, thread_count
+from seq_analysis_utils import sys_exit, split_fasta, run_jobs, thread_count
 
 FASTA_CHUNK = 500
 
 if len(sys.argv) != 4:
-    stop_err("Require three arguments, number of threads (int), input protein FASTA file & output tabular file")
+    sys_exit("Require three arguments, number of threads (int), input protein FASTA file & output tabular file")
 
 num_threads = thread_count(sys.argv[1], default=4)
 fasta_file = sys.argv[2]
@@ -68,7 +68,7 @@
             identifier, length, expAA, first60, predhel, topology = parts
         except:
             assert len(parts)!=6
-            stop_err("Bad line: %r" % line)
+            sys_exit("Bad line: %r" % line)
         assert length.startswith("len="), line
         length = length[4:]
         assert expAA.startswith("ExpAA="), line
@@ -112,7 +112,7 @@
         except IOError:
             output = ""
         clean_up(fasta_files + temp_files)
-        stop_err("One or more tasks failed, e.g. %i from %r gave:\n%s" % (error_level, cmd, output),
+        sys_exit("One or more tasks failed, e.g. %i from %r gave:\n%s" % (error_level, cmd, output),
                  error_level)
 del results
 del jobs
@@ -125,7 +125,7 @@
     data_handle.close()
     if not count:
         clean_up(fasta_files + temp_files)
-        stop_err("No output from tmhmm2")
+        sys_exit("No output from tmhmm2")
 out_handle.close()
 
 clean_up(fasta_files + temp_files)