changeset 1:32d04371ed19 draft

planemo upload for repository https://github.com/dfornika/galaxytools/tree/master/data_managers/data_manager_build_kraken2_database/ commit f05f93ee024df8b38efa1c92db9785d52c726f85-dirty
author dfornika
date Thu, 28 Feb 2019 13:59:33 -0500
parents 7e43f66abe9d
children cf0cda80b659
files data_manager/kraken2_build_standard.py tool-data/kraken2_databases.loc.sample tool_data_table_conf.xml.sample
diffstat 2 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/kraken2_build_standard.py	Thu Feb 28 02:32:38 2019 -0500
+++ b/data_manager/kraken2_build_standard.py	Thu Feb 28 13:59:33 2019 -0500
@@ -27,13 +27,22 @@
         '--minimizer-spaces', str(kraken2_args["minimizer_spaces"]),
         '--db', database_name
     ]
-    pprint(args)
     proc = subprocess.Popen(args=args, shell=False, cwd=target_directory)
     return_code = proc.wait()
     if return_code:
         print("Error building database.", file=sys.stderr)
         sys.exit( return_code )
-
+    args = [
+        'kraken2-build',
+        '--threads', str(kraken2_args["threads"]),
+        '--clean',
+        '--db', database_name
+    ]
+    proc = subprocess.Popen(args=args, shell=False, cwd=target_directory)
+    return_code = proc.wait()
+    if return_code:
+        print("Error building database.", file=sys.stderr)
+        sys.exit( return_code )
     data_table_entry = {
         "value": database_name,
         "name": database_name,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Thu Feb 28 13:59:33 2019 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tables>
+    <!-- Locations of Kraken database in the required format -->
+    <table name="kraken2_databases" comment_char="#">
+        <columns>value, name, path</columns>
+        <file path="tool-data/kraken2_databases.loc" />
+    </table>
+</tables>