diff mykrobe_predict.xml @ 1:60ffb465aa4d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mykrobe commit 98633f779dfac95f55fbe30519f4e88da0bb9449
author iuc
date Tue, 02 Apr 2019 11:56:45 -0400
parents 33463c79e697
children cedd631dc124
line wrap: on
line diff
--- a/mykrobe_predict.xml	Sat Jan 13 09:02:31 2018 -0500
+++ b/mykrobe_predict.xml	Tue Apr 02 11:56:45 2019 -0400
@@ -1,4 +1,4 @@
-<tool id="mykrobe_predict" name="mkyrobe predict" version="0.5.6" >
+<tool id="mykrobe_predict" name="mkyrobe predict" version="0.6.1">
   <description>Antibiotic resistance predictions</description>
   <macros>
     <import>macro.xml</import>
@@ -6,56 +6,33 @@
   <expand macro="requirements"/>
   <command detect_errors="exit_code">
 <![CDATA[
-         @select_inputs@
+        @select_inputs@
 
-         mykrobe predict 
-         '$name'
-         $select_species.species
-
+        mykrobe predict 
+        '${name}'
+        ${select_species.species}
 
-        #if $select_species.species =='tb':
-          --panel $select_species.panel
-        #end if
-
-
-
-        #if $kmer:
-          --kmer $kmer
-        #end if
-
-        #if $min_variant_conf:
-          --min_variant_conf $min_variant_conf
+        #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
 
-
-        #if $expected_depth:
-          --expected_depth $expected_depth
-        #end if
-
-
-        #if $min_gene_conf:
-          --min_gene_conf $min_gene_conf
+        #if $conf_percent_cutoff:
+          --conf_percent_cutoff '${conf_percent_cutoff}'
         #end if
 
-
-
-        #if $min_gene_percent_covg_threshold:
-          --min_gene_percent_covg_threshold $min_gene_percent_covg_threshold
+        #if $min_depth:
+          --min_depth '${min_depth}'
         #end if
 
-
-        #if $min_depth:
-          --min_depth $min_depth
-        #end if
-
+        @shared_options@
 
-        #if $expected_error_rate:
-          --expected_error_rate $expected_error_rate
-        #end if
-
-        $report_all_calls
-
-        $ont
         -q
         -t "\${GALAXY_SLOTS:-1}"
 
@@ -65,37 +42,53 @@
         #else
           *.bam
         #end if
-         > $json
+
+        --format '${format}'
+
+        > '$output'
 ]]>
   </command>
   <inputs>
-    <expand macro="inputs" />
+    <expand macro="inputs"/>
     <conditional name="select_species">
       <param name="species" type="select" label="Specify Species for AMR">
         <option value="tb">Mycobacterium tuberculosis (tb)</option>
         <option value="staph">Staphylococcus aureus (staph)</option>
       </param>
-      <when value="staph"/>
+      <when value="staph">
+        <param name="panel" type="select" optional="true" label="Select panel for Staph only">
+          <option value="custom">Custom</option>
+        </param>
+      </when>
       <when value="tb">
         <param name="panel" type="select" label="Select panel for TB only">
+          <option value="201901">201901</option>
           <option value="bradley-2015">Bradely 2015</option>
-          <option value="walker-2015">Walker 2015</option>            
+          <option value="walker-2015">Walker 2015</option>
+          <option value="custom">Custom</option>
         </param>
       </when>
-    </conditional>      
-    <param name="kmer" argument="--kmer" optional="True" type="integer" min="0" label="Kmer length" value="21" help="default = 21"/>
-    <param name="expected_error_rate" argument="--expected_error_rate" optional="True" type="float" label="Expected Error Rate"  help="Expected sequencing error rate. Set to 0.15 for ONT genotyping"/>
-    <param name="expected_depth" argument="--expected_depth" optional="True" type="integer" min="0" label="Expected Depth"  help=""/>
-    <param name="min_depth" argument="--min_depth" optional="True" type="integer" min="0" label="Minimum Depth"  help=""/>
-    <param name="report_all_calls" argument="--report_all_calls"  type="boolean" truevalue="--report_all_calls" falsevalue="" label="report all calls"  help=""/>
-    <param name="ont" argument="--ont"  type="boolean" truevalue="--ont" falsevalue="" label="Set default for ONT data"  help=""/>
-    <param name="min_variant_conf" argument="--min_variant_conf" optional="True" type="integer" min="0" label="Minimum genotype confidence for variant genotyping"  help=""/>      
-    <param name="min_gene_conf" argument="--min_gene_conf" optional="True" type="integer" min="0" label="minimum genotype confidence for gene genotyping"  help=""/>
-    <param name="min_gene_percent_covg_threshold" argument="--min_gene_percent_covg_threshold" optional="True" type="integer" min="0" label="Minimum Gene predict coverage"  help="all genes alleles found above this percent coverage will be reported (default 100 (only best allelesreported))"/>      
+    </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" />
+    </param>
+    <expand macro="options"/>
+    <param argument="--format" type="select" label="Select the prefered output format">
+      <option value="csv" >csv</option>
+      <option value="json">json</option>
+    </param>
   </inputs>
-
   <outputs>
-    <data name="json" format="json" label="JSON prediction"/>
+    <data name="output" format="csv" label="prediction">
+      <change_format>
+        <when input="format" value="json" format="json"/>
+      </change_format>
+    </data>
   </outputs>
   <tests>
     <test>
@@ -103,9 +96,10 @@
       <param name="fastq_input1" value="reads.fastq"/>
       <param name="species" value="tb"/>
       <param name="panel" value="bradley-2015"/>
-      <output name="json">
+      <param name="format" value="json"/>
+      <output name="output">
         <assert_contents>
-          <has_text_matching expression="variant_calls"/>
+          <has_text_matching expression="susceptibility"/>
         </assert_contents>
       </output>
     </test>