Mercurial > repos > iuc > stacks_cstacks
comparison stacks_cstacks.xml @ 8:759ba5c7faca draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit dc23703c260d004a28fe24a2a7c00cb4371bc32e
author | iuc |
---|---|
date | Thu, 27 Apr 2017 04:18:23 -0400 |
parents | a62f7e799494 |
children | be3df81c0353 |
comparison
equal
deleted
inserted
replaced
7:c541e62d6c56 | 8:759ba5c7faca |
---|---|
11 mkdir stacks_inputs stacks_outputs | 11 mkdir stacks_inputs stacks_outputs |
12 | 12 |
13 && | 13 && |
14 | 14 |
15 #set $samples = "" | 15 #set $samples = "" |
16 #for $input_file in $input_col: | 16 #for $input_file in $input_col |
17 #set $filename = str($input_file.element_identifier) | 17 #set $filename = str($input_file.element_identifier) |
18 #if not filename.endswith('.tsv'): | 18 #if not filename.endswith('.tsv') |
19 #set $filename = $filename + ".tsv" | 19 #set $filename = $filename + ".tsv" |
20 #end if | 20 #end if |
21 #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename): | 21 #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename) |
22 ln -s "${input_file}" "stacks_inputs/$filename" && | 22 ln -s '${input_file}' 'stacks_inputs/$filename' && |
23 | 23 |
24 #if $filename.endswith('.tags.tsv'): | 24 #if $filename.endswith('.tags.tsv') |
25 #set samples += " -s \"stacks_inputs/" + $filename[:-9] + "\"" | 25 #set samples += " -s 'stacks_inputs/" + $filename[:-9] + "'" |
26 #end if | 26 #end if |
27 #end if | 27 #end if |
28 #end for | 28 #end for |
29 | 29 |
30 cstacks | 30 cstacks |
31 | |
32 -p \${GALAXY_SLOTS:-1} | |
33 | |
34 $samples | |
35 | 31 |
36 ## Batch description | 32 ## Batch description |
37 -b 1 | 33 -b 1 |
38 | 34 |
35 -p \${GALAXY_SLOTS:-1} | |
36 | |
37 #if $popmap | |
38 -P stacks_inputs -M '$popmap' | |
39 #else | |
40 $samples | |
41 -o stacks_outputs | |
42 #end if | |
43 | |
39 $g | 44 $g |
40 | 45 |
41 -n $n | 46 -n $n |
42 | 47 |
43 $include_multiple | 48 $include_multiple |
44 | 49 |
45 #if $gapped.use_gapped: | 50 #if $gapped.use_gapped == "yes" |
46 --gapped | 51 --gapped |
47 --max_gaps $gapped.max_gaps | 52 --max_gaps $gapped.max_gaps |
48 --min_aln_len $gapped.min_aln_len | 53 --min_aln_len $gapped.min_aln_len |
49 #end if | 54 #end if |
50 | 55 |
51 -o stacks_outputs | 56 2>&1 | tee cstacks.log |
52 | 57 |
53 > cstacks.log 2>&1 | 58 #if $popmap |
59 ## When using a popmap, stacks write to the input dir | |
60 && mv stacks_inputs/batch_1.catalog.*.tsv stacks_outputs/ | |
61 #end if | |
62 | |
63 && | |
64 | |
65 stacks_summary.py --stacks-prog cstacks --res-dir stacks_outputs --logfile cstacks.log --summary stacks_outputs/summary.html | |
54 ]]></command> | 66 ]]></command> |
55 | 67 |
56 <inputs> | 68 <inputs> |
57 <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)" /> | 69 <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)" /> |
58 | 70 |
71 <param name="popmap" type="data" format="tabular,txt" label="Population map" help="If set, the catalog will be built from samples listed in this file" optional="true" argument="-M" /> | |
72 | |
59 <param name="g" argument="-g" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Base catalog matching on genomic location, not sequence identity" /> | 73 <param name="g" argument="-g" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Base catalog matching on genomic location, not sequence identity" /> |
60 | 74 |
61 <param name="n" argument="-n" type="integer" value="1" label="Number of mismatches allowed between sample tags when building the catalog"/> | 75 <param name="n" argument="-n" type="integer" value="1" label="Number of mismatches allowed between sample tags when building the catalog"/> |
62 | 76 |
63 <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" /> | 77 <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" /> |
64 | 78 |
65 <conditional name="gapped"> | 79 <conditional name="gapped"> |
66 <param name="use_gapped" argument="--gapped" type="boolean" checked="false" label="Perform gapped alignments between stacks" /> | 80 <param name="use_gapped" argument="--gapped" type="select" label="Perform gapped alignments between stacks"> |
67 <when value="false"></when> | 81 <option value="no" selected="true">No</option> |
68 <when value="true"> | 82 <option value="yes">Yes</option> |
83 </param> | |
84 <when value="no"/> | |
85 <when value="yes"> | |
69 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/> | 86 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/> |
70 <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"/> | 87 <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"/> |
71 </when> | 88 </when> |
72 </conditional> | 89 </conditional> |
73 </inputs> | 90 </inputs> |
74 | 91 |
75 <outputs> | 92 <outputs> |
76 <data format="txt" name="output_log" label="cstacks.log with ${tool.name} on ${on_string}" from_work_dir="cstacks.log" /> | 93 <data format="txt" name="output_log" label="cstacks.log with ${tool.name} on ${on_string}" from_work_dir="cstacks.log" /> |
94 | |
95 <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/summary.html" /> | |
77 | 96 |
78 <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" /> | 97 <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" /> |
79 <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" /> | 98 <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" /> |
80 <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" /> | 99 <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" /> |
81 </outputs> | 100 </outputs> |
101 <output name="output_log"> | 120 <output name="output_log"> |
102 <assert_contents> | 121 <assert_contents> |
103 <has_text text="done." /> | 122 <has_text text="done." /> |
104 </assert_contents> | 123 </assert_contents> |
105 </output> | 124 </output> |
125 <output name="output_summary"> | |
126 <assert_contents> | |
127 <has_text text="Stacks Statistics" /> | |
128 </assert_contents> | |
129 </output> | |
106 | 130 |
107 <!-- catalog --> | 131 <!-- catalog --> |
108 <output name="catalogtags"> | 132 <output name="catalogtags"> |
109 <assert_contents> | 133 <assert_contents> |
110 <has_text text="catalog generated on" /> | 134 <has_text text="catalog generated on" /> |
136 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" /> | 160 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" /> |
137 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> | 161 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> |
138 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> | 162 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> |
139 </collection> | 163 </collection> |
140 </param> | 164 </param> |
141 <param name="gapped|use_gapped" value="true" /> | 165 <param name="gapped|use_gapped" value="yes" /> |
142 | 166 |
143 <output name="output_log"> | 167 <output name="output_log"> |
144 <assert_contents> | 168 <assert_contents> |
145 <has_text text="done." /> | 169 <has_text text="done." /> |
170 </assert_contents> | |
171 </output> | |
172 <output name="output_summary"> | |
173 <assert_contents> | |
174 <has_text text="Stacks Statistics" /> | |
175 </assert_contents> | |
176 </output> | |
177 | |
178 <!-- catalog --> | |
179 <output name="catalogtags"> | |
180 <assert_contents> | |
181 <has_text text="catalog generated on" /> | |
182 </assert_contents> | |
183 </output> | |
184 <output name="catalogsnps"> | |
185 <assert_contents> | |
186 <has_text text="catalog generated on" /> | |
187 </assert_contents> | |
188 </output> | |
189 <output name="catalogalleles"> | |
190 <assert_contents> | |
191 <has_text text="catalog generated on" /> | |
192 </assert_contents> | |
193 </output> | |
194 </test> | |
195 | |
196 <test> | |
197 <param name="input_col"> | |
198 <collection type="list"> | |
199 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" /> | |
200 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" /> | |
201 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" /> | |
202 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" /> | |
203 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" /> | |
204 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" /> | |
205 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" /> | |
206 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" /> | |
207 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" /> | |
208 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> | |
209 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> | |
210 </collection> | |
211 </param> | |
212 | |
213 <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" /> | |
214 | |
215 <output name="output_log"> | |
216 <assert_contents> | |
217 <has_text text="done." /> | |
218 </assert_contents> | |
219 </output> | |
220 <output name="output_summary"> | |
221 <assert_contents> | |
222 <has_text text="Stacks Statistics" /> | |
146 </assert_contents> | 223 </assert_contents> |
147 </output> | 224 </output> |
148 | 225 |
149 <!-- catalog --> | 226 <!-- catalog --> |
150 <output name="catalogtags"> | 227 <output name="catalogtags"> |