comparison stacks_ustacks.xml @ 0:7c5004f8cd49 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit f3a59c91c231cc1582479109e776d05602b7f24d-dirty
author iuc
date Tue, 14 Jun 2016 14:06:23 -0400
parents
children 216c469422d2
comparison
equal deleted inserted replaced
-1:000000000000 0:7c5004f8cd49
1 <tool id="stacks_ustacks" name="Stacks: ustacks" version="@WRAPPER_VERSION@.0">
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.name)[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.name)[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 ]]></command>
78
79 <inputs>
80 <param name="sample" argument="-f" format="fastqsanger,fasta" type="data" label="Input short reads from an individual" />
81
82 <param name="sample_id" argument="-i" type="integer" value="" label="Give a unique numeric ID to this sample"/>
83
84 <param name="m" argument="-m" type="integer" value="2" label="Minimum depth of coverage required to create a stack"/>
85 <param name="M" argument="-M" type="integer" value="2" label="Maximum distance (in nucleotides) allowed between stacks"/>
86 <param name="R" argument="-R" type="boolean" checked="false" truevalue="-R" falsevalue="" label="Retain unused reads" />
87 <param name="H" argument="-H" type="boolean" checked="false" truevalue="-H" falsevalue="" label="Disable calling haplotypes from secondary reads" />
88
89 <section name="assembly_options" title="SNP Model Options (ustacks options)" expanded="True">
90 <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" />
91 <param name="d" argument="-d" type="boolean" checked="false" truevalue="-d" falsevalue="" label="Enable the Deleveraging algorithm, used for resolving over merged tags" />
92 <param name="max_locus_stacks" argument="--max_locus_stacks" type="integer" value="3" label="Maximum number of stacks at a single de novo locus"/>
93 <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)"/>
94 </section>
95
96 <conditional name="gapped">
97 <param name="use_gapped" argument="--gapped" type="boolean" checked="false" label="Perform gapped alignments between stacks" />
98 <when value="false"></when>
99 <when value="true">
100 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/>
101 <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"/>
102 </when>
103 </conditional>
104
105 <!-- SNP Model options -->
106 <section name="snp_options" title="SNP Model Options (ustacks options)" expanded="False">
107 <expand macro="snp_options_full"/>
108 </section>
109 </inputs>
110
111 <outputs>
112 <collection name="tabs" type="list" label="Stacks from ${on_string}">
113 <discover_datasets pattern="(?P&lt;name&gt;.+\.tags)\.tsv" ext="tabular" directory="stacks_outputs" />
114 <discover_datasets pattern="(?P&lt;name&gt;.+\.snps)\.tsv" ext="tabular" directory="stacks_outputs" />>
115 <discover_datasets pattern="(?P&lt;name&gt;.+\.alleles)\.tsv" ext="tabular" directory="stacks_outputs" />
116 <discover_datasets pattern="(?P&lt;name&gt;.+\.models)\.tsv" ext="tabular" directory="stacks_outputs" />
117 </collection>
118 </outputs>
119
120 <tests>
121 <test>
122 <param name="sample" value="demultiplexed/PopA_01.1.fq" ftype="fastqsanger" />
123 <param name="sample_id" value="4" />
124
125 <output_collection name="tabs">
126 <element name="PopA_01.tags">
127 <assert_contents>
128 <has_text text="generated on " />
129 </assert_contents>
130 </element>
131 <element name="PopA_01.snps">
132 <assert_contents>
133 <has_text text="generated on " />
134 </assert_contents>
135 </element>
136 <element name="PopA_01.alleles">
137 <assert_contents>
138 <has_text text="generated on " />
139 </assert_contents>
140 </element>
141 <element name="PopA_01.models">
142 <assert_contents>
143 <has_text text="generated on " />
144 </assert_contents>
145 </element>
146 </output_collection>
147 </test>
148 </tests>
149
150 <help>
151 <![CDATA[
152 .. class:: infomark
153
154 **What it does**
155
156 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
157
158 --------
159
160 **Input files**
161
162 FASTQ, FASTA
163
164 **Output files**
165
166 - XXX.tags.tsv file:
167
168 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
169
170 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.
171
172
173 - XXX.snps.tsv file:
174
175 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
176
177 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
178
179
180 - XXX.alleles.tsv file:
181
182 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
183
184 @STACKS_INFOS@
185 ]]>
186 </help>
187 <expand macro="citation" />
188 </tool>
189