Mercurial > repos > peterjc > tmhmm_and_signalp
diff tools/protein_analysis/rxlr_motifs.py @ 30:6d9d7cdf00fc draft
v0.2.11 Job splitting fast-fail; RXLR tools supports HMMER2 from BioConda; Capture more version information; misc internal changes
author | peterjc |
---|---|
date | Thu, 21 Sep 2017 11:15:55 -0400 |
parents | 3cb02adf4326 |
children | 20da7f48b56f |
line wrap: on
line diff
--- a/tools/protein_analysis/rxlr_motifs.py Wed Feb 01 09:46:14 2017 -0500 +++ b/tools/protein_analysis/rxlr_motifs.py Thu Sep 21 11:15:55 2017 -0400 @@ -31,19 +31,31 @@ Whisson et al. (2007) used SignalP v3.0 anyway. Whisson et al. (2007) used HMMER 2.3.2, and althought their HMM model -can still be used with hmmsearch from HMMER 3 this this does give +can still be used with hmmsearch from HMMER 3, sadly this does give slightly different results. We expect the hmmsearch from HMMER 2.3.2 (the last stable release of HMMER 2) to be present on the path under the name hmmsearch2 (allowing it to co-exist with HMMER 3). + +If using Conda, you should therefore install the special "hmmer2" +package from BioConda which provides "hmmsearch2" etc:: + + conda install -c bioconda hmmer2 + +See https://bioconda.github.io/recipes/hmmer2/README.html and +https://anaconda.org/bioconda/hmmer2 """ + +from __future__ import print_function + import os -import sys import re import subprocess +import sys + from seq_analysis_utils import fasta_iterator if "-v" in sys.argv: - print("RXLR Motifs v0.0.10") + print("RXLR Motifs v0.0.14") sys.exit(0) if len(sys.argv) != 5: @@ -91,9 +103,10 @@ def get_hmmer_version(exe, required=None): - cmd = "%s -h" % exe try: - child = subprocess.Popen([exe, "-h"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + child = subprocess.Popen([exe, "-h"], + universal_newlines=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) except OSError: raise ValueError("Could not run %s" % exe) stdout, stderr = child.communicate() @@ -110,7 +123,7 @@ # Run hmmsearch for Whisson et al. (2007) if model == "Whisson2007": hmm_file = os.path.join(os.path.split(sys.argv[0])[0], - "whisson_et_al_rxlr_eer_cropped.hmm") + "whisson_et_al_rxlr_eer_cropped.hmm") if not os.path.isfile(hmm_file): sys.exit("Missing HMM file for Whisson et al. (2007)") if not get_hmmer_version(hmmer_search, "HMMER 2.3.2 (Oct 2003)"): @@ -275,5 +288,5 @@ os.remove(signalp_output_file) # Short summary to stdout for Galaxy's info display -print "%s for %i sequences:" % (model, total) -print ", ".join("%s = %i" % kv for kv in sorted(tally.iteritems())) +print("%s for %i sequences:" % (model, total)) +print(", ".join("%s = %i" % kv for kv in sorted(tally.iteritems())))