Mercurial > repos > iuc > stacks_refmap
comparison stacks_refmap.xml @ 8:c209e3f3359b 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:17:01 -0400 |
parents | 12aa3ad29980 |
children | 1ba1185929c1 |
comparison
equal
deleted
inserted
replaced
7:14396ffcb253 | 8:c209e3f3359b |
---|---|
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
8 <command><![CDATA[ | 8 <command><![CDATA[ |
9 #from os.path import splitext | 9 |
10 #import re | 10 @CLEAN_EXT@ |
11 | 11 |
12 #if str( $options_usage.rad_analysis_type ) == "genetic": | 12 #if str( $options_usage.rad_analysis_type ) == "genetic" |
13 #for $input_parent in $options_usage.parent_alignments: | 13 #for $input_parent in $options_usage.parent_alignments |
14 #if $input_parent.is_of_type('sam'): | 14 #if $input_parent.is_of_type('sam') |
15 #set $data_path = splitext($input_parent.element_identifier)[0] | 15 #set $data_path = $clean_ext($input_parent.element_identifier) + ".sam" |
16 #set $data_path = re.sub(r'\.1$', '', $data_path) | 16 #else |
17 #set $data_path = $data_path + ".sam" | 17 #set $data_path = $clean_ext($input_parent.element_identifier) + ".bam" |
18 #else: | |
19 #set $data_path = splitext($input_parent.element_identifier)[0] | |
20 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
21 #set $data_path = $data_path + ".bam" | |
22 #end if | 18 #end if |
23 | 19 |
24 ln -s "${input_parent}" "${data_path}" && | 20 ln -s '${input_parent}' '${data_path}' && |
25 #end for | 21 #end for |
26 | 22 |
27 #for $input_progeny in $options_usage.progeny_alignments: | 23 #for $input_progeny in $options_usage.progeny_alignments |
28 | 24 |
29 #if $input_progeny: | 25 #if $input_progeny |
30 #if $input_progeny.is_of_type('sam'): | 26 #if $input_progeny.is_of_type('sam') |
31 #set $data_path = splitext($input_progeny.element_identifier)[0] | 27 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".sam" |
32 #set $data_path = re.sub(r'\.1$', '', $data_path) | 28 #else |
33 #set $data_path = $data_path + ".sam" | 29 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".bam" |
34 #else: | |
35 #set $data_path = splitext($input_progeny.element_identifier)[0] | |
36 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
37 #set $data_path = $data_path + ".bam" | |
38 #end if | 30 #end if |
39 | 31 |
40 ln -s "${input_progeny}" "${data_path}" && | 32 ln -s '${input_progeny}' '${data_path}' && |
41 #end if | 33 #end if |
42 #end for | 34 #end for |
43 #else: | 35 #else |
44 #for $input_indiv in $options_usage.individual_sample: | 36 #for $input_indiv in $options_usage.individual_sample |
45 | 37 |
46 #if $input_indiv.is_of_type('sam'): | 38 #if $input_indiv.is_of_type('sam') |
47 #set $data_path = splitext($input_indiv.element_identifier)[0] | 39 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".sam" |
48 #set $data_path = re.sub(r'\.1$', '', $data_path) | 40 #else |
49 #set $data_path = $data_path + ".sam" | 41 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".bam" |
50 #else: | |
51 #set $data_path = splitext($input_indiv.element_identifier)[0] | |
52 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
53 #set $data_path = $data_path + ".bam" | |
54 #end if | 42 #end if |
55 | 43 |
56 ln -s "${input_indiv}" "${data_path}" && | 44 ln -s '${input_indiv}' '${data_path}' && |
57 #end for | 45 #end for |
58 #end if | 46 #end if |
59 | 47 |
60 mkdir stacks_outputs | 48 mkdir stacks_outputs |
61 | 49 |
63 | 51 |
64 ref_map.pl | 52 ref_map.pl |
65 | 53 |
66 -T \${GALAXY_SLOTS:-1} | 54 -T \${GALAXY_SLOTS:-1} |
67 | 55 |
68 #if str( $options_usage.rad_analysis_type ) == "genetic": | 56 #if str( $options_usage.rad_analysis_type ) == "genetic" |
69 #for $input_parent in $options_usage.parent_alignments: | 57 #for $input_parent in $options_usage.parent_alignments |
70 #if $input_parent.is_of_type('sam'): | 58 #if $input_parent.is_of_type('sam') |
71 #set $data_path = splitext($input_parent.element_identifier)[0] | 59 #set $data_path = $clean_ext($input_parent.element_identifier) + ".sam" |
72 #set $data_path = re.sub(r'\.1$', '', $data_path) | 60 #else |
73 #set $data_path = $data_path + ".sam" | 61 #set $data_path = $clean_ext($input_parent.element_identifier) + ".bam" |
74 #else: | |
75 #set $data_path = splitext($input_parent.element_identifier)[0] | |
76 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
77 #set $data_path = $data_path + ".bam" | |
78 #end if | 62 #end if |
79 | 63 |
80 -p "${data_path}" | 64 -p '${data_path}' |
81 #end for | 65 #end for |
82 | 66 |
83 -A $options_usage.cross_type | 67 -A $options_usage.cross_type |
84 | 68 |
85 #for $input_progeny in $options_usage.progeny_alignments: | 69 #for $input_progeny in $options_usage.progeny_alignments |
86 #if $input_progeny: | 70 #if $input_progeny |
87 #if $input_progeny.is_of_type('sam'): | 71 #if $input_progeny.is_of_type('sam') |
88 #set $data_path = splitext($input_progeny.element_identifier)[0] | 72 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".sam" |
89 #set $data_path = re.sub(r'\.1$', '', $data_path) | 73 #else |
90 #set $data_path = $data_path + ".sam" | 74 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".bam" |
91 #else: | |
92 #set $data_path = splitext($input_progeny.element_identifier)[0] | |
93 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
94 #set $data_path = $data_path + ".bam" | |
95 #end if | 75 #end if |
96 | 76 |
97 -r "${data_path}" | 77 -r '${data_path}' |
98 #end if | 78 #end if |
99 #end for | 79 #end for |
100 #else: | 80 #else |
101 #for $input_indiv in $options_usage.individual_sample: | 81 #for $input_indiv in $options_usage.individual_sample |
102 | 82 |
103 #if $input_indiv.is_of_type('sam'): | 83 #if $input_indiv.is_of_type('sam') |
104 #set $data_path = splitext($input_indiv.element_identifier)[0] | 84 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".sam" |
105 #set $data_path = re.sub(r'\.1$', '', $data_path) | 85 #else |
106 #set $data_path = $data_path + ".sam" | 86 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".bam" |
107 #else: | |
108 #set $data_path = splitext($input_indiv.element_identifier)[0] | |
109 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
110 #set $data_path = $data_path + ".bam" | |
111 #end if | 87 #end if |
112 | 88 |
113 -s "${data_path}" | 89 -s '${data_path}' |
114 #end for | 90 #end for |
115 -O "$options_usage.popmap" | 91 -O '$options_usage.popmap' |
116 #end if | 92 #end if |
117 | 93 |
118 #if str($m): | 94 #if str($m) |
119 -m $m | 95 -m $m |
120 #end if | 96 #end if |
121 #if str($P): | 97 #if str($P) |
122 -P $P | 98 -P $P |
123 #end if | 99 #end if |
124 | 100 |
125 ## Batch description | 101 ## Batch description |
126 -b 1 | 102 -b 1 |
127 | 103 |
128 ## No SQL recording | 104 ## No SQL recording |
129 -S | 105 -S |
130 | 106 |
131 ## snp_model | 107 ## snp_model |
132 #if str( $snp_options.select_model.model_type) == "bounded": | 108 #if str( $snp_options.select_model.model_type) == "bounded" |
133 --bound_low $snp_options.select_model.bound_low | 109 --bound_low $snp_options.select_model.bound_low |
134 --bound_high $snp_options.select_model.bound_high | 110 --bound_high $snp_options.select_model.bound_high |
135 --alpha $snp_options.select_model.alpha | 111 --alpha $snp_options.select_model.alpha |
136 #else if str( $snp_options.select_model.model_type) == "snp": | 112 #else if str( $snp_options.select_model.model_type) == "snp" |
137 --alpha $snp_options.select_model.alpha | 113 --alpha $snp_options.select_model.alpha |
138 #end if | 114 #end if |
139 | 115 |
140 -o stacks_outputs | 116 -o stacks_outputs |
141 | 117 |
142 #if str( $options_usage.rad_analysis_type ) == "genetic": | 118 #if str( $options_usage.rad_analysis_type ) == "genetic" |
143 @NORM_GENOTYPES_OUTPUT_LIGHT@ | 119 @NORM_GENOTYPES_OUTPUT_LIGHT@ |
144 #end if | 120 #end if |
145 | 121 |
146 ## If input is in bam format, stacks will output gzipped files (no option to control this) | 122 ## If input is in bam format, stacks will output gzipped files (no option to control this) |
147 && if ls stacks_outputs/*.gz > /dev/null 2>&1; then gunzip stacks_outputs/*.gz; fi | 123 && if ls stacks_outputs/*.gz > /dev/null 2>&1; then gunzip stacks_outputs/*.gz; fi |
124 | |
125 && | |
126 | |
127 stacks_summary.py --stacks-prog ref_map.pl --res-dir stacks_outputs --logfile stacks_outputs/ref_map.log --summary stacks_outputs/summary.html | |
128 #if str( $options_usage.rad_analysis_type ) == "population": | |
129 --pop-map '$options_usage.popmap' | |
130 #end if | |
148 ]]></command> | 131 ]]></command> |
149 | 132 |
150 <inputs> | 133 <inputs> |
151 <conditional name="options_usage"> | 134 <conditional name="options_usage"> |
152 <param name="rad_analysis_type" type="select" label="Select your usage"> | 135 <param name="rad_analysis_type" type="select" label="Select your usage"> |
176 </section> | 159 </section> |
177 </inputs> | 160 </inputs> |
178 <outputs> | 161 <outputs> |
179 <data format="txt" name="output_log" label="ref_map.log with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/ref_map.log" /> | 162 <data format="txt" name="output_log" label="ref_map.log with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/ref_map.log" /> |
180 | 163 |
164 <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/summary.html" /> | |
165 | |
181 <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" /> | 166 <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" /> |
182 <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" /> | 167 <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" /> |
183 <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" /> | 168 <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" /> |
184 | 169 |
185 <expand macro="genotypes_output_light"/> | 170 <expand macro="genotypes_output_light"/> |
215 <output name="output_log"> | 200 <output name="output_log"> |
216 <assert_contents> | 201 <assert_contents> |
217 <has_text text="ref_map.pl completed" /> | 202 <has_text text="ref_map.pl completed" /> |
218 </assert_contents> | 203 </assert_contents> |
219 </output> | 204 </output> |
205 <output name="output_summary"> | |
206 <assert_contents> | |
207 <has_text text="Stacks Statistics" /> | |
208 </assert_contents> | |
209 </output> | |
220 | 210 |
221 <!-- catalog --> | 211 <!-- catalog --> |
222 <output name="catalogsnps"> | 212 <output name="catalogsnps"> |
223 <assert_contents> | 213 <assert_contents> |
224 <has_text text="catalog generated" /> | 214 <has_text text="catalog generated" /> |
304 <output name="output_log"> | 294 <output name="output_log"> |
305 <assert_contents> | 295 <assert_contents> |
306 <has_text text="ref_map.pl completed" /> | 296 <has_text text="ref_map.pl completed" /> |
307 </assert_contents> | 297 </assert_contents> |
308 </output> | 298 </output> |
299 <output name="output_summary"> | |
300 <assert_contents> | |
301 <has_text text="Stacks Statistics" /> | |
302 </assert_contents> | |
303 </output> | |
309 | 304 |
310 <!-- catalog --> | 305 <!-- catalog --> |
311 <output name="catalogsnps"> | 306 <output name="catalogsnps"> |
312 <assert_contents> | 307 <assert_contents> |
313 <has_text text="catalog generated" /> | 308 <has_text text="catalog generated" /> |
393 <output name="output_log"> | 388 <output name="output_log"> |
394 <assert_contents> | 389 <assert_contents> |
395 <has_text text="ref_map.pl completed" /> | 390 <has_text text="ref_map.pl completed" /> |
396 </assert_contents> | 391 </assert_contents> |
397 </output> | 392 </output> |
393 <output name="output_summary"> | |
394 <assert_contents> | |
395 <has_text text="Stacks Statistics" /> | |
396 </assert_contents> | |
397 </output> | |
398 | 398 |
399 <!-- catalog --> | 399 <!-- catalog --> |
400 <output name="catalogtags"> | 400 <output name="catalogtags"> |
401 <assert_contents> | 401 <assert_contents> |
402 <has_text text="catalog generated on" /> | 402 <has_text text="catalog generated on" /> |