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