# HG changeset patch # User peterjc # Date 1307484313 14400 # Node ID f3b373a41f8176a690f8aca6f1fcb9543a79a5cb # Parent 6901298ac16c29aea8b3f73c698a64e467df4e3b Migrated tool version 0.0.6 from old tool shed archive to new tool shed repository diff -r 6901298ac16c -r f3b373a41f81 tools/protein_analysis/README --- a/tools/protein_analysis/README Tue Jun 07 18:04:39 2011 -0400 +++ b/tools/protein_analysis/README Tue Jun 07 18:05:13 2011 -0400 @@ -72,11 +72,15 @@ - Additional unit tests v0.0.4 - Ignore comment lines in tmhmm2 output. v0.0.5 - Explicitly request tmhmm short output (may not be the default) +v0.0.6 - Improvement to how sub-jobs are run (should be faster) Developers ========== -These wrappers are currently being developed on the following hg branch: +This script and other tools are being developed on the following hg branch: +http://bitbucket.org/peterjc/galaxy-central/src/tools + +This incorporates the previously used hg branch: http://bitbucket.org/peterjc/galaxy-central/src/seq_analysis For making the "Galaxy Tool Shed" http://community.g2.bx.psu.edu/ tarball use diff -r 6901298ac16c -r f3b373a41f81 tools/protein_analysis/seq_analysis_utils.py --- a/tools/protein_analysis/seq_analysis_utils.py Tue Jun 07 18:04:39 2011 -0400 +++ b/tools/protein_analysis/seq_analysis_utils.py Tue Jun 07 18:05:13 2011 -0400 @@ -102,28 +102,32 @@ raise err return files -def run_jobs(jobs, threads): +def run_jobs(jobs, threads, verbose=False): """Takes list of cmd strings, returns dict with error levels.""" pending = jobs[:] running = [] results = {} while pending or running: - #print "%i jobs pending, %i running, %i completed" \ - # % (len(jobs), len(running), len(results)) #See if any have finished for (cmd, process) in running: - return_code = process.wait() + return_code = process.poll() #non-blocking if return_code is not None: results[cmd] = return_code running = [(cmd, process) for (cmd, process) in running \ if cmd not in results] + if verbose: + print "%i jobs pending, %i running, %i completed" \ + % (len(pending), len(running), len(results)) #See if we can start any new threads while pending and len(running) < threads: cmd = pending.pop(0) + if verbose: + print cmd process = subprocess.Popen(cmd, shell=True) running.append((cmd, process)) #Loop... - sleep(1) - #print "%i jobs completed" % len(results) + sleep(10) + if verbose: + print "%i jobs completed" % len(results) assert set(jobs) == set(results) return results diff -r 6901298ac16c -r f3b373a41f81 tools/protein_analysis/signalp3.xml --- a/tools/protein_analysis/signalp3.xml Tue Jun 07 18:04:39 2011 -0400 +++ b/tools/protein_analysis/signalp3.xml Tue Jun 07 18:05:13 2011 -0400 @@ -1,4 +1,4 @@ - + Find signal peptides in protein sequences signalp3.py $organism $truncate 8 $fasta_file $tabular_file diff -r 6901298ac16c -r f3b373a41f81 tools/protein_analysis/suite_config.xml --- a/tools/protein_analysis/suite_config.xml Tue Jun 07 18:04:39 2011 -0400 +++ b/tools/protein_analysis/suite_config.xml Tue Jun 07 18:05:13 2011 -0400 @@ -1,9 +1,9 @@ - + Wrappers for TMHMM and SignalP - + Find transmembrane domains in protein sequences - + Find signal peptides in protein sequences diff -r 6901298ac16c -r f3b373a41f81 tools/protein_analysis/tmhmm2.xml --- a/tools/protein_analysis/tmhmm2.xml Tue Jun 07 18:04:39 2011 -0400 +++ b/tools/protein_analysis/tmhmm2.xml Tue Jun 07 18:05:13 2011 -0400 @@ -1,4 +1,4 @@ - + Find transmembrane domains in protein sequences tmhmm2.py 8 $fasta_file $tabular_file