Mercurial > repos > peterjc > tmhmm_and_signalp
diff tools/protein_analysis/psortb.py @ 26:20139cb4c844 draft
planemo upload for repository https://github.com/peterjc/pico_galaxy/tools/protein_analysis commit 221d4187992cbb993e02dc3ea0ef0150c7916a4a-dirty
author | peterjc |
---|---|
date | Wed, 13 May 2015 06:14:42 -0400 |
parents | 3d74c1176d67 |
children | 3cb02adf4326 |
line wrap: on
line diff
--- a/tools/protein_analysis/psortb.py Fri Nov 21 08:17:36 2014 -0500 +++ b/tools/protein_analysis/psortb.py Wed May 13 06:14:42 2015 -0400 @@ -24,7 +24,7 @@ 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 @@ -33,7 +33,7 @@ sys.exit(os.system("psort --version")) if len(sys.argv) != 8: - stop_err("Require 7 arguments, number of threads (int), type (e.g. archaea), " + sys_exit("Require 7 arguments, number of threads (int), type (e.g. archaea), " "output (e.g. terse/normal/long), cutoff, divergent, input protein " "FASTA file & output tabular file") @@ -56,7 +56,7 @@ if out_type == "terse": header = ['SeqID', 'Localization', 'Score'] elif out_type == "normal": - stop_err("Normal output not implemented yet, sorry.") + sys_exit("Normal output not implemented yet, sorry.") elif out_type == "long": if org_type == "-n": #Gram negative bacteria @@ -93,9 +93,9 @@ 'Extracellular_Score', 'Final_Localization', 'Final_Localization_Details', 'Final_Score', 'Secondary_Localization', 'PSortb_Version'] else: - stop_err("Expected -n, -p or -a for the organism type, not %r" % org_type) + sys_exit("Expected -n, -p or -a for the organism type, not %r" % org_type) else: - stop_err("Expected terse, normal or long for the output type, not %r" % out_type) + sys_exit("Expected terse, normal or long for the output type, not %r" % out_type) tmp_dir = tempfile.mkdtemp() @@ -149,7 +149,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 @@ -163,7 +163,7 @@ data_handle.close() if not count: clean_up(fasta_files + temp_files) - stop_err("No output from psortb") + sys_exit("No output from psortb") out_handle.close() print "%i records" % count