changeset 0:a3ef2075f00e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/data_managers/data_manager_dfast commit ceec7eb1afdcdebbbc145e7fe9fa5a38dafcd9b0
author ufz
date Wed, 16 Apr 2025 10:58:35 +0000
parents
children 23aec9361162
files data_manager/dfast.xml data_manager_conf.xml test-data/dfast.loc tool-data/dfast.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 6 files changed, 91 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/dfast.xml	Wed Apr 16 10:58:35 2025 +0000
@@ -0,0 +1,56 @@
+<tool id="data_manager_dfast" name="DFAST data manager" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" tool_type="manage_data" profile="20.01">
+    <macros>
+        <token name="@TOOL_VERSION@">1.3.6</token>
+        <token name="@VERSION_SUFFIX@">0</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">dfast</requirement>
+    </requirements>
+    <version_command>dfast --version | cut -d" " -f3</version_command>
+    <command detect_errors="exit_code"><![CDATA[
+        mkdir '$output_file.extra_files_path' &&
+        wget https://dfast.annotation.jp/dfast_core_db.tar.gz &&
+        tar -xvf dfast_core_db.tar.gz &&
+        mv db/* '$output_file.extra_files_path'/ &&
+        cp '$dmjson' '$output_file'
+    ]]></command>
+    <configfiles>
+        <configfile name="dmjson"><![CDATA[
+#from datetime import datetime
+#set version_id=datetime.now().strftime("%Y-%m-%d-%H%M%S")
+    {
+      "data_tables":{
+        "dfast":[
+          {
+            "value":"$version_id",
+            "description":"DFAST DB from $version_id",
+            "version":"$version_id",
+            "path":"$output_file.extra_files_path"
+          }
+        ]
+      }
+    }]]></configfile>
+    </configfiles>
+    <inputs>
+        <param name="wget" type="boolean" truevalue="--wget" falsevalue="" checked="False" label="Download using wget" help="Try this if you get certificate errors"/>
+    </inputs>
+    <outputs>
+        <data name="output_file" format="data_manager_json"/>
+    </outputs>
+    <tests>
+        <test>
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="DFAST DB"/>
+                    <has_text text="dfast"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        This data managers fetches DFAST reference data from https://dfast.annotation.jp/
+    ]]></help>
+    <citations>
+        <citation type="doi">10.5281/zenodo.4054262</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager_conf.xml	Wed Apr 16 10:58:35 2025 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<data_managers>
+    <data_manager tool_file="data_manager/dfast.xml" id="data_manager_dfast">
+        <data_table name="dfast">
+            <output>
+                <column name="value" />
+                <column name="name" />
+                <column name="version" />
+                <column name="path" output_ref="output_file" >
+                    <move type="directory" relativize_symlinks="True">
+                        <target base="${GALAXY_DATA_MANAGER_DATA_PATH}">dfast/${value}</target>
+                    </move>
+                    <value_translation>${GALAXY_DATA_MANAGER_DATA_PATH}/dfast/${value}</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/test-data/dfast.loc	Wed Apr 16 10:58:35 2025 +0000
@@ -0,0 +1,1 @@
+2025-03-27-191218		2025-03-27-191218	/tmp/tmpp4k5wsv_/galaxy-dev/tool-data/dfast/2025-03-27-191218
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/dfast.loc.sample	Wed Apr 16 10:58:35 2025 +0000
@@ -0,0 +1,3 @@
+# Format:
+# value	name	version	path
+# downloaded from https://dfast.annotation.jp/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Wed Apr 16 10:58:35 2025 +0000
@@ -0,0 +1,6 @@
+<tables>
+    <table name="dfast" comment_char="#" allow_duplicate_entries="False">
+        <columns>value, name, version, path</columns>
+        <file path="tool-data/dfast.loc" />
+    </table>
+</tables>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test	Wed Apr 16 10:58:35 2025 +0000
@@ -0,0 +1,6 @@
+<tables>
+    <table name="dfast" comment_char="#" allow_duplicate_entries="False">
+        <columns>value, name, version, path</columns>
+        <file path="${__HERE__}/test-data/dfast.loc" />
+    </table>
+</tables>