changeset 0:c4ec3d81eeee draft

planemo upload for repository https://github.com/Helmholtz-UFZ/ufz-galaxy-tools/blob/main/data_managers/data_manager_genomad commit 483ade5362574a59ddc87e3788334bcbff253805
author ufz
date Tue, 18 Jun 2024 14:28:27 +0000
parents
children 03623fc64d5c
files data_manager/genomad_datamanager.xml data_manager_conf.xml tool-data/genomad.loc.sample tool_data_table_conf.xml.sample
diffstat 4 files changed, 92 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/genomad_datamanager.xml	Tue Jun 18 14:28:27 2024 +0000
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<tool id="genomad_build_database" name="geNomad" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>database builder</description>
+    <macros>
+        <token name="@TOOL_VERSION@">1.8.0</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@PROFILE@">22.01</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="1.21.4">wget</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        set -eo pipefail; 
+        wget -O - 
+            ## #if $version == "test"
+            ##     https://zenodo.org/records/11945948/files/genomad_microdb.tar.gz?download=1
+            ## #else
+                https://zenodo.org/records/10594875/files/genomad_db_v${version}.tar.gz?download=1
+            ## #end if
+        | tar -xzv &&
+        cp '$dmjson' '$out_file'
+    ]]></command>
+    <configfiles>
+        <configfile name="dmjson"><![CDATA[
+{
+  "data_tables":{
+    "genomad":[
+      {
+        "path":"genomad_db",
+        "name":"Version $version",
+        "value":"$version"
+      }
+    ]
+  }
+}]]>
+        </configfile>
+    </configfiles>
+    <inputs>
+        <param name="version" type="select" multiple="false" label="Database Version" help="Download the chosen version from https://zenodo.org/records/10594875">
+            <option value="1.7">1.7</option>
+            <!-- <option value="test">test</option> -->
+        </param>
+    </inputs>
+    <outputs>
+        <data name="out_file" format="data_manager_json" />
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="version" value="1.7" />
+            <output name="out_file">
+                <assert_contents>
+                    <has_text text='"value":"1.7"'/>
+                    <has_text text='"name":"Version 1.7"'/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+Download and extract geNomad database from https://zenodo.org/records/10594875
+    ]]></help>
+    <citations>
+        <citation type="doi">10.1186/gb-2014-15-3-r46</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager_conf.xml	Tue Jun 18 14:28:27 2024 +0000
@@ -0,0 +1,18 @@
+<data_managers>
+    <data_manager tool_file="data_manager/genomad_datamanager.xml" id="genomad_build_database">
+        <data_table name="genomad">
+            <output>
+                <column name="value"/>
+                <column name="name"/>
+                <column name="path" output_ref="out_file">
+                    <move type="directory">
+                        <source>${path}</source>
+                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">genomad_databases/${path}</target>
+                    </move>
+                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/genomad_databases/${path}</value_translation>
+                    <value_translation type="function">abspath</value_translation>
+                </column>
+            </output>
+        </data_table>
+    </data_manager>
+</data_managers>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/genomad.loc.sample	Tue Jun 18 14:28:27 2024 +0000
@@ -0,0 +1,3 @@
+# Format:
+# value	name	path
+# value must be the version of the database, e.g. 1.7, needs to be a number
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Tue Jun 18 14:28:27 2024 +0000
@@ -0,0 +1,7 @@
+<tables>
+    <!-- genomad reference data  -->
+    <table name="genomad" comment_char="#">
+        <columns>value, name, path</columns>
+        <file path="tool-data/genomad.loc" />
+    </table>
+</tables>