Mercurial > repos > peterjc > mira4_assembler
comparison tools/mira4_0/mira4_bait.py @ 34:0785a6537f3e draft
planemo upload for repository https://github.com/peterjc/galaxy_mira/tree/master/tools/mira4_0 commit 6405ba93fcec7ea93452bf54d559c7507ee7a57c
| author | peterjc |
|---|---|
| date | Wed, 07 Jun 2017 12:33:39 -0400 |
| parents | 56b421d59805 |
| children | 259891fce7fd |
comparison
equal
deleted
inserted
replaced
| 33:1291ed21789f | 34:0785a6537f3e |
|---|---|
| 17 """Run MIRA to find its version number""" | 17 """Run MIRA to find its version number""" |
| 18 # At the commend line I would use: mira -v | head -n 1 | 18 # At the commend line I would use: mira -v | head -n 1 |
| 19 # however there is some pipe error when doing that here. | 19 # however there is some pipe error when doing that here. |
| 20 cmd = [mira_binary, "-v"] | 20 cmd = [mira_binary, "-v"] |
| 21 try: | 21 try: |
| 22 child = subprocess.Popen(cmd, | 22 child = subprocess.Popen(cmd, universal_newlines=True, |
| 23 stdout=subprocess.PIPE, | 23 stdout=subprocess.PIPE, |
| 24 stderr=subprocess.STDOUT) | 24 stderr=subprocess.STDOUT) |
| 25 except Exception as err: | 25 except Exception as err: |
| 26 sys.stderr.write("Error invoking command:\n%s\n\n%s\n" % (" ".join(cmd), err)) | 26 sys.stderr.write("Error invoking command:\n%s\n\n%s\n" % (" ".join(cmd), err)) |
| 27 sys.exit(1) | 27 sys.exit(1) |
| 86 cmd = " ".join(cmd_list) | 86 cmd = " ".join(cmd_list) |
| 87 # print cmd | 87 # print cmd |
| 88 start_time = time.time() | 88 start_time = time.time() |
| 89 try: | 89 try: |
| 90 # Run MIRA | 90 # Run MIRA |
| 91 child = subprocess.Popen(cmd_list, | 91 child = subprocess.Popen(cmd_list, universal_newlines=True, |
| 92 stdout=subprocess.PIPE, | 92 stdout=subprocess.PIPE, |
| 93 stderr=subprocess.STDOUT) | 93 stderr=subprocess.STDOUT) |
| 94 except Exception as err: | 94 except Exception as err: |
| 95 sys.stderr.write("Error invoking command:\n%s\n\n%s\n" % (cmd, err)) | 95 sys.stderr.write("Error invoking command:\n%s\n\n%s\n" % (cmd, err)) |
| 96 sys.exit(1) | 96 sys.exit(1) |
