diff maxbin2.xml @ 2:6a638de7915c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/maxbin2/ commit 08beeabf7a8e91d0e95f5cdb71249dd6efe2bd46"
author iuc
date Tue, 29 Oct 2019 08:45:20 -0400
parents 864279a0d64b
children cfd50144a871
line wrap: on
line diff
--- a/maxbin2.xml	Tue Oct 16 10:28:16 2018 -0400
+++ b/maxbin2.xml	Tue Oct 29 08:45:20 2019 -0400
@@ -1,6 +1,10 @@
-<tool id="maxbin2" name="MaxBin2" version="2.2.4_galaxy1">
+<tool id="maxbin2" name="MaxBin2" version="@MAXBIN_VERSION@+galaxy1">
+    <description>clusters metagenomic contigs into bins</description>
+    <macros>
+        <token name="@MAXBIN_VERSION@">2.2.7</token>
+    </macros>
     <requirements>
-        <requirement type="package" version="2.2.4">maxbin2</requirement>
+        <requirement type="package" version="@MAXBIN_VERSION@">maxbin2</requirement>
     </requirements>
     <version_command><![CDATA[run_MaxBin.pl -version | head -n 1]]></version_command>
     <command detect_errors="exit_code"><![CDATA[
@@ -47,9 +51,11 @@
 
     && tar -xf out.marker_of_each_bin.tar.gz
 
-    ## redirect the idba out and err file content to stdout and err
+	## redirect the idba out and err file content to stdout and err
+	## since this is also wanted in case the error case ';' is used here to 
+	## separate commands
     #if $intype_cond.intype_select == 'rds' and $intype_cond.reassembly != ""
-        && echo "==== IDBA stdout ===="
+        ; echo "==== IDBA stdout ===="
         && cat out.idba.out
         && echo "==== IDBA stderr ====" 1>&2
         && cat out.idba.err 1>&2
@@ -63,11 +69,12 @@
                   <option value="abdc">Abundances</option>
               </param>
               <when value="rds">
-                  <param name="reads" argument="-read/-read2/..." type="data" format="fasta,fastq" multiple="true" label="Reads file(s)"/>
-                  <param argument="--reassembly" type="boolean" truevalue="-reassembly" falsevalue="" checked="false" label="" help="Reassembly option is still highly experimental. To use this function, you need to feed MaxBin interleaved paired-end fastq or fasta file." />
+                  <param name="reads" type="data" format="fasta,fastq" multiple="true" label="Reads file(s)" help="(-read/-read2/...)"/>
+                  <param name="output_abundances" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output abundances" help="" />
+                  <param argument="--reassembly" type="boolean" truevalue="-reassembly" falsevalue="" checked="false" label="Reassembly" help="Reassembly option is still highly experimental. To use this function, you need to feed MaxBin interleaved paired-end fastq or fasta file." />
               </when>
               <when value="abdc">
-                  <param name="abund" argument="-abund/-abund2/..." type="data" format="tabular" multiple="true" label="Abundance file(s)"/>
+                  <param name="abund" type="data" format="tabular" multiple="true" label="Abundance file(s)" help="(-abund/-abund2/...)" />
               </when>
           </conditional>
           <conditional name="adv_cond">
@@ -79,8 +86,11 @@
             <when value="yes">
                 <param argument="-min_contig_length" type="integer" min="0" value="1000" label="minimum contig length" />
                 <param argument="-max_iteration" type="integer" min="0" value="50" label="Maximum Expectation-Maximization algorithm iteration number" />
-                <param argument="-prob_threshold" type="float" min="0" max="1.0" value="0.9" label="Probability threshold for EM final classification" />
-                <param name="plotmarker" type="boolean" truevalue="-plotmarker" falsevalue="" checked="false" label="Generate visualization of the marker gene presence numbers" />
+                <param argument="-prob_threshold" type="float" min="0" max="1.0" value="0.5" label="Probability threshold for EM final classification" />
+                <param argument="-plotmarker" type="boolean" truevalue="-plotmarker" falsevalue="" checked="false" label="Generate visualization of the marker gene presence numbers" />
+                <param name="output_marker" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output marker gene presence for bins table" />
+                <param name="output_markers" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output marker genes for each bin as fasta" />
+                <param name="output_log" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output log" />
                 <param argument="-markerset" type="select" label="Marker gene set">
                     <option value="107" selected="true">107 marker genes present in >95% of bacteria</option>
                     <option value="40">40 marker gene sets that are universal among bacteria and archaea</option>
@@ -89,25 +99,34 @@
         </conditional>
     </inputs>
     <outputs>
+        <!-- default outputs -->
         <collection name="bins" type="list" label="${tool.name} on ${on_string} (bins)">
             <discover_datasets pattern="out.(?P&lt;designation&gt;[0-9]+).fasta" format="fasta" visible="false" />
         </collection>
+        <data name="noclass" format="fasta" label="${tool.name} on ${on_string} (unclassified sequences)" from_work_dir="out.noclass"/>
+        <data name="toshort" format="fasta" label="${tool.name} on ${on_string} (to short sequences)" from_work_dir="out.tooshort"/>
         <data name="summary" format="tabular" label="${tool.name} on ${on_string} (summary)" from_work_dir="out.summary"/>
-        <data name="log" format="txt" label="${tool.name} on ${on_string} (log)" from_work_dir="out.log"/>
+
+        <!-- optional outputs -->
+        <data name="log" format="txt" label="${tool.name} on ${on_string} (log)" from_work_dir="out.log">
+            <filter>adv_cond['adv_select']=='yes' and adv_cond['output_log']</filter>
+        </data>
+        <data name="marker" format="tabular" label="${tool.name} on ${on_string} (marker gene presence)" from_work_dir="out.marker">
+            <filter>adv_cond['adv_select']=='yes' and adv_cond['output_marker']</filter>
+        </data>
         <data name="abundout" format="tabular" label="${tool.name} on ${on_string} (abundances)" from_work_dir="out.abund1">
-            <filter>intype_cond['intype_select']=='rds'</filter>
+            <filter>intype_cond['intype_select']=='rds' and intype_cond['output_abundances']</filter>
         </data>
-        <data name="marker" format="tabular" label="${tool.name} on ${on_string} (marker gene presence)" from_work_dir="out.marker"/>
         <data name="plot" format="pdf" label="${tool.name} on ${on_string} (marker gene presence plot)" from_work_dir="out.marker.pdf">
             <filter>adv_cond['adv_select']=='yes' and adv_cond['plotmarker']</filter>
         </data>
-        <data name="noclass" format="fasta" label="${tool.name} on ${on_string} (unclassified sequences)" from_work_dir="out.noclass"/>
-        <data name="toshort" format="fasta" label="${tool.name} on ${on_string} (to short sequences)" from_work_dir="out.tooshort"/>
         <collection name="markers" type="list" label="${tool.name} on ${on_string} (markers prediced for bins)">
             <discover_datasets pattern="out.(?P&lt;designation&gt;[0-9]+).marker.fasta" format="fasta" visible="false" />
+            <filter>adv_cond['adv_select']=='yes' and adv_cond['output_markers']</filter>
         </collection>
+
         <!-- additional output in case of reassembly -->
-	<collection name="reassembly_bins" type="list" label="${tool.name} on ${on_string} (reassembly bins)">
+        <collection name="reassembly_bins" type="list" label="${tool.name} on ${on_string} (reassembly bins)">
             <discover_datasets directory="out.reassem" pattern="out.(?P&lt;designation&gt;[0-9]+).fasta" format="fasta" visible="false" />
             <filter>intype_cond['intype_select']=='rds' and intype_cond['reassembly']</filter>
         </collection>
@@ -123,11 +142,11 @@
         </data>
     </outputs>
     <tests>
-        <test><!-- test w contigs and reads as input -->
+        <test expect_num_outputs="4"><!-- test w contigs and reads as input -->
             <param name="contig" value="Bin_Sample3_contigs.fasta" ftype="fasta" />
             <conditional name="intype_cond">
                 <param name="intype_select" value="rds"/>
-                <param name="reads" value="interleavedPE_unmapped_Sample3_total.fasta" ftype="fasta"/>
+                <param name="reads" value="interleavedPE_unmapped_Sample3_small.fasta" ftype="fasta"/>
             </conditional>
             <conditional name="adv_cond">
                 <param name="adv_select" value="no"/>
@@ -137,16 +156,41 @@
                 <element name="002" file="1/out.002.fasta" ftype="fasta"/>
             </output_collection>
             <output name="summary" file="1/out.summary" ftype="tabular" />
-            <output name="log" file="1/out.log" ftype="txt" compare="diff" lines_diff="17" />
+            <output name="noclass" file="1/out.noclass" ftype="fasta" />
+            <output name="toshort" file="1/out.tooshort" ftype="fasta" />
+        </test>
+        <!-- test w contigs and reads as input test for optional outputs -->
+        <test expect_num_outputs="9">
+            <param name="contig" value="Bin_Sample3_contigs.fasta" ftype="fasta" />
+            <conditional name="intype_cond">
+                <param name="intype_select" value="rds"/>
+                <param name="reads" value="interleavedPE_unmapped_Sample3_small.fasta" ftype="fasta"/>
+                <param name="output_abundances" value="true" />
+            </conditional>
+            <conditional name="adv_cond">
+                <param name="adv_select" value="yes"/>
+                <param name="plotmarker" value="true" />
+                <param name="output_marker" value="true" />
+                <param name="output_markers" value="true" />
+                <param name="output_log" value="true" />
+            </conditional>
+            <output_collection name="bins" type="list" count="2">
+                <element name="001" file="1/out.001.fasta" ftype="fasta"/>
+                <element name="002" file="1/out.002.fasta" ftype="fasta"/>
+            </output_collection>
+            <output name="summary" file="1/out.summary" ftype="tabular" />
+            <output name="noclass" file="1/out.noclass" ftype="fasta" />
+            <output name="toshort" file="1/out.tooshort" ftype="fasta" />
+            <output name="log" file="1/out.log" ftype="txt" compare="diff" lines_diff="21" />
             <output name="abundout" file="1/out.abund1" ftype="tabular" />
             <output name="marker" file="1/out.marker" ftype="tabular" />
-            <output name="noclass" file="1/out.noclass" ftype="fasta" />
-            <output name="toshort" file="1/out.tooshort" ftype="fasta" />
+            <output name="plot" file="1/out.marker.pdf" ftype="pdf" compare="sim_size" />
             <output_collection name="markers" type="list" count="1">
                 <element name="001" file="1/out.001.marker.fasta" ftype="fasta"/>
             </output_collection>
         </test>
-        <test><!--test w contigs and abundances as input + advanced options -->
+        <!--test w contigs and abundances as input + advanced options -->
+        <test expect_num_outputs="5">
             <param name="contig" value="Bin_Sample3_contigs.fasta" ftype="fasta" />
             <conditional name="intype_cond">
                 <param name="intype_select" value="abdc"/>
@@ -165,20 +209,16 @@
                 <element name="002" file="2/out.002.fasta" ftype="fasta"/>
             </output_collection>
             <output name="summary" file="2/out.summary" ftype="tabular" />
-            <output name="log" file="2/out.log" ftype="txt" compare="diff" lines_diff="17" />
-            <output name="marker" file="2/out.marker" ftype="tabular" />
-            <output name="plot" file="2/out.marker.pdf" ftype="pdf" compare="sim_size" />
             <output name="noclass" file="2/out.noclass" ftype="fasta" />
             <output name="toshort" file="2/out.tooshort" ftype="fasta" />
-            <output_collection name="markers" type="list" count="1">
-                <element name="001" file="2/out.001.marker.fasta" ftype="fasta"/>
-            </output_collection>
+            <output name="plot" file="2/out.marker.pdf" ftype="pdf" compare="sim_size" />
         </test>
-        <test><!-- test w contigs and reads as input + reassembly-->
+        <!-- test w contigs and reads as input + reassembly-->
+        <test expect_num_outputs="8">
             <param name="contig" value="Bin_Sample3_contigs.fasta" ftype="fasta" />
             <conditional name="intype_cond">
                 <param name="intype_select" value="rds"/>
-                <param name="reads" value="interleavedPE_unmapped_Sample3_total.fasta" ftype="fasta"/>
+                <param name="reads" value="interleavedPE_unmapped_Sample3_small.fasta" ftype="fasta"/>
                 <param name="reassembly" value="-reassembly"/>
             </conditional>
             <conditional name="adv_cond">
@@ -189,14 +229,8 @@
                 <element name="002" file="3/out.002.fasta" ftype="fasta"/>
             </output_collection>
             <output name="summary" file="3/out.summary" ftype="tabular" />
-            <output name="log" file="3/out.log" ftype="txt" compare="diff" lines_diff="17" />
-            <output name="abundout" file="3/out.abund1" ftype="tabular" />
-            <output name="marker" file="3/out.marker" ftype="tabular" />
             <output name="noclass" file="3/out.noclass" ftype="fasta" />
             <output name="toshort" file="3/out.tooshort" ftype="fasta" />
-            <output_collection name="markers" type="list" count="1">
-                <element name="001" file="3/out.001.marker.fasta" ftype="fasta"/>
-            </output_collection>
             <output_collection name="reassembly_bins" type="list" count="2">
                 <element name="001" file="3/out.reassem/out.001.fasta" ftype="fasta"/>
                 <element name="002" file="3/out.reassem/out.002.fasta" ftype="fasta"/>
@@ -215,7 +249,6 @@
 nucleotide composition information and contig abundance information to do
 achieve binning through an Expectation-Maximization algorithm.
 
-
 **Input**:
 
 MaxBin need the contigs and contig abundance information. The contig abundance
@@ -258,15 +291,13 @@
 
 This is an experimental feature of MaxBin. It calls for each read bin IDBA_UD with the pre_correction parameter.  Of course this IDBA_UD call can be done also with the corresponding Galaxy tool
 
+
+** More information **
+
+https://downloads.jbei.org/data/microbial_communities/MaxBin/MaxBin.html
+
 ]]></help>
     <citations>
         <citation type="doi">10.1093/bioinformatics/btv638</citation>
-        <citation type="bibtex">
-@misc{renameTODO,
-  author = {LastTODO, FirstTODO},
-  year = {TODO},
-  title = {TODO},
-  url = {https://downloads.jbei.org/data/microbial_communities/MaxBin/MaxBin.html},
-}</citation>
     </citations>
 </tool>