Mercurial > repos > nick > sequence_content_trimmer
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:7f170cb06e2e | 1:464aee13e2df |
---|---|
1 <tool id="sequence_content_trimmer" version="0.1" name="Sequence Content Trimmer"> | 1 <?xml version="1.0"?> |
2 <tool id="sequence_content_trimmer" version="0.2.3" name="Sequence Content Trimmer"> | |
2 <description>trim reads based on certain bases</description> | 3 <description>trim reads based on certain bases</description> |
3 <command interpreter="python"> | 4 <command detect_errors="exit_code"><![CDATA[ |
4 trimmer.py $input1 | 5 #if $paired.is_paired and (('fasta' in $input1.extension and 'fastq' in $input2.extension) or \ |
5 #if $paired.is_paired: | 6 ('fastq' in $input1.extension and 'fasta' in $input2.extension)) |
6 $input2 $output1 $output2 | 7 echo 'Both input files must be either fastq or fasta (no mixing the two).' >&2 |
7 #if ('fasta' in $input1.extension and 'fastq' in $input2.extension) or ('fastq' in $input1.extension and 'fasta' in $input2.extension) | 8 #else |
8 --error 'Both input files must be either fastq or fasta (no mixing the two).' | 9 python '$__tool_directory__/trimmer.py' '$input1' |
10 #if $paired.is_paired: | |
11 '$input2' '$output1' '$output2' | |
12 #end if | |
13 #if $input1.extension in ('fastq', 'fastqsanger', 'fastqillumina', 'fastqsolexa') | |
14 -f fastq | |
15 #elif $input1.extension == 'fasta' | |
16 -f fasta | |
17 #else | |
18 -f '$input1.extension' | |
19 #end if | |
20 -b '$bases' -t '$thres' -w '$win_len' $invert | |
21 #if $min_len.has_min_len: | |
22 -m '$min_len.value' | |
23 #end if | |
24 #if not $paired.is_paired: | |
25 > '$output1' | |
9 #end if | 26 #end if |
10 #end if | 27 #end if |
11 #if $input1.extension == 'fastq' or $input1.extension == 'fastqsanger' or $input1.extension == 'fastqillumina' or $input1.extension == 'fastqsolexa' | 28 ]]> |
12 -f fastq | |
13 #elif $input1.extension == 'fasta' | |
14 -f fasta | |
15 #else | |
16 -f $input1.extension | |
17 #end if | |
18 -b $bases -t $thres -w $win_len $invert | |
19 #if $min_len.has_min_len: | |
20 -m $min_len.value | |
21 #end if | |
22 #if not $paired.is_paired: | |
23 > $output1 | |
24 #end if | |
25 </command> | 29 </command> |
26 <inputs> | 30 <inputs> |
27 <conditional name="paired"> | 31 <conditional name="paired"> |
28 <param name="is_paired" type="select" label="Paired reads?"> | 32 <param name="is_paired" type="select" label="Paired reads?"> |
29 <option value="" selected="True">Unpaired</option> | 33 <option value="" selected="True">Unpaired</option> |
47 <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."/> | 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."/> |
48 </when> | 52 </when> |
49 </conditional> | 53 </conditional> |
50 </inputs> | 54 </inputs> |
51 <outputs> | 55 <outputs> |
52 <data name="output1" format_source="input1"/> | 56 <data name="output1" format_source="input1" label="$tool.name on $on_string"/> |
53 <data name="output2" format_source="input2"> | 57 <data name="output2" format_source="input2" label="$tool.name on $on_string (mate 2)"> |
54 <filter>paired['is_paired']</filter> | 58 <filter>paired['is_paired']</filter> |
55 </data> | 59 </data> |
56 </outputs> | 60 </outputs> |
57 | 61 |
58 <help> | 62 <help> |
66 | 70 |
67 .. class:: infomark | 71 .. class:: infomark |
68 | 72 |
69 **How it works** | 73 **How it works** |
70 | 74 |
71 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). | 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). |
72 | 76 |
73 The trim point will be just before the first (leftmost) filter base in the final window (the one where the frequency exceeded the threshold). | 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). |
74 | 78 |
75 | 79 |
76 .. class:: infomark | 80 .. class:: infomark |