comparison stacks_ustacks.xml @ 0:083d041d085e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit e1c1550e0bd61c88ffead2b1c4f6ab7393052393
author iuc
date Sat, 25 Jun 2016 17:25:22 -0400
parents
children 60ff864ad3b8
comparison
equal deleted inserted replaced
-1:000000000000 0:083d041d085e
1 <tool id="stacks_ustacks" name="Stacks: ustacks" version="@WRAPPER_VERSION@.1">
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 #from os.path import splitext
10 #import re
11
12 mkdir stacks_inputs stacks_outputs
13
14 &&
15
16 #if $sample.ext == "fastqsanger":
17 #set $data_path = splitext($sample.element_identifier)[0]
18 #set $data_path = re.sub(r'\.1$', '', $data_path)
19 #set $data_path = "stacks_inputs/" + $data_path + ".fq"
20 #set inputype = "fastq"
21 #else:
22 #set $data_path = splitext($sample.element_identifier)[0]
23 #set $data_path = re.sub(r'\.1$', '', $data_path)
24 #set $data_path = "stacks_inputs/" + $data_path + ".fa"
25 #set inputype = "fasta"
26 #end if
27
28 ln -s "${sample}" "${data_path}"
29
30 &&
31
32 ustacks
33
34 -p \${GALAXY_SLOTS:-1}
35
36 -f $data_path
37
38 -t $inputype
39
40 ## Batch description
41 -i $sample_id
42
43 -m $m
44 -M $M
45 $R
46 $H
47
48 ## Assembly
49 $assembly_options.r
50 $assembly_options.d
51 --max_locus_stacks $assembly_options.max_locus_stacks
52 #if str($assembly_options.k_len):
53 --k_len $assembly_options.k_len
54 #end if
55
56 #if $gapped.use_gapped:
57 --gapped
58 --max_gaps $gapped.max_gaps
59 --min_aln_len $gapped.min_aln_len
60 #end if
61
62 ## snp_model
63 #if str( $snp_options.select_model.model_type) == "bounded":
64 --model_type bounded
65 --bound_low $snp_options.select_model.bound_low
66 --bound_high $snp_options.select_model.bound_high
67 --alpha $snp_options.select_model.alpha
68 #else if str( $snp_options.select_model.model_type) == "snp":
69 --model_type snp
70 --alpha $snp_options.select_model.alpha
71 #else
72 --model_type fixed
73 --bc_err_freq $bc_err_freq
74 #end if
75
76 -o stacks_outputs
77
78 > ustacks.log 2>&1
79 ]]></command>
80
81 <inputs>
82 <param name="sample" argument="-f" format="fastqsanger,fasta" type="data" label="Input short reads from an individual" />
83
84 <param name="sample_id" argument="-i" type="integer" value="" label="Give a unique numeric ID to this sample"/>
85
86 <param name="m" argument="-m" type="integer" value="2" label="Minimum depth of coverage required to create a stack"/>
87 <param name="M" argument="-M" type="integer" value="2" label="Maximum distance (in nucleotides) allowed between stacks"/>
88 <param name="R" argument="-R" type="boolean" checked="false" truevalue="-R" falsevalue="" label="Retain unused reads" />
89 <param name="H" argument="-H" type="boolean" checked="false" truevalue="-H" falsevalue="" label="Disable calling haplotypes from secondary reads" />
90
91 <section name="assembly_options" title="SNP Model Options (ustacks options)" expanded="True">
92 <param name="r" argument="-r" type="boolean" checked="false" truevalue="-r" falsevalue="" label="Enable the Removal algorithm, to drop highly-repetitive stacks (and nearby errors) from the algorithm" />
93 <param name="d" argument="-d" type="boolean" checked="false" truevalue="-d" falsevalue="" label="Enable the Deleveraging algorithm, used for resolving over merged tags" />
94 <param name="max_locus_stacks" argument="--max_locus_stacks" type="integer" value="3" label="Maximum number of stacks at a single de novo locus"/>
95 <param name="k_len" argument="--k_len" type="integer" value="" optional="true" label="K-mer size for matching between alleles and loci (automatically calculated by default)"/>
96 </section>
97
98 <conditional name="gapped">
99 <param name="use_gapped" argument="--gapped" type="boolean" checked="false" label="Perform gapped alignments between stacks" />
100 <when value="false"></when>
101 <when value="true">
102 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/>
103 <param name="min_aln_len" argument="--min_aln_len" type="float" value="0.8" min="0.0" max="1.0" label="Minimum length of aligned sequence in a gapped alignment"/>
104 </when>
105 </conditional>
106
107 <!-- SNP Model options -->
108 <section name="snp_options" title="SNP Model Options (ustacks options)" expanded="False">
109 <expand macro="snp_options_full"/>
110 </section>
111 </inputs>
112
113 <outputs>
114 <data format="txt" name="output_log" label="ustacks.log with ${tool.name} on ${on_string}" from_work_dir="ustacks.log" />
115
116 <collection name="tabs" type="list" label="Stacks from ${on_string}">
117 <discover_datasets pattern="(?P&lt;name&gt;.+\.tags)\.tsv$" ext="tabular" directory="stacks_outputs" />
118 <discover_datasets pattern="(?P&lt;name&gt;.+\.snps)\.tsv$" ext="tabular" directory="stacks_outputs" />>
119 <discover_datasets pattern="(?P&lt;name&gt;.+\.alleles)\.tsv$" ext="tabular" directory="stacks_outputs" />
120 <discover_datasets pattern="(?P&lt;name&gt;.+\.models)\.tsv$" ext="tabular" directory="stacks_outputs" />
121 </collection>
122 </outputs>
123
124 <tests>
125 <test>
126 <param name="sample" value="demultiplexed/PopA_01.1.fq" ftype="fastqsanger" />
127 <param name="sample_id" value="4" />
128
129 <output name="output_log">
130 <assert_contents>
131 <has_text text="done." />
132 </assert_contents>
133 </output>
134
135 <output_collection name="tabs">
136 <element name="PopA_01.tags">
137 <assert_contents>
138 <has_text text="generated on " />
139 </assert_contents>
140 </element>
141 <element name="PopA_01.snps">
142 <assert_contents>
143 <has_text text="generated on " />
144 </assert_contents>
145 </element>
146 <element name="PopA_01.alleles">
147 <assert_contents>
148 <has_text text="generated on " />
149 </assert_contents>
150 </element>
151 <element name="PopA_01.models">
152 <assert_contents>
153 <has_text text="generated on " />
154 </assert_contents>
155 </element>
156 </output_collection>
157 </test>
158 </tests>
159
160 <help>
161 <![CDATA[
162 .. class:: infomark
163
164 **What it does**
165
166 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
167
168 --------
169
170 **Input files**
171
172 FASTQ, FASTA
173
174 **Output files**
175
176 - XXX.tags.tsv file:
177
178 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
179
180 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.
181
182
183 - XXX.snps.tsv file:
184
185 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
186
187 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
188
189
190 - XXX.alleles.tsv file:
191
192 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
193
194 @STACKS_INFOS@
195 ]]>
196 </help>
197 <expand macro="citation" />
198 </tool>
199