changeset 2:99ff9221182c draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/semibin commit 13abac83068b126399ec415141007a48c2efaa84
author iuc
date Fri, 10 Nov 2023 20:50:01 +0000
parents 6b517dc161e4
children
files macros.xml semibin.xml
diffstat 2 files changed, 65 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Mon Mar 27 08:25:14 2023 +0000
+++ b/macros.xml	Fri Nov 10 20:50:01 2023 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <macros>
-    <token name="@TOOL_VERSION@">1.5.1</token>
+    <token name="@TOOL_VERSION@">2.0.2</token>
     <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">21.01</token>
     <xml name="biotools">
@@ -15,7 +15,7 @@
         </requirements>
     </xml>
     <xml name="version">
-        <version_command>SemiBin -v</version_command>
+        <version_command>SemiBin2 -v</version_command>
     </xml>
     <xml name="mode_fasta_bam">
         <conditional name="mode">
@@ -109,10 +109,11 @@
             #end if
         #end for
 #set $separator = ':'
-SemiBin concatenate_fasta
+SemiBin2 concatenate_fasta
     --input-fasta *.fasta
     --output 'output'
     --separator '$separator'
+    --compression none
     -m $mode.multi_fasta.min_len
 &&
 ln -s 'output/concatenated.fa' 'contigs.fasta' &&
@@ -222,7 +223,8 @@
     </xml>
     <xml name="orf-finder">
         <param argument="--orf-finder" type="select" label="ORF finder used to estimate the number of bins">
-            <option value="prodigal" selected="true">Prodigal</option>
+            <option value="fast-naive" selected="true">Fast-Naive</option>
+            <option value="prodigal">Prodigal</option>
             <option value="fraggenescan">Fraggenescan</option>
         </param>
     </xml>
@@ -251,8 +253,8 @@
     <xml name="minfasta-kbs">
         <param argument="--minfasta-kbs" type="integer" min="0" value="200" label="Miminimum bin size in Kbps"/>
     </xml>
-    <xml name="no-recluster">
-        <param argument="--no-recluster" type="boolean" truevalue="--no-recluster" falsevalue="" checked="false" label="Do not recluster bins?"/>
+    <xml name="write_pre_reclustering_bins">
+        <param argument="--write-pre-reclustering-bins" type="boolean" truevalue="--write-pre-reclustering-bins" falsevalue="" checked="false" label="Return also the pre reclustered bins?"/>
     </xml>
     <xml name="data">
         <param argument="--data" type="data" format="csv" label="Train data"/>
@@ -310,6 +312,7 @@
             <filter>mode["select"]=="multi" and extra_output and "contigs" in extra_output</filter>
             <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/samples/" />
         </collection>
+        
     </xml>
     <xml name="train_output">
         <data name="model" format="h5" from_work_dir="output/model.h5" label="${tool.name} on ${on_string}: Semi-supervised deep learning model" />
--- a/semibin.xml	Mon Mar 27 08:25:14 2023 +0000
+++ b/semibin.xml	Fri Nov 10 20:50:01 2023 +0000
@@ -12,8 +12,7 @@
 #import re
 @BAM_FILES@
 @FASTA_FILES@
-
-SemiBin
+SemiBin2
 #if $mode.select == 'single' or $mode.select == 'co'
     single_easy_bin
     #if $mode.select == 'single' and str($mode.environment) != ''
@@ -52,7 +51,10 @@
     --max-node $bin.max_node
     --max-edges $bin.max_edges
     --minfasta-kbs $bin.minfasta_kbs
-    $bin.no_recluster
+#if ($mode.select == 'single' or $mode.select == 'co') and "pre_reclustering_bins" in $extra_output
+    --write-pre-reclustering-bins
+#end if
+    --compression none
     --threads \${GALAXY_SLOTS:-1}
     --processes \${GALAXY_SLOTS:-1}
 && 
@@ -93,26 +95,30 @@
             <expand macro="max-node"/>
             <expand macro="max-edges"/>
             <expand macro="minfasta-kbs"/>
-            <expand macro="no-recluster"/>
         </section>
         <param name="extra_output" type="select" multiple="true" optional="true" label="Extra outputs" help="In addition to the training data">
             <option value="data">Training data</option>
             <option value="coverage">Coverage files</option>
             <option value="contigs">Contigs (if multiple sample)</option>
+            <option value="pre_reclustering_bins">Pre-reclustering bins (only single sample and co-assembly)</option>
         </param>
     </inputs>
     <outputs>
-        <collection name="output_recluster_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins after reclustering">
-            <filter>not bin["no_recluster"]</filter>
-            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_recluster_bins" />
+        <collection name="output_pre_recluster_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins before reclustering">
+            <filter>mode["select"]!="multi" and extra_output and "pre_reclustering_bins" in extra_output</filter>
+            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_prerecluster_bins"/>
         </collection>
-        <collection name="output_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins before reclustering">
-            <filter>mode["select"]!="multi"</filter>
-            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_bins" />
+        <collection name="output_after_recluster_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins after reclustering">
+            <filter>mode["select"]!="multi" and extra_output and "pre_reclustering_bins" in extra_output</filter>
+            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_recluster_bins"/>
+        </collection>
+        <collection name="output_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins">
+            <filter>mode["select"]!="multi" and not "pre_reclustering_bins" in extra_output</filter>
+            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/output_bins"/>
         </collection>
         <collection name="multi_bins" type="list" label="${tool.name} on ${on_string}: Reconstructed bins before reclustering (multi_bins)">
             <filter>mode["select"]=="multi"</filter>
-            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/bins" />
+            <discover_datasets pattern="(?P&lt;designation&gt;.*).fa" format="fasta" directory="output/bins"/>
         </collection>
         <data name="single_data" format="csv" from_work_dir="output/data.csv" label="${tool.name} on ${on_string}: Training data">
             <filter>(mode["select"]=="single" or mode["select"]=="co") and extra_output and "data" in extra_output</filter>
@@ -131,7 +137,7 @@
         <expand macro="generate_sequence_features_extra_outputs"/>
     </outputs>
     <tests>
-        <test expect_num_outputs="6">
+        <test expect_num_outputs="5">
             <conditional name="mode">
                 <param name="select" value="single"/>
                 <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
@@ -158,49 +164,10 @@
             <section name="bin">
                 <param name="max_node" value="1"/>
                 <param name="max_edges" value="200"/>
-                <param name="minfasta_kbs" value="2"/>
-                <param name="no_recluster" value="false"/>
+                <param name="minfasta_kbs" value="200"/>
             </section>
             <param name="extra_output" value="data,coverage,contigs"/>
-            <output_collection name="output_recluster_bins" count="39">
-            	<element name="0" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_0"/>
-                    </assert_contents>
-                </element>
-                <element name="1" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_1"/>
-                    </assert_contents>
-                </element>
-                <element name="2" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_2"/>
-                    </assert_contents>
-                </element>
-                <element name="39" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g3k_9"/>
-                    </assert_contents>
-                </element>
-            </output_collection>
-            <output_collection name="output_bins" count="0">
-                <!--<element name="0" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_0"/>
-                    </assert_contents>
-                </element>
-                <element name="1" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g2k_0"/>
-                    </assert_contents>
-                </element>
-                <element name="2" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g3k_0"/>
-                    </assert_contents>
-                </element>-->
-            </output_collection>
+            <output_collection name="output_bins" count="0"/>
             <output name="single_data" ftype="csv">
                 <assert_contents>
                     <has_text text="g1k_0"/>
@@ -239,7 +206,7 @@
                 <param name="method" value="ratio"/>
                 <param name="ratio" value="0.05"/>
             </conditional>
-            <param name="orf_finder" value="fraggenescan"/>
+            <param name="orf_finder" value="fast-naive"/>
             <param name="random-seed" value="0"/>
             <section name="annot">
                 <param name="ml_threshold" value=""/>
@@ -252,26 +219,9 @@
                 <param name="max_node" value="1"/>
                 <param name="max_edges" value="200"/>
                 <param name="minfasta_kbs" value="200"/>
-                <param name="no_recluster" value="true"/>
             </section>
             <param name="extra_output" value="coverage"/>
-            <output_collection name="output_bins" count="3">
-                <element name="0" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_0"/>
-                    </assert_contents>
-                </element>
-                <element name="1" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g2k_0"/>
-                    </assert_contents>
-                </element>
-                <element name="2" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g3k_0"/>
-                    </assert_contents>
-                </element>
-            </output_collection>
+            <output_collection name="output_bins" count="0"/>
             <output_collection name="co_cov" count="5">
                 <element name="0" ftype="csv">
                     <assert_contents>
@@ -313,7 +263,7 @@
                 </element>
             </output_collection>
         </test>
-        <test expect_num_outputs="4">
+        <test expect_num_outputs="3">
             <conditional name="mode">
                 <param name="select" value="co"/>
                 <param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
@@ -340,16 +290,9 @@
                 <param name="max_node" value="1"/>
                 <param name="max_edges" value="200"/>
                 <param name="minfasta_kbs" value="200"/>
-                <param name="no_recluster" value="false"/>
             </section>
             <param name="extra_output" value="coverage"/>
-            <output_collection name="output_recluster_bins" count="1">
-                <element name="30" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g3k_0"/>
-                    </assert_contents>
-                </element>
-            </output_collection>
+            <output_collection name="output_bins" count="0"/>
             <output_collection name="co_cov" count="5">
                 <element name="0" ftype="csv">
                     <assert_contents>
@@ -418,13 +361,12 @@
                 <param name="max_node" value="1"/>
                 <param name="max_edges" value="200"/>
                 <param name="minfasta_kbs" value="200"/>
-                <param name="no_recluster" value="true"/>
             </section>
             <param name="extra_output" value=""/>
-            <output_collection name="output_bins" count="3">
-                <element name="0" ftype="fasta">
+            <output_collection name="output_bins" count="1">
+                <element name="SemiBin_30" ftype="fasta">
                     <assert_contents>
-                        <has_text text=">g1k_0"/>
+                        <has_text text=">g3k_0"/>
                     </assert_contents>
                 </element>
             </output_collection>
@@ -456,13 +398,29 @@
                 <param name="max_node" value="1"/>
                 <param name="max_edges" value="200"/>
                 <param name="minfasta_kbs" value="200"/>
-                <param name="no_recluster" value="false"/>
             </section>
-            <param name="extra_output" value=""/>
-            <output_collection name="output_recluster_bins" count="1">
-                <element name="30" ftype="fasta">
+            <param name="extra_output" value="pre_reclustering_bins"/>
+            <output_collection name="output_pre_recluster_bins" count="3">
+                <element name="SemiBin_0" ftype="fasta">
+                    <assert_contents>    
+                        <has_text text="g1k_0"/>
+                    </assert_contents>
+                </element>
+                <element name="SemiBin_1" ftype="fasta">
+                    <assert_contents>    
+                        <has_text text="g2k_0"/>
+                    </assert_contents>
+                </element>
+                <element name="SemiBin_2" ftype="fasta">
+                    <assert_contents>    
+                        <has_text text="g3k_0"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="output_after_recluster_bins" count="1">
+                <element name="SemiBin_30" ftype="fasta">
                     <assert_contents>
-                        <has_text text=">g3k_0"/>
+                        <has_text text="g3k_0"/>
                     </assert_contents>
                 </element>
             </output_collection>
@@ -497,23 +455,9 @@
                 <param name="max_node" value="1"/>
                 <param name="max_edges" value="200"/>
                 <param name="minfasta_kbs" value="200"/>
-                <param name="no_recluster" value="true"/>
             </section>
             <param name="extra_output" value="data,coverage,contigs"/>
-            <output_collection name="multi_bins" count="2">
-                <element name="0" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_0"/>
-                    </assert_contents>
-                </element>
-            </output_collection>
-            <output_collection name="multi_contigs" count="10">
-                <element name="S8" ftype="fasta">
-                    <assert_contents>
-                        <has_text text=">g1k_0"/>
-                    </assert_contents>
-                </element>
-            </output_collection>
+            <output_collection name="multi_bins" count="0"/>
             <output_collection name="multi_data" count="10">
                 <element name="S8" ftype="csv">
                     <assert_contents>
@@ -521,6 +465,13 @@
                     </assert_contents>
                 </element>
             </output_collection>
+            <output_collection name="multi_data_split" count="10">
+                <element name="S8" ftype="csv">
+                    <assert_contents>
+                        <has_text text="g1k_0_1,"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
             <output_collection name="multi_cov" count="10">
                 <element name="8" ftype="csv">
                     <assert_contents>
@@ -557,7 +508,6 @@
                 </element>
             </output_collection>
         </test>
-        
     </tests>
     <help><![CDATA[
 @HELP_HEADER@