Mercurial > repos > nml > kat_filter
comparison kat_filter.xml @ 0:894eff01255b draft default tip
planemo upload commit 3ad4270aabe37123987e91a178bd7d61778c849c-dirty
| author | nml |
|---|---|
| date | Tue, 09 Jan 2018 10:27:22 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:894eff01255b |
|---|---|
| 1 <?xml version='1.0' encoding='utf-8'?> | |
| 2 <tool id="kat_@EXECUTABLE@" name="KAT @EXECUTABLE@" version="@VERSION@.2"> | |
| 3 <description>Filtering reads or k-mer from fasta file</description> | |
| 4 <macros> | |
| 5 <token name="@EXECUTABLE@">filter_seq</token> | |
| 6 <import>macros.xml</import> | |
| 7 </macros> | |
| 8 <expand macro="requirements" /> | |
| 9 <expand macro="stdio" /> | |
| 10 <expand macro="version_command" /> | |
| 11 <command><![CDATA[ | |
| 12 | |
| 13 | |
| 14 cp "$db" db.fasta && | |
| 15 | |
| 16 #if $single_or_paired.type == "single" | |
| 17 ln "$input_se" read.fastq && | |
| 18 | |
| 19 kat filter seq | |
| 20 | |
| 21 --seq read.fastq | |
| 22 | |
| 23 #elif $single_or_paired.type == "paired" | |
| 24 ln "$single_or_paired.forward_pe" read_1.fastq && ln "$single_or_paired.reverse_pe" read_2.fastq && | |
| 25 | |
| 26 kat filter seq | |
| 27 | |
| 28 --seq read_1.fastq --seq2 read_2.fastq | |
| 29 | |
| 30 #else | |
| 31 ln "$single_or_paired.fastq_collection.forward" read_1.fastq && ln "$single_or_paired.fastq_collection.reverse" read_2.fastq && | |
| 32 | |
| 33 kat filter seq | |
| 34 | |
| 35 --seq read_1.fastq --seq2 read_2.fastq | |
| 36 | |
| 37 #end if | |
| 38 | |
| 39 | |
| 40 @THREADS@ | |
| 41 | |
| 42 --mer_len $kmer | |
| 43 | |
| 44 $stats | |
| 45 | |
| 46 #if $invert_or_both.which == "invert": | |
| 47 $invert_or_both.invert | |
| 48 #elif $invert_or_both.which == "split": | |
| 49 $invert_or_both.separate | |
| 50 #end if | |
| 51 | |
| 52 -o reads | |
| 53 'db.fasta' | |
| 54 | |
| 55 ]]></command> | |
| 56 <inputs> | |
| 57 <expand macro="macro_input" /> | |
| 58 | |
| 59 <param name="db" type="data" format="fasta" label="Fasta file of targeted regions"/> | |
| 60 <expand macro="macro_kmers" /> | |
| 61 | |
| 62 <param name="threshold" type="float" value='0.10000000000000001' label="Target Threshold" help="What percentage of the sequence needs to be covered with target k-mers to keep the sequence"/> | |
| 63 | |
| 64 <param name="stats" type="boolean" truevalue='--stats' falsevalue='' checked='False' label="Stats" help="Whether to emit statistics about quantity of found k-mers in each sequence."/> | |
| 65 <conditional name="invert_or_both"> | |
| 66 <param name="which" type="select" label="Advance Options"> | |
| 67 <option value="none">No Advance</option> | |
| 68 <option value="invert">Option 1</option> | |
| 69 <option value="split">Option 2</option> | |
| 70 </param> | |
| 71 <when value="invert"> | |
| 72 <param name="invert" type="boolean" truevalue='--invert' falsevalue='' checked='True' label="Take k-mer not matching target" help="Whether to take k-mers outside region as selected content, rather than those inside."/> | |
| 73 </when> | |
| 74 <when value="split"> | |
| 75 <param name="separate" type="boolean" truevalue='--separate' falsevalue='' checked='True' label="Keep inside and outside of target(s) region" help="Whether to partition the k-mers into two sets, those inside region and those outside."/> | |
| 76 </when> | |
| 77 <when value="none"> | |
| 78 </when> | |
| 79 </conditional> | |
| 80 </inputs> | |
| 81 <outputs> | |
| 82 <data format="fastqsanger" name="reads" label="Reads.fastq" from_work_dir="reads.in.fastq" > | |
| 83 <filter> single_or_paired['type'] == "single" </filter> | |
| 84 </data> | |
| 85 <data format="fastqsanger" name="forward" label="forward_R1.fastq" from_work_dir="reads.in.R1.fastq" > | |
| 86 <filter> single_or_paired['type'] == "paired"</filter> | |
| 87 </data> | |
| 88 <data format="fastqsanger" name="reverse" label="reverse_R2.fastq" from_work_dir="reads.in.R2.fastq" > | |
| 89 <filter> single_or_paired['type'] == "paired"</filter> | |
| 90 </data> | |
| 91 | |
| 92 | |
| 93 <collection name="paired_reads" type="paired" label="Reads"> | |
| 94 <data name="forward" format="fastqsanger" from_work_dir="reads.in.R1.fastq" > | |
| 95 <filter> single_or_paired['type'] == "collection"</filter> | |
| 96 </data> | |
| 97 <data name="reverse" format="fastqsanger" from_work_dir="reads.in.R2.fastq" > | |
| 98 <filter> single_or_paired['type'] == "collection"</filter> | |
| 99 </data> | |
| 100 </collection> | |
| 101 | |
| 102 | |
| 103 <data format="fastqsanger" name="outside_reads" label='Outside reads' from_work_dir="reads.out.fastq"> | |
| 104 <filter>invert_or_both['which'] == 'split' and invert_or_both['separate'] and single_or_paired['type'] == "single"</filter> | |
| 105 </data> | |
| 106 <data format="tabular" name="file_stats" label='Stats' from_work_dir="reads.stats"> | |
| 107 <filter>stats</filter> | |
| 108 </data> | |
| 109 | |
| 110 </outputs> | |
| 111 <tests> | |
| 112 <test> | |
| 113 <param name="input_se" value="input.fastq" /> | |
| 114 <param name="db" value="db.fasta" /> | |
| 115 <output file="matched.fastq" ftype="fastqsanger" name="reads" /> | |
| 116 </test> | |
| 117 </tests> | |
| 118 <help><![CDATA[ | |
| 119 http://kat.readthedocs.io/en/latest/using.html#filtering-tools | |
| 120 ]]> | |
| 121 | |
| 122 </help> | |
| 123 <citations> | |
| 124 </citations> | |
| 125 </tool> |
