Repository 'amrfinderplus_data_manager_build'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/amrfinderplus_data_manager_build

Changeset 2:a5921c09b7b7 (2024-05-30)
Previous changeset 1:592ef3959907 (2023-04-16)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_amrfinderplus commit 991998a3bb25e0059a8441975c652c7a75063709
modified:
data_manager/data_manager_build_amrfinderplus.py
data_manager/data_manager_build_amrfinderplus.xml
data_manager/macro.xml
data_manager_conf.xml
tool_data_table_conf.xml.sample
tool_data_table_conf.xml.test
added:
test-data/amrfinderplus_versioned.loc.test
tool-data/amrfinderplus_versioned.loc.sample
removed:
test-data/amrfinderplus.loc.test
test-data/amrfinderplus_test_data_manager_2.json
tool-data/amrfinderplus.loc.sample
b
diff -r 592ef3959907 -r a5921c09b7b7 data_manager/data_manager_build_amrfinderplus.py
--- a/data_manager/data_manager_build_amrfinderplus.py Sun Apr 16 08:29:18 2023 +0000
+++ b/data_manager/data_manager_build_amrfinderplus.py Thu May 30 13:06:37 2024 +0000
[
@@ -15,7 +15,7 @@
     """
 
     def __init__(self,
-                 amrfinderplus_database="amrfinderplus_database",
+                 amrfinderplus_database="amrfinderplus_versioned_database",
                  db_name="amrfinderplus-db",
                  amrfinderplus_version="latest",
                  date_version=None):
@@ -50,6 +50,7 @@
                              f"-{self._amrfinderplus_date_version}"
         data_info = dict(value=amrfinderplus_value,
                          name=amrfinderplus_name,
+                         db_version=self._amrfinderplus_version,
                          path=self._db_name)
         self.amrfinderplus_table_list["data_tables"][self.data_table_name] = [data_info]
         return self.amrfinderplus_table_list
@@ -110,8 +111,6 @@
         """
         self.amrfinderplus_db_path = f'{self._output_dir}/{self._db_name}'
         os.makedirs(self.amrfinderplus_db_path)
-        if self._amrfinderplus_version == 'latest':
-            self.get_amrfinderplus_version()
 
         amrfinderplus_ftp_path = f"ftp://{self._login}:" \
                                  f"{self._password}@{self._ncbi_ftp_url}/" \
b
diff -r 592ef3959907 -r a5921c09b7b7 data_manager/data_manager_build_amrfinderplus.xml
--- a/data_manager/data_manager_build_amrfinderplus.xml Sun Apr 16 08:29:18 2023 +0000
+++ b/data_manager/data_manager_build_amrfinderplus.xml Thu May 30 13:06:37 2024 +0000
[
@@ -1,62 +1,28 @@
 <tool id="data_manager_build_amrfinderplus" name="amrfinderplus_datamanager" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
-    <description>AMRfinderplus database builder</description>
+    <description>AMRFinderPlus database builder</description>
     <macros>
         <import>macro.xml</import>
     </macros>
     <expand macro="requirements"/>
     <command detect_errors="exit_code">
       <![CDATA[
-        python '$__tool_directory__/data_manager_build_amrfinderplus.py'
-        '$output_file'
-        --db_version '$database_list.database_version_select'
-        #if $database_list.database_version_select != 'latest':
-            --db_date '$database_list.database_date_select'
-        #end if
-        $test_data_manager
+python '$__tool_directory__/data_manager_build_amrfinderplus.py'
+    '$output_file'
+    --db_version '$database_list.database_version_select'
+    #if $database_list.database_version_select != 'latest':
+    --db_date '$database_list.database_date_select'
+    #end if
+    $test_data_manager
       ]]></command>
     <inputs>
         <conditional name="database_list">
             <param name="database_version_select" type="select" label="Database version">
-                <option value="latest" selected="true">Latest available version</option>
-                <option value="3.10">V3.10</option>
-                <option value="3.9">V3.9</option>
-                <option value="3.8">V3.8</option>
-                <option value="3.6">V3.6</option>
+                <option value="3.12">V3.12</option>
             </param>
-            <when value="latest">
-            </when>
-            <when value="3.10">
+            <when value="3.12">
                 <param name="database_date_select" type="select" label="Date version">
-                <option value="2022-10-11.2" selected="true">2022-10-11.2</option>
-                <option value="2022-08-09.1">2022-08-09.1</option>
-                <option value="2022-05-26.1">2022-05-26.1</option>
-                <option value="2022-04-04.1">2022-04-04.1</option>
-                <option value="2021-12-21.1">2021-12-21.1</option>
-                <option value="2021-09-30.1">2021-09-30.1</option>
-                <option value="2021-09-30.1">2021-08-11.1</option>
-                <option value="2021-09-30.1">2021-06-01.1</option>
-                <option value="2021-09-30.1">2021-03-01.1</option>
-                </param>
-            </when>
-            <when value="3.9">
-                <param name="database_date_select" type="select" label="Date version">
-                <option value="2020-11-09.1" selected="true">2020-11-09.1</option>
-                <option value="2020-12-17.1">2020-12-17.1</option>
-                </param>
-            </when>
-             <when value="3.8">
-                <param name="database_date_select" type="select" label="Date version">
-                <option value="2020-09-30.1" selected="true">2020-09-30.1</option>
-                <option value="2020-09-22.2">2020-09-22.2</option>
-                <option value="2020-07-16.2">2020-07-16.2</option>
-                <option value="2020-06-11.1">2020-06-11.1</option>
-                <option value="2020-05-04.1">2020-05-04.1</option>
-                </param>
-            </when>
-            <when value="3.6">
-                <param name="database_date_select" type="select" label="Date version">
-                <option value="2020-01-22.1" selected="true">2020-01-22.1</option>
-                <option value="2020-03-20.1">2020-03-20.1</option>
+                    <option value="2024-05-02.2">2024-05-02.2</option>
+                    <option value="2024-01-31.1">2024-01-31.1</option>
                 </param>
             </when>
         </conditional>
@@ -73,24 +39,31 @@
                 <assert_contents>
                     <has_n_lines n="1"/>
                     <has_text text="{&quot;data_tables&quot;"/>
-                    <has_text text="amrfinderplus_database"/>
+                    <has_text text="amrfinderplus_versioned_database"/>
+                    <has_text text='"db_version": "3.12"'/>
                 </assert_contents>
             </output>
         </test>
-        <!-- Test_2 DB 3.2 -->
+        <!-- Test_2 DB 3.12 2024-01-31.1 -->
         <test expect_num_outputs="1">
             <param name="test_data_manager" value="--test"/>
             <conditional name="database_list">
-                <param name="database_version_select" value="3.6"/>
-                <param name="database_date_select" value="2020-03-20.1"/>
+                <param name="database_version_select" value="3.12"/>
+                <param name="database_date_select" value="2024-01-31.1"/>
             </conditional>
-            <output name="output_file" value="amrfinderplus_test_data_manager_2.json"/>
+            <output name="output_file">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                    <has_text text="{&quot;data_tables&quot;"/>
+                    <has_text text="amrfinderplus_versioned_database"/>
+                    <has_text text='"name": "V3.12-2024-01-31.1"'/>
+                    <has_text text='"db_version": "3.12"'/>
+                </assert_contents>
+            </output>
         </test>
-
-
     </tests>
     <help><![CDATA[
-        Download amrfinderplus database from the NCBI server
+Download AMRFinderPlus database from the NCBI server
     ]]></help>
     <citations>
         <citation type="doi">10.1038/s41598-021-91456-0</citation>
b
diff -r 592ef3959907 -r a5921c09b7b7 data_manager/macro.xml
--- a/data_manager/macro.xml Sun Apr 16 08:29:18 2023 +0000
+++ b/data_manager/macro.xml Thu May 30 13:06:37 2024 +0000
b
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <macros>
-    <token name="@TOOL_VERSION@">3.10.45</token>
+    <token name="@TOOL_VERSION@">3.12.8</token>
     <token name="@PYTHON_VERSION@">3.10.6</token>
     <token name="@PANDAS@">1.5.1</token>
     <token name="@VERSION_SUFFIX@">0</token>
b
diff -r 592ef3959907 -r a5921c09b7b7 data_manager_conf.xml
--- a/data_manager_conf.xml Sun Apr 16 08:29:18 2023 +0000
+++ b/data_manager_conf.xml Thu May 30 13:06:37 2024 +0000
b
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <data_managers>
     <data_manager tool_file="data_manager/data_manager_build_amrfinderplus.xml" id="data_manager_build_amrfinderplus">
-        <data_table name="amrfinderplus_database">
+        <data_table name="amrfinderplus_versioned_database">
             <output>
                 <column name="value" />
                 <column name="name" />
b
diff -r 592ef3959907 -r a5921c09b7b7 test-data/amrfinderplus.loc.test
--- a/test-data/amrfinderplus.loc.test Sun Apr 16 08:29:18 2023 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,8 +0,0 @@
-# this is a tab separated file describing the location of amrfinderplus database
-#
-# the columns are:
-# value, name, path
-#
-# for example
-amrfinderplus_V3.10_2022-10-11.2 V3.10-2022-10-11.2 amrfinderplus-db
-amrfinderplus_V3.6_2020-03-20.1 V3.6-2020-03-20.1 amrfinderplus-db
b
diff -r 592ef3959907 -r a5921c09b7b7 test-data/amrfinderplus_test_data_manager_2.json
--- a/test-data/amrfinderplus_test_data_manager_2.json Sun Apr 16 08:29:18 2023 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,1 +0,0 @@
-{"data_tables": {"amrfinderplus_database": [{"name": "V3.6-2020-03-20.1", "path": "amrfinderplus-db", "value": "amrfinderplus_V3.6_2020-03-20.1"}]}}
\ No newline at end of file
b
diff -r 592ef3959907 -r a5921c09b7b7 test-data/amrfinderplus_versioned.loc.test
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/amrfinderplus_versioned.loc.test Thu May 30 13:06:37 2024 +0000
b
@@ -0,0 +1,10 @@
+# this is a tab separated file describing the location of amrfinderplus database
+#
+# the columns are:
+# value, name, db_version, path
+#
+# for example
+amrfinderplus_V3.12_2024-05-02.2 V3.12-2024-05-02.2 3.12 amrfinderplus-db
+amrfinderplus_V3.12_2024-01-31.1 V3.12-2024-01-31.1 3.12 amrfinderplus-db
+amrfinderplus_V3.12_2024-05-02.2 V3.12-2024-05-02.2 3.12 /private/var/folders/7j/21czvpk170zcyjdbqrp0hmsh0000gn/T/tmp3d_yq23a/galaxy-dev/tool-data/amrfinderplus-db/amrfinderplus_V3.12_2024-05-02.2
+amrfinderplus_V3.12_2024-01-31.1 V3.12-2024-01-31.1 3.12 /private/var/folders/7j/21czvpk170zcyjdbqrp0hmsh0000gn/T/tmp3d_yq23a/galaxy-dev/tool-data/amrfinderplus-db/amrfinderplus_V3.12_2024-01-31.1
b
diff -r 592ef3959907 -r a5921c09b7b7 tool-data/amrfinderplus.loc.sample
--- a/tool-data/amrfinderplus.loc.sample Sun Apr 16 08:29:18 2023 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,7 +0,0 @@
-# this is a tab separated file describing the location of amrfinderplus database
-#
-# the columns are:
-# value, name, path
-#
-# for example
-#amrfinderplus_V3.6_2020-03-20.1    V3.6-2020-03-20.1    amrfinderplus-db
b
diff -r 592ef3959907 -r a5921c09b7b7 tool-data/amrfinderplus_versioned.loc.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/amrfinderplus_versioned.loc.sample Thu May 30 13:06:37 2024 +0000
b
@@ -0,0 +1,7 @@
+# this is a tab separated file describing the location of amrfinderplus database
+#
+# the columns are:
+# value, name, db_version, path
+#
+# for example
+#amrfinderplus_V3.12_2024-05-02.2 V3.12-2024-05-02.2 3.12    amrfinderplus-db
b
diff -r 592ef3959907 -r a5921c09b7b7 tool_data_table_conf.xml.sample
--- a/tool_data_table_conf.xml.sample Sun Apr 16 08:29:18 2023 +0000
+++ b/tool_data_table_conf.xml.sample Thu May 30 13:06:37 2024 +0000
b
@@ -1,7 +1,7 @@
 <tables>
     <!-- Locations of amrfinderplus database in the required format -->
-    <table name="amrfinderplus_database" comment_char="#">
-        <columns>value, name, path</columns>
-        <file path="tool-data/amrfinderplus.loc" />
+    <table name="amrfinderplus_versioned_database" comment_char="#">
+        <columns>value, name, db_version, path</columns>
+        <file path="tool-data/amrfinderplus_versioned.loc" />
     </table>
 </tables>
\ No newline at end of file
b
diff -r 592ef3959907 -r a5921c09b7b7 tool_data_table_conf.xml.test
--- a/tool_data_table_conf.xml.test Sun Apr 16 08:29:18 2023 +0000
+++ b/tool_data_table_conf.xml.test Thu May 30 13:06:37 2024 +0000
b
@@ -1,7 +1,7 @@
 <tables>
     <!-- Locations of amrfinderplus database in the required format -->
-    <table name="amrfinderplus_database" comment_char="#">
-        <columns>value, name, path</columns>
-        <file path="${__HERE__}/test-data/amrfinderplus.loc.test"/>
+    <table name="amrfinderplus_versioned_database" comment_char="#">
+        <columns>value, name, db_version, path</columns>
+        <file path="${__HERE__}/test-data/amrfinderplus_versioned.loc.test"/>
     </table>
 </tables>