diff bbduk.xml @ 5:ed2c532794c1 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bbtools commit cd59ba2c349865259b92302a1d70e103b8a5e3cb
author iuc
date Tue, 27 Aug 2024 10:13:47 +0000
parents 008b8c6f6b26
children c456a40153af
line wrap: on
line diff
--- a/bbduk.xml	Tue May 30 09:00:52 2023 +0000
+++ b/bbduk.xml	Tue Aug 27 10:13:47 2024 +0000
@@ -4,10 +4,10 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="edam_ontology"/>
+    <expand macro="bio.tools"/>
     <expand macro="requirements"/>
     <command detect_errors="exit_code"><![CDATA[
 #import os
-#import re
 
 #if str($input_type_cond.input_type) in ['single', 'pair']:
     #set read1 = $input_type_cond.read1
@@ -25,17 +25,15 @@
     #end if
 #else:
     #set read1 = $input_type_cond.reads_collection['forward']
-    #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.name))
     ## bbduk uses the file extension to determine the input format.
-    #set ext = $read1_identifier + '.fastq'
+    #set ext = '.fastq'
     #if $read1.ext.endswith('.gz'):
         #set ext = $ext + '.gz'
     #end if
-    #set read1_file = $read1_identifier + $ext
+    #set read1_file = 'forward' + $ext
     ln -s '${read1}' '${read1_file}' &&
     #set read2 = $input_type_cond.reads_collection['reverse']
-    #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.name))
-    #set read2_file = $read2_identifier + $ext
+    #set read2_file = 'reverse' + $ext
     ln -s '${read2}' '${read2_file}' &&
 #end if
 
@@ -156,11 +154,11 @@
             </param>
             <when value="no_reference"/>
             <when value="files">
-                <param name="reference" type="data" format="fasta,fasta.gz" multiple="true" optional="false" label="Select one or more fasta file"/>
+                <param name="reference" type="data" format="fasta,fasta.gz" optional="false" label="Select one or more fasta file" multiple="true"/>
                 <expand macro="ktrim_cond"/>
             </when>
             <when value="keywords">
-                <param name="reference"  type="select" multiple="true" optional="false" label="Select one or more keywords">
+                <param name="reference" type="select" optional="false" label="Select one or more keywords" multiple="true">
                     <option value="adapters">adapters</option>
                     <option value="artifacts">artifacts</option>
                     <option value="phix">phix</option>
@@ -173,34 +171,34 @@
             </when>
         </conditional>
         <section name="advanced_options" title="Advanced options" expanded="false">
-            <param argument="k" type="integer" value="27" min="1" label="Kmer length used for finding contaminants"/>
+            <param argument="k" type="integer" min="1" value="27" label="Kmer length used for finding contaminants"/>
             <param argument="rcomp" type="boolean" truevalue="t" falsevalue="f" checked="true" label="Look for reverse-complements of kmers in addition to forward kmers?"/>
             <param argument="maskmiddle" type="boolean" truevalue="t" falsevalue="f" checked="true" label="Treat the middle base of a kmer as a wildcard to increase sensitivity in the presence of errors?"/>
-            <param argument="minkmerhits" type="integer" value="1" min="1" label="Reads need at least this many matching kmers to be considered as matching the reference"/>
-            <param argument="minkmerfraction" type="float" value="0" min="0" label="A read needs at least this fraction of its total kmers to hit a ref in order to be considered a match"/>
-            <param argument="mincovfraction" type="float" value="0" min="0" label="A read needs at least this fraction of its total bases to be covered by ref kmers to be considered a match"/>
-            <param argument="hammingdistance" type="integer" value="0" min="0" label="Maximum Hamming distance for ref kmers (subs only)"/>
-            <param argument="qhdist" type="integer" value="0" min="0" label="Hamming distance for query kmers"/>
-            <param argument="editdistance" type="integer" value="0" min="0" label="Maximum edit distance from ref kmers (subs and indels)"/>
+            <param argument="minkmerhits" type="integer" min="1" value="1" label="Reads need at least this many matching kmers to be considered as matching the reference"/>
+            <param argument="minkmerfraction" type="float" min="0" value="0" label="A read needs at least this fraction of its total kmers to hit a ref in order to be considered a match"/>
+            <param argument="mincovfraction" type="float" min="0" value="0" label="A read needs at least this fraction of its total bases to be covered by ref kmers to be considered a match"/>
+            <param argument="hammingdistance" type="integer" min="0" value="0" label="Maximum Hamming distance for ref kmers (subs only)"/>
+            <param argument="qhdist" type="integer" min="0" value="0" label="Hamming distance for query kmers"/>
+            <param argument="editdistance" type="integer" min="0" value="0" label="Maximum edit distance from ref kmers (subs and indels)"/>
             <param argument="forbidn" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Do not match kmers comntaining N?"/>
             <param argument="trimfailures" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Trim failed reads to 1bp instead of discarding them?"/>
             <param argument="findbestmatch" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Associate read with sequence sharing most kmers if multiple matches?"/>
             <param argument="skipr1" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Don't do kmer-based operations on read 1?"/>
             <param argument="skipr2" type="boolean" truevalue="t" falsevalue="f" checked="false" label="Don't do kmer-based operations on read 2?"/>
         </section>
-        <param name="outputs_select"  type="select" multiple="true" optional="false" label="Specify outputs">
+        <param name="outputs_select" type="select" optional="false" label="Specify outputs" multiple="true">
             <option value="outu">Unmatched</option>
             <option value="outm">Matched</option>
             <option value="outs">Single</option>
         </param>
         <conditional name="output_stats_cond">
-            <param name="output_stats"  type="select" label="Output statistics?">
+            <param name="output_stats" type="select" label="Output statistics?">
                 <option value="no" selected="true">No</option>
                 <option value="yes">Yes</option>
             </param>
             <when value="no"/>
             <when value="yes">
-                <param name="output_stats_select"  type="select" multiple="true" optional="false" label="Specify statistics outputs">
+                <param name="output_stats_select" type="select" optional="false" label="Specify statistics outputs" multiple="true">
                     <option value="stats">Statistics about which contamininants were detected</option>
                     <option value="ref">Statistics on a per-reference-file basis</option>
                     <option value="rpkm">RPKM for each reference sequence (for RNA-seq)</option>
@@ -209,13 +207,13 @@
             </when>
         </conditional>
         <conditional name="output_hists_cond">
-            <param name="output_hists"  type="select" label="Output histograms?">
+            <param name="output_hists" type="select" label="Output histograms?">
                 <option value="no" selected="true">No</option>
                 <option value="yes">Yes</option>
             </param>
             <when value="no"/>
             <when value="yes">
-                <param name="output_hists_select"  type="select" multiple="true" optional="false" label="Specify statistics outputs">
+                <param name="output_hists_select" type="select" optional="false" label="Specify statistics outputs" multiple="true">
                     <option value="bhist">Base composition histogram by position</option>
                     <option value="quhist">Quality histogram by position</option>
                     <option value="quchist">Count of bases with each quality value</option>
@@ -231,7 +229,7 @@
     </inputs>
     <outputs>
         <data name="outputu" format="fastqsanger" label="${tool.name} on ${on_string} (Forward Unmatched)">
-            <filter>str(outputs_select).find('outu') >= 0</filter>
+            <filter>str(outputs_select).find('outu') &gt;= 0</filter>
             <filter>'outu' in outputs_select</filter>
         </data>
         <data name="outputu2" format="fastqsanger" label="${tool.name} on ${on_string} (Reverse Unmatched)">
@@ -352,4 +350,3 @@
     </help>
     <expand macro="citations"/>
 </tool>
-