comparison stacks_cstacks.xml @ 0:a1807de3995a 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:05:09 -0400
parents
children 6a7c5e218732
comparison
equal deleted inserted replaced
-1:000000000000 0:a1807de3995a
1 <tool id="stacks_cstacks" name="Stacks: cstacks" version="@WRAPPER_VERSION@.0">
2 <description>build a catalogue of loci</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="stdio"/>
8 <command><![CDATA[
9 #import re
10
11 mkdir stacks_inputs stacks_outputs
12
13 &&
14
15 #set $samples = ""
16 #for $input_file in $input_col:
17 #set $filename = str($input_file.name)
18 #if not filename.endswith('.tsv'):
19 #set $filename = ".tsv"
20 #end if
21 #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename):
22 ln -s "${input_file}" "stacks_inputs/$filename" &&
23
24 #if $filename.endswith('.tags.tsv'):
25 #set samples += " -s \"stacks_inputs/" + $filename[:-9] + "\""
26 #end if
27 #end if
28 #end for
29
30 cstacks
31
32 -p \${GALAXY_SLOTS:-1}
33
34 $samples
35
36 ## Batch description
37 -b 1
38
39 $g
40
41 -n $n
42
43 $include_multiple
44
45 #if $gapped.use_gapped:
46 --gapped
47 --max_gaps $gapped.max_gaps
48 --min_aln_len $gapped.min_aln_len
49 #end if
50
51 -o stacks_outputs
52 ]]></command>
53
54 <inputs>
55 <param name="input_col" format="tabular,txt" type="data_collection" collection_type="list" label="Output from previous Stacks pipeline steps (e.g. denovo_map, refmap, ustacks or pstacks)" />
56
57 <param name="g" argument="-g" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Base catalog matching on genomic location, not sequence identity" />
58
59 <param name="n" argument="-n" type="integer" value="1" label="Number of mismatches allowed between sample tags when building the catalog"/>
60
61 <param name="include_multiple" argument="-m" type="boolean" checked="false" truevalue="-m" falsevalue="" label="Include tags in the catalog that match to more than one entry" />
62
63 <conditional name="gapped">
64 <param name="use_gapped" argument="--gapped" type="boolean" checked="false" label="Perform gapped alignments between stacks" />
65 <when value="false"></when>
66 <when value="true">
67 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/>
68 <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"/>
69 </when>
70 </conditional>
71 </inputs>
72
73 <outputs>
74 <data format="tabular" name="catalogtags" label="Catalog assembled loci (tags) with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/batch_1.catalog.tags.tsv" />
75 <data format="tabular" name="catalogsnps" label="Catalog model calls (snps) with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/batch_1.catalog.snps.tsv" />
76 <data format="tabular" name="catalogalleles" label="Catalog haplotypes (alleles) with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/batch_1.catalog.alleles.tsv" />
77 </outputs>
78
79 <tests>
80 <test>
81 <param name="input_col">
82 <collection type="list">
83 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
84 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" />
85 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" />
86 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" />
87 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" />
88 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" />
89 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" />
90 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" />
91 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" />
92 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" />
93 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" />
94 </collection>
95 </param>
96
97 <!-- catalog -->
98 <output name="catalogtags">
99 <assert_contents>
100 <has_text text="catalog generated on" />
101 </assert_contents>
102 </output>
103 <output name="catalogsnps">
104 <assert_contents>
105 <has_text text="catalog generated on" />
106 </assert_contents>
107 </output>
108 <output name="catalogalleles">
109 <assert_contents>
110 <has_text text="catalog generated on" />
111 </assert_contents>
112 </output>
113 </test>
114
115 <test>
116 <param name="input_col">
117 <collection type="list">
118 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
119 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" />
120 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" />
121 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" />
122 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" />
123 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" />
124 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" />
125 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" />
126 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" />
127 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" />
128 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" />
129 </collection>
130 </param>
131 <param name="gapped|use_gapped" value="true" />
132
133 <!-- catalog -->
134 <output name="catalogtags">
135 <assert_contents>
136 <has_text text="catalog generated on" />
137 </assert_contents>
138 </output>
139 <output name="catalogsnps">
140 <assert_contents>
141 <has_text text="catalog generated on" />
142 </assert_contents>
143 </output>
144 <output name="catalogalleles">
145 <assert_contents>
146 <has_text text="catalog generated on" />
147 </assert_contents>
148 </output>
149 </test>
150 </tests>
151
152 <help>
153 <![CDATA[
154 .. class:: infomark
155
156 **What it does**
157
158 A catalog can be built from any set of samples processed by the ustacks or pstacks programs. It will create a set of consensus loci, merging alleles together. In the case of a genetic cross, a catalog would be constructed from the parents of the cross to create a set of all possible alleles expected in the progeny of the cross.
159
160 --------
161
162 **Input files**
163
164 Output from denovo_map, refmap, ustacks or pstacks
165
166 **Output files**
167
168 - XXX.tags.tsv file:
169
170 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
171
172 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.
173
174
175 - XXX.snps.tsv file:
176
177 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
178
179 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
180
181
182 - XXX.alleles.tsv file:
183
184 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
185
186 @STACKS_INFOS@
187 ]]>
188 </help>
189 <expand macro="citation" />
190 </tool>
191