changeset 0:641ac96ab63a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_groot_database_downloader commit d98a90741c13f19c9eb78df37d142f8f73f20211
author iuc
date Thu, 17 Oct 2024 14:20:17 +0000
parents
children
files data_manager/data_manager_groot_database_downloader.xml data_manager_conf.xml test-data/groot_database.loc tool-data/groot_database.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 6 files changed, 109 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/data_manager_groot_database_downloader.xml	Thu Oct 17 14:20:17 2024 +0000
@@ -0,0 +1,71 @@
+<tool id="groot_database_downloader" name="Groot get" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description> Download pre-clustered ARG database that are ready to be indexed</description>
+    <macros>
+        <token name="@TOOL_VERSION@">1.1.2</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@PROFILE@">22.05</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="3.12">python</requirement>
+        <requirement type="package" version="2024.6.2">ca-certificates</requirement>
+        <requirement type="package" version="@TOOL_VERSION@">groot</requirement>
+    </requirements>
+    <command><![CDATA[
+        if [ -f '/usr/local/ssl/cacert.pem' ] ; then export SSL_CERT_FILE='/usr/local/ssl/cacert.pem' ; fi &&
+        groot get -d '$database' --identity '$identity' &&
+        cp '$dmjson' '$out_file'
+    ]]></command>
+    <configfiles>
+        <configfile name="dmjson"><![CDATA[
+#from datetime import date
+{
+  "data_tables":{
+    "groot_database":[
+      {
+        "value": "$database.$identity-@TOOL_VERSION@-#echo date.today().strftime('%d%m%Y')#",
+        "name": "$database ($identity percent identity)",
+        "path": "/$database.$identity",
+        "version": "@TOOL_VERSION@"
+      }
+    ]
+  }
+}]]>
+        </configfile>
+    </configfiles>
+    <inputs>
+        <param name="database" type="select" label="Database name">
+            <option value="arg-annot" selected="true">ARG-annot</option>
+            <option value="resfinder">Resfinder</option>
+            <option value="card">CARD</option>
+            <option value="groot-db">Groot-db (combine sequences in ARG-annot, Resfinder and CARD)</option>
+            <option value="groot-core-db">Groot-core-db (same as groot-db but one copy of each sequence is kept and then this collection is clustered at given percentage identity)</option>
+         </param>
+         <param name="identity" type="select" label="Percent Identity">
+            <option value="90" selected="true">90% identity</option>
+         </param>
+    </inputs>
+    <outputs>
+        <data name="out_file" format="data_manager_json" label="${tool.name}"/>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="database" value="arg-annot"/>
+            <param name="identity" value="90"/>
+            <output name="out_file">
+                <assert_contents>
+                    <has_text text='"groot_database":'/>
+                    <has_text text='"version": "1.1.2"'/>
+                    <has_text_matching expression='"value": "arg-annot.90-1.1.2-[0-9]{8}"'/>
+                    <has_text text='"name": "arg-annot (90 percent identity)"'/>
+                    <has_text text='"path": "/arg-annot.90"'/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+The groot get subcommand is used to download a pre-clustered ARG database that is ready to be indexed.
+]]></help>
+    <citations>
+        <citation type="doi">10.5281/zenodo.1217889</citation>
+    </citations>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager_conf.xml	Thu Oct 17 14:20:17 2024 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<data_managers>
+    <data_manager tool_file="data_manager/data_manager_groot_database_downloader.xml" id="groot_database_downloader">
+        <data_table name="groot_database">
+            <output>
+                <column name="value"/>  <!-- columns that are going to be specified by the Data Manager Tool -->
+                <column name="name"/>  <!-- columns that are going to be specified by the Data Manager Tool -->
+                <column name="path" output_ref="out_file">
+                    <move type="directory">
+                        <source>${path}</source>
+                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">groot_database/data/${value}</target>
+                    </move>
+                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/groot_database/data/${value}</value_translation>
+                    <value_translation type="function">abspath</value_translation>
+                </column>
+                <column name="version"/> <!-- columns that are going to be specified by the Data Manager Tool -->
+            </output>
+        </data_table>
+    </data_manager>
+</data_managers>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/groot_database.loc	Thu Oct 17 14:20:17 2024 +0000
@@ -0,0 +1,2 @@
+arg-annot.90-16102024	arg-annot (90 percent identity)	/tmp/tmpjmmj2x3o/galaxy-dev/tool-data/groot_database/data/arg-annot.90-16102024	1.1.2
+arg-annot.90-1.1.2-16102024	arg-annot (90 percent identity)	/tmp/tmpqdkgcsoq/galaxy-dev/tool-data/groot_database/data/arg-annot.90-1.1.2-16102024	1.1.2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/groot_database.loc.sample	Thu Oct 17 14:20:17 2024 +0000
@@ -0,0 +1,3 @@
+#This is a sample file distributed with Galaxy that enables tools
+#file has this format (white space characters are TAB characters)
+#resfinder.90-v1.1.2	resfinder (90 percent identity)	300524-v1.1.2	${__HERE__}/resfinder.90    1.1.2
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Thu Oct 17 14:20:17 2024 +0000
@@ -0,0 +1,6 @@
+<tables>
+    <table name="groot_database" comment_char="#">
+        <columns>value, name, path, version</columns>
+        <file path="tool-data/groot_database.loc"/>
+    </table>
+</tables>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test	Thu Oct 17 14:20:17 2024 +0000
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<tables>
+    <table name="groot_database" comment_char="#">
+        <columns>value, name, path, version</columns>
+        <file path="${__HERE__}/test-data/groot_database.loc" />
+    </table>
+</tables>