comparison stacks_tsv2bam.xml @ 0:1b270fc77c81 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit b395fa36fa826e26085820ba3a9faacaeddcb460
author iuc
date Mon, 01 Jul 2019 10:59:53 -0400
parents
children 8c2617661c49
comparison
equal deleted inserted replaced
-1:000000000000 0:1b270fc77c81
1 <tool id="stacks2_tsv2bam" name="Stacks2: tsv2bam" profile="@PROFILE@" version="@STACKS_VERSION@+galaxy@WRAPPER_VERSION@">
2 <description>Sort reads by RAD locus</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_cmd"/>
8 <command detect_errors="aggressive"><![CDATA[
9 @FASTQ_INPUT_FUNCTIONS@
10
11 mkdir stacks_inputs stacks_outputs &&
12
13 @LINK_STACKS_INPUT@
14 @LINK_CAT_INPUT@
15 @LINK_MATCHES_INPUT@
16
17 ## link fastq files into stacks_inputs/
18 #set $paired_reads=False
19 #for $sample in $input_type.fqinputs:
20 #if not $sample:
21 #continue
22 #end if
23 #set $paired_reads=True
24 #set ($link_cmd, $data_path, $name, $inputype) = $fastq_input_foo($sample, "reverse", ".2")
25 $link_cmd
26 #end for
27
28 tsv2bam
29 -P stacks_inputs
30 #if $popmap
31 -M '$popmap'
32 #else
33 #for $sample in $samples
34 -s '$sample'
35 #end for
36 #end if
37 #if $paired_reads
38 --pe-reads-dir stacks_inputs
39 #end if
40 -t \${GALAXY_SLOTS:-1}
41 ## tsv2bam writes to stdout and creates a log file
42 ## - make stdout stderr
43 ## - move the additional log file
44 2>&1
45
46 #if $output_log
47 && mv stacks_inputs/tsv2bam.log $output_log
48 #end if
49 && mv stacks_inputs/*matches.bam stacks_outputs
50 ]]></command>
51
52 <inputs>
53 <expand macro="input_stacks_macro"/>
54 <expand macro="input_cat_macro"/>
55 <expand macro="input_matches_macro"/>
56 <!-- TODO add BAM? -->
57 <expand macro="fastq_input" fastq_optional="true" se_option="reverse reads" help="Paired end data or reverse reads. If a paired list is provided only the reverse reads are used in tsv2bam. Leave selection empty if you analyse single end data."/>
58 <param name="popmap" type="data" format="tabular,txt" label="Population map" help="If set, matching will be done only for samples listed in this file" optional="true" argument="-M" />
59 <expand macro="in_log"/>
60 </inputs>
61
62 <outputs>
63 <expand macro="out_log"/>
64 <expand macro="tsv2bam_outputs_macro"/>
65 </outputs>
66
67 <tests>
68 <!-- test wo paired end data -->
69 <test>
70 <param name="input_cat">
71 <collection type="list">
72 <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
73 <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
74 <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
75 </collection>
76 </param>
77 <param name="input_stacks">
78 <collection type="list">
79 <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
80 <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
81 <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
82 <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
83 <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
84 <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
85 </collection>
86 </param>
87 <param name="input_matches">
88 <collection type="list">
89 <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" />
90 <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" />
91 </collection>
92 </param>
93 <param name="add_log" value="yes" />
94 <output name="output_log" ftype="txt" file="tsv2bam/tsv2bam.log" lines_diff="14"/>
95 <output_collection name="bams" type="list" count="2">
96 <element name="PopA_01.matches" file="tsv2bam/PopA_01.matches.bam" ftype="bam"/>
97 <element name="PopA_02.matches" file="tsv2bam/PopA_02.matches.bam" ftype="bam"/>
98 </output_collection>
99 </test>
100 <!-- test w popmap, w reverse reads as multiple selection -->
101 <test>
102 <param name="input_cat">
103 <collection type="list">
104 <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
105 <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
106 <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
107 </collection>
108 </param>
109 <param name="input_stacks">
110 <collection type="list">
111 <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
112 <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
113 <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
114 <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
115 <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
116 <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
117 </collection>
118 </param>
119 <param name="input_matches">
120 <collection type="list">
121 <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" />
122 <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" />
123 </collection>
124 </param>
125 <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" />
126 <param name="input_type|input_type_select" value="single"/>
127 <param name="input_type|fqinputs" value="demultiplexed/PopA_01.2.fq,demultiplexed/PopA_02.2.fq" ftype="fastqsanger" />
128 <param name="add_log" value="yes" />
129 <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output>
130 <output_collection name="bams" type="list" count="2"/>
131 </test>
132 <!-- test w reverse reads as list -->
133 <test>
134 <param name="input_cat">
135 <collection type="list">
136 <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
137 <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
138 <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
139 </collection>
140 </param>
141 <param name="input_stacks">
142 <collection type="list">
143 <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
144 <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
145 <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
146 <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
147 <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
148 <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
149 </collection>
150 </param>
151 <param name="input_matches">
152 <collection type="list">
153 <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" />
154 <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" />
155 </collection>
156 </param>
157 <param name="input_type|input_type_select" value="paired"/>
158 <param name="input_type|fqinputs">
159 <collection type="list">
160 <element name="PopA_01" value="demultiplexed/PopA_01.2.fq" ftype="fastqsanger" />
161 <element name="PopA_02" value="demultiplexed/PopA_02.2.fq" ftype="fastqsanger"/>
162 </collection>
163 </param>
164 <param name="add_log" value="yes" />
165 <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output>
166 <output_collection name="bams" type="list" count="2"/>
167 </test>
168 <!-- test w paired reads as paired dataset list -->
169 <test>
170 <param name="input_cat">
171 <collection type="list">
172 <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
173 <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
174 <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
175 </collection>
176 </param>
177 <param name="input_stacks">
178 <collection type="list">
179 <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
180 <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
181 <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
182 <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
183 <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
184 <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
185 </collection>
186 </param>
187 <param name="input_matches">
188 <collection type="list">
189 <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" />
190 <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" />
191 </collection>
192 </param>
193 <param name="input_type|input_type_select" value="paired"/>
194 <param name="input_type|fqinputs">
195 <collection type="list:paired">
196 <element name="PopA_01">
197 <collection type="paired">
198 <element name="forward" value="demultiplexed/PopA_01.1.fq" ftype="fastqsanger" />
199 <element name="reverse" value="demultiplexed/PopA_01.2.fq" ftype="fastqsanger"/>
200 </collection>
201 </element>
202 <element name="PopA_02">
203 <collection type="paired">
204 <element name="forward" value="demultiplexed/PopA_02.1.fq" ftype="fastqsanger" />
205 <element name="reverse" value="demultiplexed/PopA_02.2.fq" ftype="fastqsanger"/>
206 </collection>
207 </element>
208 </collection>
209 </param>
210 <param name="add_log" value="yes" />
211 <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output>
212 <output_collection name="bams" type="list" count="2"/>
213 </test>
214 </tests>
215
216 <help>
217 <![CDATA[
218 .. class:: infomark
219
220 **What it does**
221
222 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
223
224 --------
225
226 **Input files**
227
228 FASTQ, FASTA
229
230 **Output files**
231
232 - XXX.tags.tsv file:
233
234 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
235
236 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.
237
238
239 - XXX.snps.tsv file:
240
241 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
242
243 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
244
245
246 - XXX.alleles.tsv file:
247
248 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
249
250 @STACKS_INFOS@
251 ]]>
252 </help>
253 <expand macro="citation" />
254 </tool>