changeset 0:863ba94fb6e4 draft

planemo upload for repository https://github.com/Helmholtz-UFZ/ufz-galaxy-tools/blob/main/data_managers/data_manager_virsorter commit fdde667342e69dd11ef98029e0d6d3376d0d95c7
author ufz
date Sun, 23 Jun 2024 16:48:31 +0000
parents
children ad63dbb3493a
files data_manager/virsorter_datamanager.xml data_manager_conf.xml tool-data/virsorter.loc.sample tool_data_table_conf.xml.sample
diffstat 4 files changed, 90 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/virsorter_datamanager.xml	Sun Jun 23 16:48:31 2024 +0000
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<tool id="virsorter_build_database" name="virsorter" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>database builder</description>
+    <macros>
+        <token name="@TOOL_VERSION@">2.2.4</token>  <!-- when updating make sure to double check the db version -->
+        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@PROFILE@">22.01</token>
+        <!-- zenodo ID and therebut the version of the reference data is hardcoded in the current version virsorter:
+             https://github.com/jiarong/VirSorter2/blob/c0dcac53f3373244bf1bd552a7c2104d53802df7/virsorter/rules/setup.smk#L13 
+             check and update the DB version when updating the VS version 
+             might also change/improve in the future https://github.com/jiarong/VirSorter2/issues/205#issuecomment-2184184977
+             -->
+        <token name="@VIRSORTER_DB_VERSION@">0.4</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">virsorter</requirement>
+        <requirement type="package" version="1.21.4">wget</requirement>
+        <requirement type="package" version="2.7.0">pulp</requirement> <!-- needs to be pinned, because the old-ish snakemake used in vs2 struggles with https://github.com/snakemake/snakemake/issues/2607 -->
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        virsorter setup -d db -j \${GALAXY_SLOTS:-1} --skip-deps-install &&
+        cp '$dmjson' '$out_file'
+    ]]></command>
+    <configfiles>
+        <configfile name="dmjson"><![CDATA[
+{
+  "data_tables":{
+    "virsorter":[
+      {
+        "path":"db",
+        "name":"Version @VIRSORTER_DB_VERSION@",
+        "virsorter_version":"@TOOL_VERSION@",
+        "value":"@VIRSORTER_DB_VERSION@"
+      }
+    ]
+  }
+}]]>
+        </configfile>
+    </configfiles>
+    <inputs/>
+    <outputs>
+        <data name="out_file" format="data_manager_json" />
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <output name="out_file">
+                <assert_contents>
+                    <has_text text='"value":"@VIRSORTER_DB_VERSION@"'/>
+                    <has_text text='"name":"Version @VIRSORTER_DB_VERSION@"'/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+Download and extract virsorter database version @VIRSORTER_DB_VERSION@ from zenodo (https://zenodo.org/records/10594875)
+    ]]></help>
+    <citations>
+        <citation type="doi">10.1186/s40168-020-00990-y</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager_conf.xml	Sun Jun 23 16:48:31 2024 +0000
@@ -0,0 +1,19 @@
+<data_managers>
+    <data_manager tool_file="data_manager/virsorter_datamanager.xml" id="virsorter_build_database">
+        <data_table name="virsorter">
+            <output>
+                <column name="value"/>
+                <column name="name"/>
+                <column name="virsorter_version"/>
+                <column name="path" output_ref="out_file">
+                    <move type="directory">
+                        <source>${path}</source>
+                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">virsorter/${path}</target>
+                    </move>
+                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/virsorter/${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/virsorter.loc.sample	Sun Jun 23 16:48:31 2024 +0000
@@ -0,0 +1,3 @@
+# Format:
+# value	name	virsorter_version	path
+# value must be the version of the database, e.g. 0.4, 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	Sun Jun 23 16:48:31 2024 +0000
@@ -0,0 +1,8 @@
+<tables>
+    <!-- virsorter reference data  -->
+    <table name="virsorter" comment_char="#">
+        <!-- value should be the version (https://zenodo.org/records/4297575)  -->
+        <columns>value, name, virsorter_version, path</columns>
+        <file path="tool-data/virsorter.loc" />
+    </table>
+</tables>
\ No newline at end of file