diff wgmlst_export.xml @ 0:a3cc35af3635 draft

planemo upload for repository https://github.com/bvalot/pyMLST commit 13edfab02a5da9e374c38ecbd0e229ec0f8d53bb
author bvalot
date Thu, 16 Jun 2022 12:32:28 +0000
parents
children 5b2c48fa0175
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wgmlst_export.xml	Thu Jun 16 12:32:28 2022 +0000
@@ -0,0 +1,152 @@
+<tool id="wgmlst_export_wrapper" name="Export result of cg/wgMLST database" version="2.1.3">
+  <description></description>
+  <requirements>
+	<requirement type="package" version="2.1.3">pymlst</requirement>
+  </requirements>
+  <stdio>
+    <exit_code range="1:" level="fatal" />
+  </stdio>
+  <version_command>wgMLST -v</version_command>
+  <command>
+    wgMLST 
+	#if $export_result.export == "distance"
+	  distance
+	#end if
+	#if $export_result.export == "mlst"
+	  mlst
+	#end if
+	#if $export_result.export == "strain"
+	  strain
+	  #if $export_result.count
+	    -c
+	  #end if
+	#end if
+	#if $export_result.export == "gene"
+	  gene
+	#end if
+	#if str($mincover)
+      -m $mincover
+    #end if
+    #if $keep
+      -k
+    #end if
+    #if $inverse
+      -V
+    #end if
+    #if $duplicate
+      -d
+    #end if
+	'${database}'
+	> '${$output}'
+	#if $log
+	  2> '${logfile}'
+	#end if
+  </command>
+  <inputs>
+	<param name="database" type="data"
+           format="sqlite"
+           label="cg/wgMLST database"
+           help="Sqlite format from cg/wgMLST database" />
+	<conditional name="export_result">
+      <param name="export" type="select" label="Select the data export">
+		<option value="distance">Distance matrix between strains on the cg/wgMLST database</option>
+		<option value="mlst">cg/wgMLST table for each strain on the cg/wgMLST database</option>
+		<option value="strain">List of the strains on the cg/wgMLST database</option>
+		<option value="gene">List of the genes on the cg/wgMLST database</option>
+      </param>
+      <when value="strain">
+		<param name="count" type="boolean" checked="false"
+               label="Report the number of gene found for each strain" />
+      </when>
+	  <when value="distance" />
+	  <when value="mlst" />
+	  <when value="gene" />
+	</conditional>
+	<param name="mincover" type="integer" value="0"
+           optional="true"
+           label="Minimun number of strain found to keep a gene" />
+	<param name="keep" type="boolean" checked="false"
+           label="Keep only gene with different allele" help="Omit missing" />
+	<param name="duplicate" type="boolean" checked="false"
+           label="Conserve duplicate gene (default remove)" />
+	<param name="inverse" type="boolean" checked="false"
+           label="Keep only gene that not meet the filter of mincover or keep options" />
+	<param name="log" type="boolean" checked="false"
+           label="Write log file" />
+  </inputs>
+  <outputs>
+	<data name="output" format="txt" label="Extract ${export_result.export} on ${database.name}">
+      <change_format>
+        <when input="export_result.export" value="mlst" format="tabular" />
+        <when input="export_result.export" value="distance" format="txt" />
+        <when input="export_result.export" value="strain" format="tabular" />
+        <when input="export_result.export" value="gene" format="txt" />
+      </change_format>
+    </data>
+    <data name="logfile" format="txt" label="${export_result.export} of ${database.name}: log">
+	  <filter>log</filter>
+	</data>
+  </outputs>
+  <tests>
+	<test expect_num_outputs="1">
+      <param name="database" value="wgmlst_ecoli.db" />
+	  <conditional name="export_result">
+		<param name="export" value="distance" />
+	  </conditional>
+	  <param name="mincover" value="4" />
+      <output name="output" ftype="txt" file="wgmlst_ecoli.db.distance" />
+    </test>
+	<test expect_num_outputs="1">
+      <param name="database" value="wgmlst_ecoli.db" />
+	  <conditional name="export_result">
+		<param name="export" value="mlst" />
+	  </conditional>
+	  <param name="keep" value="true" />
+      <output name="output" ftype="tabular" file="wgmlst_ecoli.db.mlst" />
+	</test>
+	<test expect_num_outputs="2">
+      <param name="database" value="wgmlst_ecoli.db" />
+	  <conditional name="export_result">
+		<param name="export" value="strain" />
+		<param name="count" value="true" />
+	  </conditional>
+	  <param name="log" value="true" />
+      <output name="output" ftype="tabular" file="wgmlst_ecoli.db.strain" />
+	</test>
+	<test expect_num_outputs="1">
+      <param name="database" value="wgmlst_ecoli.db" />
+	  <conditional name="export_result">
+		<param name="export" value="gene" />
+	  </conditional>
+	  <param name="keep" value="true" />
+	  <param name="inverse" value="true" />	  
+      <output name="output" ftype="txt" file="wgmlst_ecoli.db.gene" />
+    </test>
+  </tests>
+  <help>
+**What it does**
+
+Extract element from a cg/wgMLST DATABASE:
+  - an distance matrix
+  - an MLST table
+  - a gene list
+  - an strains list
+
+Options:
+  -m, --mincover INTEGER  Minimun number of strain found to keep a gene
+                          (default:0)
+  -k, --keep              Keep only gene with different allele (omit missing).
+  -d, --duplicate         Conserve duplicate gene (default remove).
+  -V, --inverse           Keep only gene that do not meet the filter of
+                          mincover or keep options.
+
+  -c, --count             Count the number of gene present in the database for
+                          each strains.
+
+**License and citation**
+
+This Galaxy tool is Copyright © 2022 `B. Valot` and is released under the `GPL3 license`.
+  </help>
+  <citations>
+  </citations>
+</tool>