comparison stacks_ustacks.xml @ 0:e7aacfd67288 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit 98327d2948ae1ccb5aef5db9ab88605fd74a0de7-dirty
author matthias
date Thu, 29 Nov 2018 11:36:12 -0500
parents
children 784278062e27
comparison
equal deleted inserted replaced
-1:000000000000 0:e7aacfd67288
1 <tool id="stacks2_ustacks" name="Stacks2: ustacks" version="@WRAPPER_VERSION@">
2 <description>align short reads into stacks</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="stdio"/>
8 <command><![CDATA[
9 @CLEAN_EXT@
10
11 mkdir stacks_inputs stacks_outputs
12
13 &&
14
15 #set $ID=1
16 #for $sample in $input_type.samples
17 #set $read_direction="forward"
18 @FASTQ_INPUT@
19
20 ustacks
21
22 -f $data_path
23 -i $ID
24 --name $name
25 -m $m
26 -M $M
27 #if $N
28 -N $N
29 #end if
30 -p \${GALAXY_SLOTS:-1}
31 -t $inputype
32 $R
33 $H
34
35 ## Assembly
36 $assembly_options.keep_high_cov
37 --high_cov_thres $assembly_options.high_cov_thres
38 $assembly_options.d
39 --max_locus_stacks $assembly_options.max_locus_stacks
40 #if str($assembly_options.k_len)
41 --k_len $assembly_options.k_len
42 #end if
43
44 @GAP_OPTIONS@
45
46 ## snp_model
47 #if str( $snp_options.select_model.model_type) == "bounded"
48 --model_type bounded
49 --bound_low $snp_options.select_model.bound_low
50 --bound_high $snp_options.select_model.bound_high
51 --alpha $snp_options.select_model.alpha
52 #else if str( $snp_options.select_model.model_type) == "snp"
53 --model_type snp
54 --alpha $snp_options.select_model.alpha
55 #else
56 --model_type fixed
57 --bc_err_freq $bc_err_freq
58 #end if
59
60 -o stacks_outputs
61
62 @TEE_APPEND_LOG@
63
64 #set $ID=$ID+1
65 #end for
66 @CAT_LOG_TO_STDERR@ &&
67 ## If input is in gz format, stacks will output gzipped files (no option to control this)
68 #if $inputype.startswith('gz')
69 gunzip stacks_outputs/*.gz
70 #else
71 true
72 #end if
73 ]]></command>
74
75 <inputs>
76 <expand macro="fastq_input_macro"/>
77
78 <conditional name="input_type">
79 <param name="input_type_selector" type="select" label="Short read data from individuals" help="Single end data or forward reads. If a paired list is provided only the forward reads are used in ustacks">
80 <option value="manual" selected="true">single end or forward reads</option>
81 <option value="list">(paired) data set list</option>
82 </param>
83 <when value="manual">
84 <param name="samples" argument="-f" format="fastqsanger,fastqsanger.gz,fasta,fasta.gz" type="data" label="Reads" multiple="true"/>
85 </when>
86 <when value="list">
87 <param name="samples" argument="-f" type="data_collection" collection_type="list,list:paired" format="fastqsanger,fastqsanger.gz,fasta,fasta.gz" label="List for forward reads or read pairs"/>
88 </when>
89 </conditional>
90 <param argument="-m" type="integer" value="3" label="Minimum depth of coverage required to create a stack"/>
91 <param argument="-M" type="integer" value="2" label="Maximum distance (in nucleotides) allowed between stacks"/>
92 <param argument="-N" type="integer" value="" optional="true" label="Maximum distance allowed to align secondary reads to primary stacks" help="(default: M + 2)"/>
93 <param argument="-R" type="boolean" checked="false" truevalue="-R" falsevalue="" label="Retain unused reads" />
94 <param argument="-H" type="boolean" checked="false" truevalue="-H" falsevalue="" label="Disable calling haplotypes from secondary reads" />
95 <section name="assembly_options" title="SNP Model Options (ustacks options)" expanded="True">
96 <param argument="--keep_high_cov" type="boolean" checked="false" truevalue="--keep_high_cov" falsevalue="" label="Disable the algorithm that removes highly-repetitive stacks and nearby errors. " />
97 <param argument="-d" type="boolean" checked="false" truevalue="-d" falsevalue="" label="Enable the Deleveraging algorithm, used for resolving over merged tags" />
98 <param argument="--high_cov_thres" type="float" min="0.0" value="3.0" label="highly-repetitive stacks threshold" help="in standard deviation units"/>
99 <param argument="--max_locus_stacks" type="integer" value="3" label="Maximum number of stacks at a single de novo locus"/>
100 <param argument="--k_len" type="integer" value="" min="7" max="31" optional="true" label="K-mer size for matching between alleles and loci (automatically calculated by default)"/>
101 </section>
102 <expand macro="gap_options"/>
103
104 <!-- SNP Model options -->
105 <section name="snp_options" title="SNP Model Options (ustacks options)" expanded="False">
106 <expand macro="snp_options_full"/>
107 </section>
108 <expand macro="in_log"/>
109 </inputs>
110
111 <outputs>
112 <expand macro="out_log"/>
113 <expand macro="ustacks_outputs_macro"/>
114 </outputs>
115
116 <tests>
117 <!-- manual selected list of elements + default args, test for file equality -->
118 <test>
119 <param name="input_type|input_type_selector" value="manual"/>
120 <param name="input_type|samples" value="demultiplexed/PopA_01.1.fq,demultiplexed/PopA_02.1.fq" ftype="fastqsanger" />
121 <param name="add_log" value="yes" />
122 <output name="output_log" ftype="txt" file="ustacks/ustacks.log" lines_diff="2"/>
123 <output_collection name="tabs" type="list" count="6">
124 <element name="PopA_01.tags" ftype="tabular" file="ustacks/PopA_01.tags.tsv" lines_diff="2"/>
125 <element name="PopA_01.snps" ftype="tabular" file="ustacks/PopA_01.snps.tsv" lines_diff="2"/>
126 <element name="PopA_01.alleles" ftype="tabular" file="ustacks/PopA_01.alleles.tsv" lines_diff="2"/>
127 <element name="PopA_02.tags" ftype="tabular" file="ustacks/PopA_02.tags.tsv" lines_diff="2"/>
128 <element name="PopA_02.snps" ftype="tabular" file="ustacks/PopA_02.snps.tsv" lines_diff="2"/>
129 <element name="PopA_02.alleles" ftype="tabular" file="ustacks/PopA_02.alleles.tsv" lines_diff="2"/>
130 </output_collection>
131 </test>
132 <!-- manual selected list of elements + non-default short args, test for file presence -->
133 <test>
134 <param name="input_type|input_type_selector" value="manual"/>
135 <param name="input_type|samples" value="demultiplexed/PopA_01.1.fq,demultiplexed/PopA_02.1.fq" ftype="fastqsanger" />
136 <param name="-m" value="2" />
137 <param name="-M" value="3" />
138 <param name="-N" value="4"/>
139 <param name="-R" value="-R" />
140 <param name="-H" value="-H" />
141 <param name="add_log" value="yes" />
142 <assert_command>
143 <has_text text="-m 2" />
144 <has_text text="-M 3" />
145 <has_text text="-N 5" />
146 <has_text text="-R" />
147 <has_text text="-H" />
148 </assert_command>
149 <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output>
150 <output_collection name="tabs" count="6">
151 <element name="PopA_01.tags"><assert_contents><has_text text="generated on " /></assert_contents></element>
152 <element name="PopA_01.snps"><assert_contents><has_text text="generated on " /></assert_contents></element>
153 <element name="PopA_01.alleles"><assert_contents><has_text text="generated on " /></assert_contents></element>
154 <element name="PopA_02.tags"><assert_contents><has_text text="generated on " /></assert_contents></element>
155 <element name="PopA_02.snps"><assert_contents><has_text text="generated on " /></assert_contents></element>
156 <element name="PopA_02.alleles"><assert_contents><has_text text="generated on " /></assert_contents></element>
157 </output_collection>
158 </test>
159 <!-- paired list, non-default model options, disabled gapped alignment, test for file presence -->
160 <test>
161 <param name="input_type|input_type_selector" value="list"/>
162 <param name="input_type|samples">
163 <collection type="list:paired">
164 <element name="PopA_01">
165 <collection type="paired">
166 <element name="forward" value="demultiplexed/PopA_01.1.fq" ftype="fastqsanger" />
167 <element name="reverse" value="demultiplexed/PopA_01.2.fq" ftype="fastqsanger"/>
168 </collection>
169 </element>
170 <element name="PopA_02">
171 <collection type="paired">
172 <element name="forward" value="demultiplexed/PopA_02.1.fq" ftype="fastqsanger" />
173 <element name="reverse" value="demultiplexed/PopA_02.2.fq" ftype="fastqsanger"/>
174 </collection>
175 </element>
176 </collection>
177 </param>
178 <conditional name="select_model">
179 <param name="model_type" value="snp"/>
180 <param name="alpha" value="0.1"/>
181 <param name="bound_low" value="0.1"/>
182 <param name="bound_high" value="0.5"/>
183 <param name="bc_err_freq" value="0.1"/>
184 </conditional>
185 <param name="gapped|use_gapped" value="no" />
186 <param name="add_log" value="yes" />
187 <assert_command>
188 <has_text text="--model_type bounded" />
189 <has_text text="--alpha 0.1" />
190 <has_text text="--bound_low 0.1" />
191 <has_text text="--bound_high 0.5" />
192 <has_text text="--bc_err_freq 0.1" />
193 <has_text text="--disable-gapped" />
194 </assert_command>
195 <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output>
196 <output_collection name="tabs" count="6">
197 <element name="PopA_01.tags"><assert_contents><has_text text="generated on " /></assert_contents></element>
198 <element name="PopA_01.snps"><assert_contents><has_text text="generated on " /></assert_contents></element>
199 <element name="PopA_01.alleles"><assert_contents><has_text text="generated on " /></assert_contents></element>
200 <element name="PopA_02.tags"><assert_contents><has_text text="generated on " /></assert_contents></element>
201 <element name="PopA_02.snps"><assert_contents><has_text text="generated on " /></assert_contents></element>
202 <element name="PopA_02.alleles"><assert_contents><has_text text="generated on " /></assert_contents></element>
203 </output_collection>
204 </test>
205 <!-- list of fwd reads, nondefault assembly and gapped alignment options, test for file presence -->
206 <test>
207 <param name="input_type|input_type_selector" value="list"/>
208 <param name="input_type|samples">
209 <collection type="list">
210 <element name="PopA_01" value="demultiplexed/PopA_01.1.fq" ftype="fastqsanger" />
211 <element name="PopA_02" value="demultiplexed/PopA_02.1.fq" ftype="fastqsanger"/>
212 </collection>
213 </param>
214 <param name="assembly_options|keep_high_cov" value="--keep-high-cov"/>
215 <param name="assembly_options|d" value="-d" />
216 <param name="assembly_options|high_cov_thres" value="2.0"/>
217 <param name="assembly_options|max_locus_stacks" value="4" />
218 <param name="assembly_options|k_len" value="12"/>
219 <param name="gapped|use_gapped" value="yes" />
220 <param name="gapped|max_gaps" value="3" />
221 <param name="gapped|min_aln_len" value="0.7"/>
222 <param name="add_log" value="yes" />
223 <assert_command>
224 <has_text text="--keep_high_cov" />
225 <has_text text="-d" />
226 <has_text text="--high_cov_thres 2.0" />
227 <has_text text="--max_locus_stacks 4" />
228 <has_text text="--k_len 12" />
229 <has_text text="--max_gaps 3" />
230 <has_text text="--min_aln_len 3" />
231 </assert_command>
232 <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output>
233 <output_collection name="tabs" count="6">
234 <element name="PopA_01.tags"><assert_contents><has_text text="generated on " /></assert_contents></element>
235 <element name="PopA_01.snps"><assert_contents><has_text text="generated on " /></assert_contents></element>
236 <element name="PopA_01.alleles"><assert_contents><has_text text="generated on " /></assert_contents></element>
237 <element name="PopA_02.tags"><assert_contents><has_text text="generated on " /></assert_contents></element>
238 <element name="PopA_02.snps"><assert_contents><has_text text="generated on " /></assert_contents></element>
239 <element name="PopA_02.alleles"><assert_contents><has_text text="generated on " /></assert_contents></element>
240 </output_collection>
241 </test>
242 </tests>
243
244 <help>
245 <![CDATA[
246 .. class:: infomark
247
248 **What it does**
249
250 The unique stacks program will take as input a set of short-read sequences and align them into exactly-matching stacks. Comparing the stacks it will form a set of loci and detect SNPs at each locus using a maximum likelihood framework
251
252 --------
253
254 **Input files**
255
256 One or more FASTQ, FASTA files. Can be given by selecting them manually, as data set list, or paired data set list. Note, for the latter ustacks only uses the forward reads -- reverse reads are incorporated in tsv2bam.
257
258 **Output files**
259
260 - XXX.tags.tsv file:
261
262 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
263
264 Notes: For the tags file, each stack will start in the file with a consensus sequence for the entire stack followed by the flags for that stack. Then, each individual read that was merged into that stack will follow. The next stack will start with another consensus sequence.
265
266
267 - XXX.snps.tsv file:
268
269 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
270
271 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
272
273
274 - XXX.alleles.tsv file:
275
276 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
277
278 @STACKS_INFOS@
279 ]]>
280 </help>
281 <expand macro="citation" />
282 </tool>