changeset 5:b048a987dd7d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/das_tool commit b50985039ff11e1779f9f48f13e3b74fa1c0e955
author iuc
date Mon, 29 Apr 2024 20:17:04 +0000
parents 7d997332582e
children
files das_tool.xml macros.xml
diffstat 2 files changed, 71 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/das_tool.xml	Sun Feb 25 11:28:02 2024 +0000
+++ b/das_tool.xml	Mon Apr 29 20:17:04 2024 +0000
@@ -7,19 +7,26 @@
     <expand macro="requirements"/>
     <expand macro="version"/>
     <command detect_errors="exit_code"><![CDATA[
-#set $bins = ""
-#set $labels = ""
-#set $sep = ""
+#import re
+
+#set $bins = []
+#set $labels = []
 #for $i, $s in enumerate($binning)
-    #set $bins += "%s%s" %($sep, $s.bins)
-    #set $labels += "%s%s" %($sep, $s.labels)
-    #set $sep = ","
+    #silent $bins.append(str($s.bins))
+    #if $s.labels != ''
+        #silent $labels.append(str($s.labels))
+    #else
+        #silent $labels.append(re.sub('[^\w\-_\.]', '_', $s.bins.element_identifier))
+    #end if
 #end for
 
 #if $adv.proteins
     ln -s '$adv.proteins' 'proteins' &&
 #end if
 
+#set $bins = ','.join($bins)
+#set $labels = ','.join($labels)
+
 DAS_Tool
     --contigs '$contigs'
     --outputbasename 'outputs'
@@ -46,7 +53,15 @@
         <param argument="--contigs" type="data" format="fasta" label="Contig sequences"/>
         <repeat name="binning" title="Bins" min="1">
             <param argument="--bins" type="data" format="tabular" label="Contigs-to-bin table" help="Tabular with two columns: contig-IDs and bin-IDs. Fasta_to_Contigs2Bin can be used to  Converts genome bins in fasta format to Contigs-to-bin table"/>
-            <param argument="--labels" type="text" value="" label="Name of binning prediction tool used to generate the table"/>
+            <param argument="--labels" type="text" value="" label="Name of binning prediction name" help="If left empty the identifier of the contig-to-bin table is used. Only alphanumeric characters, dash, underscore and dor are allowed. Other characters are replaced by underscore.">
+                <sanitizer invalid_char="_">
+                    <valid initial="string.ascii_letters,string.digits">
+                        <add value="-" />
+                        <add value="_" />
+                        <add value="." />
+                    </valid>
+                </sanitizer>
+            </param>
         </repeat>
         <section name="adv" title="Advanced options">
             <param argument="--search_engine" type="select" label="Engine used for single copy gene identification">
@@ -139,6 +154,52 @@
                 </assert_contents>
             </output>
         </test>
+        <!-- like the first test, but with empty label  -->
+        <test expect_num_outputs="4">
+            <param name="contigs" value="contigs.fasta"/>
+            <repeat name="binning">
+                <param name="bins" value="metabat.tabular"/>
+                <!-- <param name="labels" value="metabat"/> -->
+            </repeat>
+            <section name="adv">
+                <param name="search_engine" value="diamond"/>
+                <param name="proteins" value="proteins.fasta"/>
+                <param name="score_threshold" value="0.5"/>
+                <param name="duplicate_penalty" value="0.6"/>
+                <param name="megabin_penalty" value="0.5" />
+            </section>
+            <section name="output">
+                <param name="write_bin_evals" value="true"/>
+                <conditional name="write_bins">
+                    <param name="write_bins" value=""/>
+                </conditional>
+                <param name="debug" value="true"/>
+            </section>
+            <output name="summary" ftype="tabular">
+                <assert_contents>
+                    <has_text text="unique_SCGs"/>
+                    <has_text text="metabat.8"/>
+                    <has_text text="bacteria"/>
+                </assert_contents>
+            </output>
+            <output name="contigs2bin" ftype="tabular">
+                <assert_contents>
+                    <has_text text="Ley3_66761_scaffold_6"/>
+                </assert_contents>
+            </output>
+            <output name="log" ftype="txt">
+                <assert_contents>
+                    <has_text text="Skipping gene prediction"/>
+                    <has_text text="#Target sequences to report alignments for: 1"/>
+                </assert_contents>
+            </output>
+            <output name="eval" ftype="tabular">
+                <assert_contents>
+                    <has_text text="unique_SCGs"/>
+                    <has_text text="metabat.8"/>
+                </assert_contents>
+            </output>
+        </test>
         <test expect_num_outputs="6">
             <param name="contigs" value="contigs.fasta"/>
             <repeat name="binning">
--- a/macros.xml	Sun Feb 25 11:28:02 2024 +0000
+++ b/macros.xml	Mon Apr 29 20:17:04 2024 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <macros>
     <token name="@TOOL_VERSION@">1.1.7</token>
-    <token name="@VERSION_SUFFIX@">0</token>
-    <token name="@PROFILE@">21.01</token>
+    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@PROFILE@">22.01</token>
     <xml name="biotools">
         <xrefs>
             <xref type="bio.tools">dastool</xref>
@@ -28,4 +28,4 @@
             <citation type="doi">10.1038/s41564-018-0171-1</citation>
         </citations>
     </xml>
-</macros>
\ No newline at end of file
+</macros>