diff snippy_core_wrapper.py @ 17:412683e7a8fe draft

planemo upload for repository https://github.com/tseemann/snippy commit f4fe84a2dc64bcc8a68de2cdc68c32872294708b-dirty
author dfornika
date Tue, 22 Jan 2019 14:40:08 -0500
parents a69f73853101
children 9d8519bf7a40
line wrap: on
line diff
--- a/snippy_core_wrapper.py	Tue Jan 22 13:52:10 2019 -0500
+++ b/snippy_core_wrapper.py	Tue Jan 22 14:40:08 2019 -0500
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-#--------------------------------------
+# --------------------------------------
 #
 #        snippy_core_wrapper.py
 #
@@ -11,15 +11,16 @@
 #   - Builds the snippy-core command
 #   - Runs the snippy-core command
 #
-#--------------------------------------
+# --------------------------------------
 
+import argparse
 import os
-import sys
-import argparse
 import subprocess
 from shutil import copyfile
 
 def main():
+
+
     parser = argparse.ArgumentParser()
     parser.add_argument('-r', '--ref', help='Reference fasta', required=True)
     parser.add_argument('-i', '--indirs', help='Comma-separated list of input datasets')
@@ -29,16 +30,15 @@
 
     for input_dataset in args.indirs.split(','):
         base_name = os.path.basename(input_dataset)
-        print("base_name: " + base_name)
         copyfile(input_dataset, base_name)
-        subprocess.Popen(['tar', '-xf', base_name])
+        subprocess.Popen(['tar', '-xf', base_name]).wait()
 
     extracted_dirs = [f for f in os.listdir('.') if os.path.isdir(f) ]
-    print("extracted_dirs: " + str(extracted_dirs))
     for extracted_dir in extracted_dirs:
         snippy_core_command_line.append(extracted_dir)
-    print(str(snippy_core_command_line))
+
     subprocess.Popen(snippy_core_command_line).wait()
 
+
 if __name__ == '__main__':
     main()