comparison stacks_sstacks.xml @ 0:17469af4e858 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:02:56 -0400
parents
children 344cfdb7dd48
comparison
equal deleted inserted replaced
-1:000000000000 0:17469af4e858
1 <tool id="stacks_sstacks" name="Stacks: sstacks" version="@WRAPPER_VERSION@.0">
2 <description>match stacks to a catalog</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 $catalog = ""
16 #for $input_file in $input_cat:
17 #set $filename = str($input_file.name)
18 #if not filename.endswith('.tsv'):
19 #set $filename = ".tsv"
20 #end if
21 #if re.search('catalog\.[a-z]+(\.tsv)?$', $filename):
22 ln -s "${input_file}" "stacks_inputs/$filename" &&
23
24 #if $filename.endswith('.tags.tsv'):
25 #set catalog += " -c \"stacks_inputs/"+$filename[:-17] + "\""
26 #end if
27 #end if
28 #end for
29
30 #set $samples = ""
31 #for $input_file in $input_tags:
32 #set $filename = str($input_file.name)
33 #if not filename.endswith('.tsv'):
34 #set $filename = ".tsv"
35 #end if
36 #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename):
37 ln -s "${input_file}" "stacks_inputs/$filename" &&
38
39 #if $filename.endswith('.tags.tsv'):
40 #set samples += " -s \"stacks_inputs/"+$filename[:-9] + "\""
41 #end if
42 #end if
43 #end for
44
45 sstacks
46
47 -p \${GALAXY_SLOTS:-1}
48
49 $catalog
50
51 $samples
52
53 ## Batch description
54 -b 1
55
56 $g
57
58 $check_haplo
59
60 $gapped
61
62 -o stacks_outputs
63 ]]></command>
64
65 <inputs>
66 <param name="input_cat" format="tabular,txt" type="data_collection" collection_type="list" label="Catalog files" help="output from a previous Stacks pipeline steps e.g. denovo_map, refmap or cstacks" />
67 <param name="input_tags" format="tabular,txt" type="data_collection" collection_type="list" label="Samples stacks" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or ustacks/pstacks" />
68
69 <param name="g" argument="-g" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Base catalog matching on genomic location, not sequence identity" />
70
71 <param name="check_haplo" argument="-x" type="boolean" checked="false" truevalue="-x" falsevalue="" label="Don't verify haplotype of matching locus" />
72
73 <param name="gapped" argument="--gapped" type="boolean" checked="false" truevalue="--gapped" falsevalue="" label="Perform gapped alignments between stacks" />
74 </inputs>
75
76 <outputs>
77 <collection name="matches" type="list" label="Matches to the catalog on ${on_string}">
78 <discover_datasets pattern="(?P&lt;name&gt;.+\.matches)\.tsv" ext="tabular" directory="stacks_outputs" />
79 </collection>
80 </outputs>
81
82 <tests>
83 <test>
84 <param name="input_cat">
85 <collection type="list">
86 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
87 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" />
88 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" />
89 </collection>
90 </param>
91 <param name="input_tags">
92 <collection type="list">
93 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" />
94 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" />
95 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" />
96 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" />
97 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" />
98 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" />
99 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" />
100 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" />
101 </collection>
102 </param>
103
104 <output_collection name="matches">
105 <element name="PopA_01.matches">
106 <assert_contents>
107 <has_text text="generated on " />
108 </assert_contents>
109 </element>
110 </output_collection>
111 </test>
112
113 <test>
114 <param name="input_cat">
115 <collection type="list">
116 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
117 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" />
118 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" />
119 </collection>
120 </param>
121 <param name="input_tags">
122 <collection type="list">
123 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" />
124 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" />
125 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" />
126 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" />
127 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" />
128 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" />
129 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" />
130 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" />
131 </collection>
132 </param>
133 <param name="gapped" value="true" />
134 <param name="check_haplo" value="true" />
135
136 <output_collection name="matches">
137 <element name="PopA_01.matches">
138 <assert_contents>
139 <has_text text="generated on " />
140 </assert_contents>
141 </element>
142 </output_collection>
143 </test>
144 </tests>
145
146 <help>
147 <![CDATA[
148 .. class:: infomark
149
150 **What it does**
151
152 Sets of stacks constructed by the ustacks or pstacks programs can be searched against a catalog produced by cstacks. In the case of a genetic map, stacks from the progeny would be matched against the catalog to determine which progeny contain which parental alleles.
153
154 --------
155
156 **Input files**
157
158 Output from denovo_map, refmap or cstacks/ustacks/pstacks
159
160 **Output files**
161
162 - XXX.tags.tsv file:
163
164 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
165
166 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.
167
168
169 - XXX.snps.tsv file:
170
171 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
172
173 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
174
175
176 - XXX.alleles.tsv file:
177
178 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
179
180 - XXX.matches.tsv file:
181
182 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
183
184 Notes: Each line in this file records a match between a catalog locus and a locus in an individual, for a particular haplotype. The Batch ID plus the Catalog ID together represent a unique locus in the entire population, while the Sample ID and the Stack ID together represent a unique locus in an individual sample.
185
186 @STACKS_INFOS@
187 ]]>
188 </help>
189 <expand macro="citation" />
190 </tool>
191