annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
1 <?xml version="1.0"?>
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
2 <tool id="sequence_content_trimmer" version="0.2.3" name="Sequence Content Trimmer">
0
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
3 <description>trim reads based on certain bases</description>
1
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
4 <command detect_errors="exit_code"><![CDATA[
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
5 #if $paired.is_paired and (('fasta' in $input1.extension and 'fastq' in $input2.extension) or \
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
6 ('fastq' in $input1.extension and 'fasta' in $input2.extension))
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
7 echo 'Both input files must be either fastq or fasta (no mixing the two).' >&2
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
8 #else
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
9 python '$__tool_directory__/trimmer.py' '$input1'
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
10 #if $paired.is_paired:
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
11 '$input2' '$output1' '$output2'
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
12 #end if
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
13 #if $input1.extension in ('fastq', 'fastqsanger', 'fastqillumina', 'fastqsolexa')
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
14 -f fastq
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
15 #elif $input1.extension == 'fasta'
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
16 -f fasta
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
17 #else
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
18 -f '$input1.extension'
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
19 #end if
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
20 -b '$bases' -t '$thres' -w '$win_len' $invert
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
21 #if $min_len.has_min_len:
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
22 -m '$min_len.value'
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
23 #end if
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
24 #if not $paired.is_paired:
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
25 > '$output1'
0
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
26 #end if
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
27 #end if
1
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
28 ]]>
0
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
29 </command>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
30 <inputs>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
31 <conditional name="paired">
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
32 <param name="is_paired" type="select" label="Paired reads?">
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
33 <option value="" selected="True">Unpaired</option>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
34 <option value="true">Paired</option>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
35 </param>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
36 <when value="true">
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
37 <param name="input1" type="data" format="fasta,fastq" label="Input reads (mate 1)"/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
38 <param name="input2" type="data" format="fasta,fastq" label="Input reads (mate 2)"/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
39 </when>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
40 <when value="">
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
41 <param name="input1" type="data" format="fasta,fastq" label="Input reads"/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
42 </when>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
43 </conditional>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
44 <param name="bases" type="text" value="N" label="Bases to filter on"/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
45 <param name="thres" type="float" value="0.5" min="0" max="1" label="Frequency threshold" help="Trim when the frequency of filter bases (or non-filter bases, if inverting) exceeds this value."/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
46 <param name="win_len" type="integer" value="10" min="1" label="Size of the window"/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
47 <param name="invert" type="boolean" truevalue="--invert" falsevalue="" checked="False" label="Invert filter bases" help="Trim when the frequency of bases NOT in the &quot;filter bases&quot; list exceeds the threshold."/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
48 <conditional name="min_len">
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
49 <param name="has_min_len" type="boolean" truevalue="true" falsevalue="" checked="False" label="Set a minimum read length"/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
50 <when value="true">
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
51 <param name="value" type="integer" value="10" min="0" label="Minimum read length" help="Reads trimmed to less than this length will be omitted from the output. Pairs will be preserved: both must exceed this threshold to be kept."/>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
52 </when>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
53 </conditional>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
54 </inputs>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
55 <outputs>
1
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
56 <data name="output1" format_source="input1" label="$tool.name on $on_string"/>
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
57 <data name="output2" format_source="input2" label="$tool.name on $on_string (mate 2)">
0
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
58 <filter>paired['is_paired']</filter>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
59 </data>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
60 </outputs>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
61
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
62 <help>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
63
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
64 .. class:: infomark
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
65
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
66 **What it does**
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
67
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
68 This tool trims the 3' ends of reads based on the presence of the given bases. For instance, trim when N's are encountered or when the GC content exceeds a certain frequency.
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
69
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
70
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
71 .. class:: infomark
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
72
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
73 **How it works**
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
74
1
464aee13e2df "planemo upload commit 8e52aac4afce4ab7c4d244e2b70f205f70c16749-dirty"
nick
parents: 0
diff changeset
75 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).
0
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
76
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
77 The trim point will be just before the first (leftmost) filter base in the final window (the one where the frequency exceeded the threshold).
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
78
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
79
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
80 .. class:: infomark
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
81
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
82 **Input**
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
83
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
84 The inputs can be in the following formats: fasta, fastq, fastqsanger, fastqillumina, and fastqsolexa. Both must be either a fasta or fastq type (no mixing fastq and fasta).
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
85
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
86 </help>
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
87
7f170cb06e2e planemo upload commit d76a1cf04f3e4bc735d320ccccbf7aecbc193395
nick
parents:
diff changeset
88 </tool>