Mercurial > repos > matthias > stacks2_kmerfilter
comparison stacks_kmerfilter.xml @ 3:7aec316566cb draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit 9c41b2599125298b1a4d9ffb2511cdc87ff79a73
author | matthias |
---|---|
date | Tue, 18 Dec 2018 12:50:41 -0500 |
parents | 324a729c257f |
children | 2277b0b50371 |
comparison
equal
deleted
inserted
replaced
2:324a729c257f | 3:7aec316566cb |
---|---|
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
8 <expand macro="version_cmd"/> | 8 <expand macro="version_cmd"/> |
9 <command><![CDATA[ | 9 <command><![CDATA[ |
10 | |
11 #if $data_type.dt_select == "single" | 10 #if $data_type.dt_select == "single" |
12 | |
13 #if $data_type.fname.is_of_type('fastqsanger') | 11 #if $data_type.fname.is_of_type('fastqsanger') |
14 #set $ext = ".fq" | 12 #set $ext = ".fq" |
15 #set inputype = "fastq" | 13 #set inputype = "fastq" |
16 #else | 14 #else |
17 #set $ext = ".fq.gz" | 15 #set $ext = ".fq.gz" |
18 #set inputype = "gzfastq" | 16 #set inputype = "gzfastq" |
19 #end if | 17 #end if |
20 | |
21 ln -s '$data_type.fname' R1$ext && | 18 ln -s '$data_type.fname' R1$ext && |
22 #else | 19 #elif $data_type.dt_select == "pair" |
23 | |
24 #if $data_type.fwd.is_of_type('fastqsanger') | 20 #if $data_type.fwd.is_of_type('fastqsanger') |
25 #set $ext = ".fq" | 21 #set $ext = ".fq" |
26 #set inputype = "fastq" | 22 #set inputype = "fastq" |
27 #else | 23 #else |
28 #set $ext = ".fq.gz" | 24 #set $ext = ".fq.gz" |
29 #set inputype = "gzfastq" | 25 #set inputype = "gzfastq" |
30 #end if | 26 #end if |
31 | |
32 ln -s '$data_type.fwd' R1$ext && | 27 ln -s '$data_type.fwd' R1$ext && |
33 ln -s '$data_type.rev' R2$ext && | 28 ln -s '$data_type.rev' R2$ext && |
34 #end if | 29 #end if |
35 | 30 |
36 mkdir clone_outputs | 31 mkdir clone_outputs |
37 | 32 |
38 && | 33 && |
39 | 34 |
40 clone_filter | 35 kmer_filter |
41 #if $data_type.dt_select == 'single': | 36 #if $data_type.dt_select == 'single': |
42 -f R1$ext | 37 -f R1$ext |
43 | |
44 #else | 38 #else |
45 -1 R1$ext | 39 -1 R1$ext |
46 -2 R2$ext | 40 -2 R2$ext |
47 #end if | 41 #end if |
48 | 42 ## TODO $options_kmer_char.read_k_freq |
49 -i $inputype | 43 -i $inputype |
50 | |
51 -o clone_outputs | 44 -o clone_outputs |
52 $capture | 45 $capture |
46 -y gzfastq | |
47 $options_filtering.rare | |
48 $options_filtering.abundant | |
49 --k_len $options_filtering.k_len | |
50 --max_k_freq $options_advanced_filtering.max_k_freq | |
51 #if str($options_advanced_filtering.min_lim)!="": | |
52 --min_lim $options_advanced_filtering.min_lim | |
53 #end if | |
54 #if str($options_advanced_filtering.max_lim)!="": | |
55 --max_lim $options_advanced_filtering.max_lim | |
56 #end if | |
57 #if str($options_normalization.normalize)!="": | |
58 --normalize $options_normalization.normalize | |
59 #end if | |
60 #if $options_kmer_char.write_k_freq | |
61 --read_k_freq $kfreq | |
62 #end if | |
63 $options_kmer_char.k_dist | |
64 #if $options_kmer_char.k_dist | |
65 | sed 's/KmerFrequency/# KmerFrequency/' $kfreqdist> | |
66 #end if | |
53 | 67 |
54 #if $oligo_len_1 | |
55 --oligo_len_1 $oligo_len_1 | |
56 #end if | |
57 #if $oligo_len_2 | |
58 --oligo_len_2 $oligo_len_2 | |
59 #end if | |
60 $data_type.barcode_encoding | |
61 $retain_oligo | |
62 -y gzfastq | |
63 | 68 |
64 ]]></command> | 69 ]]></command> |
65 <inputs> | 70 <inputs> |
66 <conditional name="data_type"> | 71 <conditional name="data_type"> |
67 <param name="dt_select" type="select" label="Single or Paired-end"> | 72 <param name="dt_select" type="select" label="Single or Paired-end"> |
68 <option value="single">Single</option> | 73 <option value="single">Single</option> |
69 <option value="pair">Pair</option> | 74 <option value="pair">Pair</option> |
70 </param> | 75 </param> |
71 <when value="single"> | 76 <when value="single"> |
72 <param name="fname" type="data" format="fastqsanger,fastqsanger.gz" label="FASTQ" /> | 77 <param name="fname" type="data" format="fastqsanger,fastqsanger.gz" label="FASTQ" /> |
73 <param name="barcode_encoding" type="select" label="Barcode location"> | |
74 <expand macro="barcode_encoding_single" /> | |
75 </param> | |
76 | |
77 </when> | 78 </when> |
78 <when value="pair"> | 79 <when value="pair"> |
79 <param name="fwd" type="data" format="fastqsanger,fastqsanger.gz" label="Forward FASTQ" /> | 80 <param name="fwd" type="data" format="fastqsanger,fastqsanger.gz" label="Forward FASTQ" /> |
80 <param name="rev" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse FASTQ" /> | 81 <param name="rev" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse FASTQ" /> |
81 <param name="barcode_encoding" type="select" label="Barcode location"> | |
82 <expand macro="barcode_encoding_pair" /> | |
83 </param> | |
84 </when> | 82 </when> |
85 </conditional> | 83 </conditional> |
86 <param name="capture" type="boolean" checked="false" truevalue="-D" falsevalue="" argument="-D" label="Capture discarded reads to a file" /> | 84 <param name="capture" type="boolean" checked="false" truevalue="-D" falsevalue="" argument="-D" label="Capture discarded reads to a file" /> |
87 <section name="options_filtering" title="Filtering options" expanded="False"> | 85 <section name="options_filtering" title="Filtering options" expanded="False"> |
88 <param argument="--rare" type="boolean" checked="false" truevalue="--rare" falsevalue="" label="turn on filtering based on rare k-mers" /> | 86 <param argument="--rare" type="boolean" checked="false" truevalue="--rare" falsevalue="" label="turn on filtering based on rare k-mers" /> |
89 <param argument="--abundant" type="boolean" checked="false" truevalue="--abundant" falsevalue="" label="turn on filtering based on abundant k-mers" /> | 87 <param argument="--abundant" type="boolean" checked="false" truevalue="--abundant" falsevalue="" label="turn on filtering based on abundant k-mers" /> |
90 <param argument="--k_len" type="integer" value="15" label="k-mer size" /> | 88 <param argument="--k_len" type="integer" value="15" label="k-mer size" /> |
91 </section> | 89 </section> |
92 <section name="options_advanced_filtering" title="Advanced fitering options" expanded="False"> | 90 <section name="options_advanced_filtering" title="Advanced fitering options" expanded="False"> |
91 <param argument="--max_k_freq" type="integer" value="20000" label="number of times a kmer must occur to be considered abundant" /> | |
92 <param argument="--min_lim" type="integer" value="" optional="true" label="number of rare kmers occuring in a row required to discard a read" help="(default: 80% of the k-mer length)." /> | |
93 <param argument="--max_lim" type="integer" value="" optional="true" label="number of abundant kmers required to discard a read" help="(default: 80% of the k-mers in a read)" /> | |
93 </section> | 94 </section> |
94 <param argument="--max_k_freq" type="integer" value="20" label="number of times a kmer must occur to be considered abundant" /> | |
95 <param argument="--min_lim" type="integer" value="" optional="true" label="number of rare kmers occuring in a row required to discard a read" help="(0/empty: 80% of the k-mer length)." /> | |
96 <param argument="--max_lim" type="integer" value="" optional="true" label="number of abundant kmers required to discard a read" help="(0/empty: 80% of the k-mers in a read)" /> | |
97 <section name="options_normalization" title="Normalization options" expanded="False"> | 95 <section name="options_normalization" title="Normalization options" expanded="False"> |
98 <param argument="--normalize" type="integer" value="" label="normalize read depth according to k-mer coverage" /> | 96 <param argument="--normalize" type="integer" value="" optional="true" label="normalize read depth according to k-mer coverage" /> |
99 </section> | 97 </section> |
100 <section name="options_kmer_char" title="Characterizing K-mers options" expanded="False"> | 98 <section name="options_kmer_char" title="Characterizing K-mers options" expanded="False"> |
101 <param argument="--write_k_freq" type="boolean" checked="false" truevalue="--write_k_freq" falsevalue="" label="write kmers along with their frequency of occurrence and exit" /> | 99 <param argument="--write_k_freq" type="boolean" checked="false" truevalue="--write_k_freq" falsevalue="" label="write kmers along with their frequency of occurrence and exit" /> |
102 <param argument="--k_dist" type="boolean" checked="false" truevalue="--k_dist" falsevalue="" label="print k-mer frequency distribution and exit" /> | 100 <param argument="--k_dist" type="boolean" checked="false" truevalue="--k_dist" falsevalue="" label="print k-mer frequency distribution and exit" /> |
103 </section> | 101 </section> |
104 <section name="options_advanced_input" title="Advanced input options" expanded="False"> | 102 <!--<section name="options_advanced_input" title="Advanced input options" expanded="False"> |
105 <param argument="--read_k_freq" type="boolean" checked="false" truevalue="--read_k_freq" falsevalue="" label="read a set of kmers along with their frequencies of occurrence instead of reading raw input files" /> | 103 <param argument="\-\-read_k_freq" type="boolean" checked="false" truevalue="\-\-read_k_freq" falsevalue="" label="read a set of kmers along with their frequencies of occurrence instead of reading raw input files" /> |
106 </section> | 104 </section>--> |
107 </inputs> | 105 </inputs> |
108 <outputs> | 106 <outputs> |
109 <data format="fastqsanger.gz" name="clean" from_work_dir="clone_outputs/R1.fq.gz" label="${tool.name} on ${on_string}"> | 107 <data format="fastqsanger.gz" name="clean" from_work_dir="clone_outputs/R1.fq.gz" label="${tool.name} on ${on_string}"> |
110 <filter>data_type['dt_select'] == 'single'</filter> | 108 <filter>data_type['dt_select'] == 'single' and not options_kmer_char['k_dist']</filter> |
111 </data> | 109 </data> |
112 | 110 |
113 <data format="fastqsanger.gz" name="clean_fwd" from_work_dir="clone_outputs/R1.1.fq.gz" label="${tool.name} on ${on_string} Forward reads"> | 111 <data format="fastqsanger.gz" name="clean_fwd" from_work_dir="clone_outputs/R1.1.fq.gz" label="${tool.name} on ${on_string} Forward reads"> |
114 <filter>data_type['dt_select'] == 'pair'</filter> | 112 <filter>data_type['dt_select'] == 'pair' and not options_kmer_char['k_dist']</filter> |
115 </data> | 113 </data> |
116 <data format="fastqsanger.gz" name="clean_rev" from_work_dir="clone_outputs/R2.2.fq.gz" label="${tool.name} on ${on_string} Reverse reads"> | 114 <data format="fastqsanger.gz" name="clean_rev" from_work_dir="clone_outputs/R2.2.fq.gz" label="${tool.name} on ${on_string} Reverse reads"> |
117 <filter>data_type['dt_select'] == 'pair'</filter> | 115 <filter>data_type['dt_select'] == 'pair'</filter> |
116 </data> | |
117 <data format="tabular" name="kfreq" label="${tool.name} on ${on_string} kmer frequencies"> | |
118 <filter>options_kmer_char['write_k_freq']</filter> | |
119 </data> | |
120 <data format="tabular" name="kfreqdist" label="${tool.name} on ${on_string} kmer frequency distribution"> | |
121 <filter>options_kmer_char['k_dist']</filter> | |
118 </data> | 122 </data> |
119 </outputs> | 123 </outputs> |
120 <tests> | 124 <tests> |
121 <test> | 125 <test> |
122 <conditional name="data_type"> | 126 <conditional name="data_type"> |
123 <param name="dt_select" value="single" /> | 127 <param name="dt_select" value="single" /> |
124 <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" /> | 128 <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" /> |
125 </conditional> | 129 </conditional> |
126 <param name="oligo_len_1" value="6" /> | |
127 <output name="clean" compare="sim_size" file="clonefilter/Removed1_0001.1.1.fq.single.gz"/> | 130 <output name="clean" compare="sim_size" file="clonefilter/Removed1_0001.1.1.fq.single.gz"/> |
131 </test> | |
132 <test> | |
133 <conditional name="data_type"> | |
134 <param name="dt_select" value="single" /> | |
135 <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" /> | |
136 </conditional> | |
137 <section name="options_kmer_char"> | |
138 <param name="write_k_freq" value="--write_k_freq" /> | |
139 </section> | |
140 <output name="kfreq" file="kmerfilter/kfreq.tsv"/> | |
128 </test> | 141 </test> |
129 <!--<test> | 142 <!--<test> |
130 <conditional name="data_type"> | 143 <conditional name="data_type"> |
131 <param name="dt_select" value="single" /> | 144 <param name="dt_select" value="single" /> |
132 <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" /> | 145 <param name="fname" ftype="fastqsanger.gz" value="clonefilter/R1_0001.1.fq.gz" /> |