comparison tools/mira4_0/mira4.py @ 38:cee8f9005e43 draft

planemo upload for repository https://github.com/peterjc/galaxy_mira/tree/master/tools/mira4_0 commit 206259620376b322fc8ed99a6efdd3712f38764b
author peterjc
date Wed, 11 Jul 2018 12:35:35 -0400
parents 259891fce7fd
children bbf14bb9607b
comparison
equal deleted inserted replaced
37:eeeb21870a73 38:cee8f9005e43
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 """A simple wrapper script to call MIRA and collect its output. 2 """A simple wrapper script to call MIRA and collect its output."""
3 """
4 3
5 from __future__ import print_function 4 from __future__ import print_function
6 5
7 import os 6 import os
8 import shutil 7 import shutil
150 sys.stderr.write(line) 149 sys.stderr.write(line)
151 sys.stderr.write("\n%s\nEnd of manifest\n%s\n" % ("=" * 60, "=" * 60)) 150 sys.stderr.write("\n%s\nEnd of manifest\n%s\n" % ("=" * 60, "=" * 60))
152 151
153 152
154 def collect_output(temp, name, handle): 153 def collect_output(temp, name, handle):
155 """Moves files to the output filenames (global variables).""" 154 """Move files to the output filenames (global variables)."""
156 f = "%s/%s_assembly/%s_d_results" % (temp, name, name) 155 f = "%s/%s_assembly/%s_d_results" % (temp, name, name)
157 if not os.path.isdir(f): 156 if not os.path.isdir(f):
158 log_manifest(manifest) 157 log_manifest(manifest)
159 sys.exit("Missing output folder") 158 sys.exit("Missing output folder")
160 if not os.listdir(f): 159 if not os.listdir(f):
205 if msg: 204 if msg:
206 sys.exit(msg) 205 sys.exit(msg)
207 206
208 207
209 def clean_up(temp, name): 208 def clean_up(temp, name):
209 """Remove temp files."""
210 folder = "%s/%s_assembly" % (temp, name) 210 folder = "%s/%s_assembly" % (temp, name)
211 if os.path.isdir(folder): 211 if os.path.isdir(folder):
212 shutil.rmtree(folder) 212 shutil.rmtree(folder)
213 213
214 214