Mercurial > repos > nick > sequence_content_trimmer
annotate trimmer.xml @ 0:c824894e0827 draft
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
| author | nick |
|---|---|
| date | Tue, 01 Dec 2015 21:11:51 -0500 |
| parents | |
| children | 7ef568cbf13b |
| rev | line source |
|---|---|
|
0
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
1 <tool id="sequence_content_trimmer" version="0.1" name="Sequence Content Trimmer"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
2 <description>trim reads based on certain bases</description> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
3 <command interpreter="python"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
4 trimmer.py $input1 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
5 #if $paired.is_paired: |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
6 $input2 $output1 $output2 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
7 #if ('fasta' in $input1.extension and 'fastq' in $input2.extension) or ('fastq' in $input1.extension and 'fasta' in $input2.extension) |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
8 --error 'Both input files must be either fastq or fasta (no mixing the two).' |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
9 #end if |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
10 #end if |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
11 #if $input1.extension == 'fastq' or $input1.extension == 'fastqsanger' or $input1.extension == 'fastqillumina' or $input1.extension == 'fastqsolexa' |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
12 -f fastq |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
13 #elif $input1.extension == 'fasta' |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
14 -f fasta |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
15 #else |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
16 -f $input1.extension |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
17 #end if |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
18 -b $bases -t $thres -w $win_len $invert |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
19 #if $min_len.has_min_len: |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
20 -m $min_len.value |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
21 #end if |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
22 #if not $paired.is_paired: |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
23 > $output1 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
24 #end if |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
25 </command> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
26 <inputs> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
27 <conditional name="paired"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
28 <param name="is_paired" type="select" label="Paired reads?"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
29 <option value="" selected="True">Unpaired</option> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
30 <option value="true">Paired</option> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
31 </param> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
32 <when value="true"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
33 <param name="input1" type="data" format="fasta,fastq" label="Input reads (mate 1)"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
34 <param name="input2" type="data" format="fasta,fastq" label="Input reads (mate 2)"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
35 </when> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
36 <when value=""> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
37 <param name="input1" type="data" format="fasta,fastq" label="Input reads"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
38 </when> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
39 </conditional> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
40 <param name="bases" type="text" value="N" label="Bases to filter on"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
41 <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."/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
42 <param name="win_len" type="integer" value="10" min="1" label="Size of the window"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
43 <param name="invert" type="boolean" truevalue="--invert" falsevalue="" checked="False" label="Invert filter bases" help="Trim when the frequency of bases NOT in the "filter bases" list exceeds the threshold."/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
44 <conditional name="min_len"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
45 <param name="has_min_len" type="boolean" truevalue="true" falsevalue="" checked="False" label="Set a minimum read length"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
46 <when value="true"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
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."/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
48 </when> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
49 </conditional> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
50 </inputs> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
51 <outputs> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
52 <data name="output1" format_source="input1"/> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
53 <data name="output2" format_source="input2"> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
54 <filter>paired['is_paired']</filter> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
55 </data> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
56 </outputs> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
57 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
58 <help> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
59 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
60 .. class:: infomark |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
61 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
62 **What it does** |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
63 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
64 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. |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
65 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
66 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
67 .. class:: infomark |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
68 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
69 **Input** |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
70 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
71 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). |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
72 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
73 </help> |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
74 |
|
c824894e0827
planemo upload commit bb6c51fa3c8501e779f3b266d17f4900d98fc431-dirty
nick
parents:
diff
changeset
|
75 </tool> |
