diff DownloadSchema.xml @ 0:18d7d8582206 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chewbbaca commit 8722918e903ffa4229e0297555731f1172f736c6
author iuc
date Sat, 13 Apr 2024 16:10:11 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DownloadSchema.xml	Sat Apr 13 16:10:11 2024 +0000
@@ -0,0 +1,83 @@
+<tool id="chewbbaca_downloadschema" name="chewBBACA DownloadSchema" version="@CHEW_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>Download a schema from Chewie-NS</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        chewBBACA.py DownloadSchema
+            -sp $species_id 
+            -sc $schema_id
+            -o 'output' &&
+        ## The output is named based on the species name. Rename it to schema_seed so it is compatible for other chewbbaca tools.
+        mv output/* 'schema_seed' &&
+        zip -r schema_seed.zip 'schema_seed'
+    ]]></command>
+    <inputs>
+        <param argument="--species-id" type="select" label="Species ID">
+            <option value="1">Streptococcus pyogenes</option>
+            <option value="2">Acinetobacter baumannii</option>
+            <option value="3">Arcobacter butzleri</option>
+            <option value="4">Campylobacter jejuni</option>
+            <option value="5">Escherichia coli</option>
+            <option value="6">Listeria monocytogenes</option>
+            <option value="7">Yersinia enterocolitica</option>
+            <option value="8">Salmonella enterica</option>
+            <option value="9">Streptococcus agalactiae</option>
+            <option value="10">Brucella melitensis</option>
+            <option value="11">Brucella</option>
+            <option value="12">Clostridium perfringens</option>
+            <option value="13">Clostridium chauvoei</option>
+            <option value="14">Bacillus anthracis</option>
+            <option value="15">Klebsiella oxytoca</option>
+            <option value="16">Clostridium neonatale</option>
+        </param>
+        <!-- Currently,the schema id can only be set to 1. Maybe in the next versions other values possible -->
+        <param argument="--schema-id" type="integer" min="1" value="1" label="Schema ID"/>
+    </inputs>
+    <outputs>
+        <data format="zip" name="schema" from_work_dir="schema_seed.zip" label="${tool.name} Schema files"/>
+    </outputs>
+    <tests>
+        <test expect_exit_code="0">
+            <param name="species_id" value="13"/>
+            <param name="schema_id" value="1"/>
+            <assert_stdout>
+                <has_text text="Schema is now available at"/>
+                <has_text text="Finished at"/>
+            </assert_stdout>
+            <output name="schema">
+                <assert_contents>
+                    <has_archive_member path="schema_seed/.*\.fasta" n="4446"/>
+                    <has_archive_member path="schema_seed/short/.*\.fasta" n="2223"/>
+                    <has_archive_member path="schema_seed/\.ns_config"/>
+                    <has_archive_member path="schema_seed/\.schema_config"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help>
+        
+chewBBACA is a software suite for the creation and evaluation of core genome and whole genome MultiLocus Sequence Typing (cg/wgMLST) schemas and results.
+
+The DownloadSchema module enables the download of schemas from the Chewie-NS server.
+
+
+.. class:: infomark 
+
+**Note**
+
+The output schema files are in a zip file. This file can be used as input for other chewBBACA tools.
+
+-----
+
+Compressed versions of every schema in the Chewie-NS are also available for download:
+ - through the `Chewie-NS public website`_
+ - through the (/species/{species_id}/schemas/{schema_id}/zip) API endpoint in Swagger_
+ - with a simple curl command (e.g.: curl -X GET "https://chewbbaca.online/NS/api/species/9/schemas/1/zip?request_type=download" -H  "accept: application/json")
+
+.. _Chewie-NS public website: https://chewbbaca.online/
+.. _Swagger: https://chewbbaca.online/api/NS/api/docs
+    </help>
+    <expand macro="citations" />
+</tool>
\ No newline at end of file