diff mykrobe_predict.xml @ 3:e8405163fb4e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mykrobe commit 2b9fb5d1f0ffb7ecd51561d3e325813c4f8e7f3e"
author iuc
date Tue, 10 Aug 2021 11:29:58 +0000
parents cedd631dc124
children a2e3ad69ee23
line wrap: on
line diff
--- a/mykrobe_predict.xml	Thu Jan 02 12:03:50 2020 -0500
+++ b/mykrobe_predict.xml	Tue Aug 10 11:29:58 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="mykrobe_predict" name="mkyrobe predict" version="0.7.0">
+<tool id="mykrobe_predict" name="mkyrobe predict" version="@TOOL_VERSION@">
   <description>Antibiotic resistance predictions</description>
   <macros>
     <import>macro.xml</import>
@@ -9,19 +9,9 @@
         @select_inputs@
 
         mykrobe predict 
-        '${name}'
-        ${select_species.species}
-
-        #if $select_species.panel == 'custom':
-          #if $adv.custom_probe:
-            --custom_probe_set_path '${adv.custom_probe}'
-          #end if
-          #if $adv.custom_variant_to_resistance:
-            --custom_variant_to_resistance_json '${adv.custom_variant_to_resistance}'
-          #end if
-        #elif $select_species.panel:
-          --panel '${select_species.panel}'
-        #end if
+        --sample '${name}'
+        --species ${select_species.species}
+        --panel '${select_species.panel}'
 
         #if $conf_percent_cutoff:
           --conf_percent_cutoff '${conf_percent_cutoff}'
@@ -36,12 +26,14 @@
         -q
         -t "\${GALAXY_SLOTS:-1}"
 
-        -1
-        #if $type == 'fastq':
-          *.fastq
-        #else
-          *.bam
-        #end if
+        --seq
+        #if $data_type.type == "single":
+          $data_type.seq1
+        #elif $data_type.type == "paired":
+	  $data_type.seq1 $data_type.seq2
+        #elif $data_type.type == "collection":
+          $data_type.collection1.forward $data_type.collection1.reverse
+	#end if
 
         --format '${format}'
 
@@ -54,25 +46,27 @@
       <param name="species" type="select" label="Specify Species for AMR">
         <option value="tb">Mycobacterium tuberculosis (tb)</option>
         <option value="staph">Staphylococcus aureus (staph)</option>
+        <option value="sonnei">Shigella sonnei (sonnei)</option>
       </param>
       <when value="staph">
-        <param name="panel" type="select" optional="true" label="Select panel for Staph only">
-          <option value="custom">Custom</option>
+        <param name="panel" type="select" label="Select panel for Staph only">
+          <option value="20170217">20170217</option>
         </param>
       </when>
       <when value="tb">
-        <param name="panel" type="select" label="Select panel for TB only">
+	<param name="panel" type="select" label="Select panel for TB only">
+          <option value="202010">202010</option>
           <option value="201901">201901</option>
           <option value="bradley-2015">Bradely 2015</option>
-          <option value="walker-2015">Walker 2015</option>
-          <option value="custom">Custom</option>
+        </param>
+      </when>
+      <when value="sonnei">
+        <param name="panel" type="select" label="Select panel for sonnei only">
+          <option value="20210201">20210201</option>
+          <option value="20201012">20201012</option>
         </param>
       </when>
     </conditional>
-    <section name="adv" title="Custom Panel" expanded="false">
-      <param name="custom_probe" type="data" format="fasta" label="Custom Probe" optional="True" help="Don't include filtered genotypes"/>
-      <param name="custom_variant_to_resistance" type="data" format="json" label="Custom Variant to Resistance" optional="True" help="JSON file with key,value pairs of variant names and induced drug resistance."/>
-    </section>
     <param argument="--min_depth" optional="True" type="integer" min="0" label="Minimum depth"  help=""/>
     <param argument="--conf_percent_cutoff" optional="True" type="integer" label="Confidence percent cutoff" help="Number between 0 and 100. Determines --min_variant_conf, by simulating variants and choosing the cutoff that would keep x% of the variants. Default is 90 if --ont, otherwise --min_variant_conf is used as the cutoff">
       <validator type="in_range" min="0" max="100" message="Confidence percent cutoff should be between 0 and 100" />
@@ -93,7 +87,7 @@
   <tests>
     <test>
       <param name="type" value="single"/>
-      <param name="fastq_input1" value="reads.fastq"/>
+      <param name="seq1" ftype="fastq" value="reads.fastq"/>
       <param name="species" value="tb"/>
       <param name="panel" value="bradley-2015"/>
       <param name="format" value="json"/>
@@ -103,6 +97,30 @@
         </assert_contents>
       </output>
     </test>
+    <test>
+      <param name="type" value="single"/>
+      <param name="seq1" ftype="fastq" value="reads.fastq"/>
+      <param name="species" value="sonnei"/>
+      <param name="panel" value="20201012"/>
+      <param name="format" value="json"/>
+      <output name="output">
+        <assert_contents>
+          <has_text_matching expression="susceptibility"/>
+        </assert_contents>
+      </output>
+    </test>
+    <test>
+      <param name="type" value="single"/>
+      <param name="seq1" ftype="fastq.gz" value="reads.fastq.gz"/>
+      <param name="species" value="sonnei"/>
+      <param name="panel" value="20201012"/>
+      <param name="format" value="json"/>
+      <output name="output">
+        <assert_contents>
+          <has_text_matching expression="susceptibility"/>
+        </assert_contents>
+      </output>
+    </test>
   </tests>
   <help>
     @ATTRIBUTION@