diff trimmer.xml @ 1:464aee13e2df draft default tip

"planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
author nick
date Fri, 27 May 2022 23:29:45 +0000
parents 7f170cb06e2e
children
line wrap: on
line diff
--- a/trimmer.xml	Tue Dec 01 21:33:27 2015 -0500
+++ b/trimmer.xml	Fri May 27 23:29:45 2022 +0000
@@ -1,27 +1,31 @@
-<tool id="sequence_content_trimmer" version="0.1" name="Sequence Content Trimmer">
+<?xml version="1.0"?>
+<tool id="sequence_content_trimmer" version="0.2.3" name="Sequence Content Trimmer">
   <description>trim reads based on certain bases</description>
-  <command interpreter="python">
-  trimmer.py $input1
-  #if $paired.is_paired:
-    $input2 $output1 $output2
-    #if ('fasta' in $input1.extension and 'fastq' in $input2.extension) or ('fastq' in $input1.extension and 'fasta' in $input2.extension)
-      --error 'Both input files must be either fastq or fasta (no mixing the two).'
+  <command detect_errors="exit_code"><![CDATA[
+  #if $paired.is_paired and (('fasta' in $input1.extension and 'fastq' in $input2.extension) or \
+      ('fastq' in $input1.extension and 'fasta' in $input2.extension))
+    echo 'Both input files must be either fastq or fasta (no mixing the two).' >&2
+  #else
+    python '$__tool_directory__/trimmer.py' '$input1'
+    #if $paired.is_paired:
+      '$input2' '$output1' '$output2'
+    #end if
+    #if $input1.extension in ('fastq', 'fastqsanger', 'fastqillumina', 'fastqsolexa')
+      -f fastq
+    #elif $input1.extension == 'fasta'
+      -f fasta
+    #else
+      -f '$input1.extension'
+    #end if
+    -b '$bases' -t '$thres' -w '$win_len' $invert
+    #if $min_len.has_min_len:
+      -m '$min_len.value'
+    #end if
+    #if not $paired.is_paired:
+      > '$output1'
     #end if
   #end if
-  #if $input1.extension == 'fastq' or $input1.extension == 'fastqsanger' or $input1.extension == 'fastqillumina' or $input1.extension == 'fastqsolexa'
-    -f fastq
-  #elif $input1.extension == 'fasta'
-    -f fasta
-  #else
-    -f $input1.extension
-  #end if
-  -b $bases -t $thres -w $win_len $invert
-  #if $min_len.has_min_len:
-    -m $min_len.value
-  #end if
-  #if not $paired.is_paired:
-    &gt; $output1
-  #end if
+  ]]>
   </command>
   <inputs>
     <conditional name="paired">
@@ -49,8 +53,8 @@
     </conditional>
   </inputs>
   <outputs>
-    <data name="output1" format_source="input1"/>
-    <data name="output2" format_source="input2">
+    <data name="output1" format_source="input1" label="$tool.name on $on_string"/>
+    <data name="output2" format_source="input2" label="$tool.name on $on_string (mate 2)">
       <filter>paired['is_paired']</filter>
     </data>
   </outputs>
@@ -68,7 +72,7 @@
 
 **How it works**
 
-This will slide along the read with a window, and trim once the frequency of filter bases exceeds the frequency threshold (unless "Invert filter bases" is enabled, when it will trim once non-filter bases exceed the threshold).
+This will slide along the read with a window, and trim once the frequency of filter bases exceeds the frequency threshold (unless "Invert filter bases" is enabled, in which case it will trim once non-filter bases exceed the threshold).
 
 The trim point will be just before the first (leftmost) filter base in the final window (the one where the frequency exceeded the threshold).