changeset 2:6112a571f012 draft

planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/data_managers/data_manager_humann2_database_downloader commit f474a24a52dcda7fb6681869e24f566d28f1e457
author iuc
date Fri, 23 Jun 2017 06:00:47 -0400
parents 1316375a8cbb
children 854d9862a9f1
files data_manager/data_manager_humann2_download.py data_manager/data_manager_humann2_download.xml
diffstat 2 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/data_manager_humann2_download.py	Mon Mar 13 12:34:20 2017 -0400
+++ b/data_manager/data_manager_humann2_download.py	Fri Jun 23 06:00:47 2017 -0400
@@ -5,6 +5,7 @@
 import json
 import optparse
 import os
+import shutil
 import subprocess
 import sys
 
@@ -15,7 +16,7 @@
     "uniref50_diamond": "Full UniRef50",
     "uniref50_ec_filtered_diamond": "EC-filtered UniRef50",
     "uniref50_GO_filtered_rapsearch2": "GO filtered UniRef50 for rapsearch2",
-    "uniref90_diamond": "Full UniRef50",
+    "uniref90_diamond": "Full UniRef90",
     "uniref90_ec_filtered_diamond": "EC-filtered UniRef90",
     "DEMO_diamond": "Demo"
 }
@@ -112,13 +113,12 @@
     db_target_dir = os.path.join(target_dir, database)
     build_target_dir = os.path.join(db_target_dir, build)
     os.makedirs(build_target_dir)
-    cmd = "humann2_databases --download %s %s %s" % (database,
-                                                     build,
-                                                     db_target_dir)
+    cmd = "humann2_databases --download %s %s %s --update-config no" % (
+        database,
+        build,
+        db_target_dir)
     subprocess.check_call(cmd, shell=True)
-    print(os.listdir(db_target_dir))
-    os.rename(os.path.join(db_target_dir, database), build_target_dir)
-    print(os.listdir(db_target_dir))
+    shutil.move(os.path.join(db_target_dir, database), build_target_dir)
     add_data_table_entry(
         data_tables,
         table_name,
--- a/data_manager/data_manager_humann2_download.xml	Mon Mar 13 12:34:20 2017 -0400
+++ b/data_manager/data_manager_humann2_download.xml	Fri Jun 23 06:00:47 2017 -0400
@@ -1,7 +1,10 @@
-<tool id="data_manager_humann2_download" name="HUMAnN2 download" version="0.9.9" tool_type="manage_data">
+<tool id="data_manager_humann2_download" name="HUMAnN2 download" version="@VERSION@.0" tool_type="manage_data">
     <description>Download HUMAnN2 database</description>
+    <macros>
+        <token name="@VERSION@">0.9.9</token>
+    </macros>
     <requirements>
-        <requirement type="package" version="0.9.9">humann2</requirement>
+        <requirement type="package" version="@VERSION@">humann2</requirement>
     </requirements>
     <stdio>
         <exit_code range=":-1"  level="fatal" description="Error: Cannot open file" />
@@ -30,7 +33,7 @@
                     <option value="uniref50_diamond">Full UniRef50</option>
                     <option value="uniref50_ec_filtered_diamond">EC-filtered UniRef50</option>
                     <option value="uniref50_GO_filtered_rapsearch2">GO filtered UniRef50 for rapsearch2</option>
-                    <option value="uniref90_diamond" selected="true">Full UniRef50</option>
+                    <option value="uniref90_diamond" selected="true">Full UniRef90</option>
                     <option value="uniref90_ec_filtered_diamond">EC-filtered UniRef90</option>
                     <option value="DEMO_diamond">Demo</option>
                 </param>