Mercurial > repos > iuc > stacks_denovomap
comparison stacks_denovomap.xml @ 8:39d2b6c1c030 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:51 -0400 |
parents | 34000c653ae5 |
children | 9f9d39f582f3 |
comparison
equal
deleted
inserted
replaced
7:2505774ded94 | 8:39d2b6c1c030 |
---|---|
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_sequences: | 13 #for $input_parent in $options_usage.parent_sequences |
14 | 14 #if $input_parent.is_of_type('fastqsanger') |
15 #if $input_parent.is_of_type('fastqsanger'): | 15 #set $data_path = $clean_ext($input_parent.element_identifier) + ".fq" |
16 #set $data_path = splitext($input_parent.element_identifier)[0] | 16 #else if $input_parent.is_of_type('fastqsanger.gz') |
17 #set $data_path = re.sub(r'\.1$', '', $data_path) | 17 #set $data_path = $clean_ext($input_parent.element_identifier) + ".fq.gz" |
18 #set $data_path = $data_path + ".fq" | 18 #else |
19 #else: | 19 #set $data_path = $clean_ext($input_parent.element_identifier) + ".fa" |
20 #set $data_path = splitext($input_parent.element_identifier)[0] | |
21 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
22 #set $data_path = $data_path + ".fa" | |
23 #end if | 20 #end if |
24 | 21 |
25 ln -s "${input_parent}" "${data_path}" && | 22 ln -s '${input_parent}' '${data_path}' && |
26 #end for | 23 #end for |
27 | 24 |
28 #for $input_progeny in $options_usage.progeny_sequences: | 25 #for $input_progeny in $options_usage.progeny_sequences |
29 #if $input_progeny: | 26 #if $input_progeny |
30 #if $input_progeny.is_of_type('fastqsanger'): | 27 #if $input_progeny.is_of_type('fastqsanger') |
31 #set $data_path = splitext($input_progeny.element_identifier)[0] | 28 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".fq" |
32 #set $data_path = re.sub(r'\.1$', '', $data_path) | 29 #else if $input_progeny.is_of_type('fastqsanger.gz') |
33 #set $data_path = $data_path + ".fq" | 30 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".fq.gz" |
34 #else: | 31 #else |
35 #set $data_path = splitext($input_progeny.element_identifier)[0] | 32 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".fa" |
36 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
37 #set $data_path = $data_path + ".fa" | |
38 #end if | 33 #end if |
39 | 34 |
40 ln -s "${input_progeny}" "${data_path}" && | 35 ln -s '${input_progeny}' '${data_path}' && |
41 #end if | 36 #end if |
42 #end for | 37 #end for |
43 #else: | 38 #else |
44 #for $input_indiv in $options_usage.individual_sample: | 39 #for $input_indiv in $options_usage.individual_sample |
45 | 40 |
46 #if $input_indiv.is_of_type('fastqsanger'): | 41 #if $input_indiv.is_of_type('fastqsanger') |
47 #set $data_path = splitext($input_indiv.element_identifier)[0] | 42 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".fq" |
48 #set $data_path = re.sub(r'\.1$', '', $data_path) | 43 #else if $input_indiv.is_of_type('fastqsanger.gz') |
49 #set $data_path = $data_path + ".fq" | 44 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".fq.gz" |
50 #else: | 45 #else |
51 #set $data_path = splitext($input_indiv.element_identifier)[0] | 46 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".fa" |
52 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
53 #set $data_path = $data_path + ".fa" | |
54 #end if | 47 #end if |
55 | 48 |
56 ln -s "${input_indiv}" "${data_path}" && | 49 ln -s '${input_indiv}' '${data_path}' && |
57 #end for | 50 #end for |
58 #end if | 51 #end if |
59 | 52 |
60 mkdir stacks_outputs | 53 mkdir stacks_outputs |
61 | 54 |
63 | 56 |
64 denovo_map.pl | 57 denovo_map.pl |
65 | 58 |
66 -T \${GALAXY_SLOTS:-1} | 59 -T \${GALAXY_SLOTS:-1} |
67 | 60 |
68 #if str( $options_usage.rad_analysis_type ) == "genetic": | 61 #if str( $options_usage.rad_analysis_type ) == "genetic" |
69 #for $input_parent in $options_usage.parent_sequences: | 62 #for $input_parent in $options_usage.parent_sequences |
70 #if $input_parent.is_of_type('fastqsanger'): | 63 #if $input_parent.is_of_type('fastqsanger') |
71 #set $data_path = splitext($input_parent.element_identifier)[0] | 64 #set $data_path = $clean_ext($input_parent.element_identifier) + ".fq" |
72 #set $data_path = re.sub(r'\.1$', '', $data_path) | 65 #else if $input_parent.is_of_type('fastqsanger.gz') |
73 #set $data_path = $data_path + ".fq" | 66 #set $data_path = $clean_ext($input_parent.element_identifier) + ".fq.gz" |
74 #else: | 67 #else |
75 #set $data_path = splitext($input_parent.element_identifier)[0] | 68 #set $data_path = $clean_ext($input_parent.element_identifier) + ".fa" |
76 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
77 #set $data_path = $data_path + ".fa" | |
78 #end if | 69 #end if |
79 | 70 |
80 -p "${data_path}" | 71 -p '${data_path}' |
81 #end for | 72 #end for |
82 | 73 |
83 -A $options_usage.cross_type | 74 -A $options_usage.cross_type |
84 | 75 |
85 #for $input_progeny in $options_usage.progeny_sequences: | 76 #for $input_progeny in $options_usage.progeny_sequences |
86 #if $input_progeny: | 77 #if $input_progeny |
87 #if $input_progeny.is_of_type('fastqsanger'): | 78 #if $input_progeny.is_of_type('fastqsanger') |
88 #set $data_path = splitext($input_progeny.element_identifier)[0] | 79 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".fq" |
89 #set $data_path = re.sub(r'\.1$', '', $data_path) | 80 #else if $input_progeny.is_of_type('fastqsanger.gz') |
90 #set $data_path = $data_path + ".fq" | 81 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".fq.gz" |
91 #else: | 82 #else |
92 #set $data_path = splitext($input_progeny.element_identifier)[0] | 83 #set $data_path = $clean_ext($input_progeny.element_identifier) + ".fa" |
93 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
94 #set $data_path = $data_path + ".fa" | |
95 #end if | 84 #end if |
96 | 85 |
97 -r "${data_path}" | 86 -r '${data_path}' |
98 #end if | 87 #end if |
99 #end for | 88 #end for |
100 | 89 |
101 #if str($assembly_options.P): | 90 #if str($assembly_options.P) |
102 -P $assembly_options.P | 91 -P $assembly_options.P |
103 #end if | 92 #end if |
104 #else: | 93 #else |
105 #for $i_indiv, $input_indiv in enumerate($options_usage.individual_sample): | 94 #for $i_indiv, $input_indiv in enumerate($options_usage.individual_sample) |
106 | 95 |
107 #if $input_indiv.is_of_type('fastqsanger'): | 96 #if $input_indiv.is_of_type('fastqsanger') |
108 #set $data_path = splitext($input_indiv.element_identifier)[0] | 97 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".fq" |
109 #set $data_path = re.sub(r'\.1$', '', $data_path) | 98 #else if $input_indiv.is_of_type('fastqsanger.gz') |
110 #set $data_path = $data_path + ".fq" | 99 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".fq.gz" |
111 #else: | 100 #else |
112 #set $data_path = splitext($input_indiv.element_identifier)[0] | 101 #set $data_path = $clean_ext($input_indiv.element_identifier) + ".fa" |
113 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
114 #set $data_path = $data_path + ".fa" | |
115 #end if | 102 #end if |
116 | 103 |
117 -s "${data_path}" | 104 -s '${data_path}' |
118 #end for | 105 #end for |
119 -O "$options_usage.popmap" | 106 -O '$options_usage.popmap' |
120 #end if | 107 #end if |
121 | 108 |
122 #if str($assembly_options.m): | 109 #if str($assembly_options.m) |
123 -m $assembly_options.m | 110 -m $assembly_options.m |
124 #end if | 111 #end if |
125 #if str($assembly_options.N): | 112 #if str($assembly_options.N) |
126 -N $assembly_options.N | 113 -N $assembly_options.N |
127 #end if | 114 #end if |
128 -M $assembly_options.M | 115 -M $assembly_options.M |
129 -n $assembly_options.n | 116 -n $assembly_options.n |
130 $assembly_options.t | 117 $assembly_options.t |
135 | 122 |
136 ## No SQL recording | 123 ## No SQL recording |
137 -S | 124 -S |
138 | 125 |
139 ## snp_model | 126 ## snp_model |
140 #if str( $snp_options.select_model.model_type) == "bounded": | 127 #if str( $snp_options.select_model.model_type) == "bounded" |
141 --bound_low $snp_options.select_model.bound_low | 128 --bound_low $snp_options.select_model.bound_low |
142 --bound_high $snp_options.select_model.bound_high | 129 --bound_high $snp_options.select_model.bound_high |
143 --alpha $snp_options.select_model.alpha | 130 --alpha $snp_options.select_model.alpha |
144 #else if str( $snp_options.select_model.model_type) == "snp": | 131 #else if str( $snp_options.select_model.model_type) == "snp" |
145 --alpha $snp_options.select_model.alpha | 132 --alpha $snp_options.select_model.alpha |
146 #end if | 133 #end if |
147 | 134 |
148 -o stacks_outputs | 135 -o stacks_outputs |
149 | 136 |
150 #if str( $options_usage.rad_analysis_type ) == "genetic": | 137 #if str( $options_usage.rad_analysis_type ) == "genetic" |
151 @NORM_GENOTYPES_OUTPUT_LIGHT@ | 138 @NORM_GENOTYPES_OUTPUT_LIGHT@ |
139 #end if | |
140 | |
141 ## If input is in gz format, stacks will output gzipped files (no option to control this) | |
142 && if ls stacks_outputs/*.gz > /dev/null 2>&1; then gunzip stacks_outputs/*.gz; fi | |
143 | |
144 && | |
145 | |
146 stacks_summary.py --stacks-prog denovo_map.pl --res-dir stacks_outputs --logfile stacks_outputs/denovo_map.log --summary stacks_outputs/summary.html | |
147 #if str( $options_usage.rad_analysis_type ) == "population" | |
148 --pop-map '$options_usage.popmap' | |
152 #end if | 149 #end if |
153 ]]></command> | 150 ]]></command> |
154 | 151 |
155 <inputs> | 152 <inputs> |
156 <conditional name="options_usage"> | 153 <conditional name="options_usage"> |
157 <param name="rad_analysis_type" type="select" label="Select your usage"> | 154 <param name="rad_analysis_type" type="select" label="Select your usage"> |
158 <option value="genetic" selected="true">Genetic map</option> | 155 <option value="genetic" selected="true">Genetic map</option> |
159 <option value="population">Population</option> | 156 <option value="population">Population</option> |
160 </param> | 157 </param> |
161 <when value="genetic"> | 158 <when value="genetic"> |
162 <param name="parent_sequences" argument="-p" format="fastqsanger,fasta" type="data" multiple="true" label="Files containing parent sequences" help="Files containing parent sequences from a mapping cross (only R1 reads). Dataset names will be used as sample name (no space allowed)." /> | 159 <param name="parent_sequences" argument="-p" format="fastqsanger,fastqsanger.gz,fasta" type="data" multiple="true" label="Files containing parent sequences" help="Files containing parent sequences from a mapping cross (only R1 reads). Dataset names will be used as sample name (no space allowed)." /> |
163 | 160 |
164 <param name="progeny_sequences" argument="-r" format="fastqsanger,fasta" type="data" multiple="true" optional="true" label="Files containing progeny sequences" help="files containing progeny sequences from a mapping cross (only R1 reads). Dataset names will be used as sample name (no space allowed)." /> | 161 <param name="progeny_sequences" argument="-r" format="fastqsanger,fastqsanger.gz,fasta" type="data" multiple="true" optional="true" label="Files containing progeny sequences" help="files containing progeny sequences from a mapping cross (only R1 reads). Dataset names will be used as sample name (no space allowed)." /> |
165 | 162 |
166 <param name="cross_type" argument="-A" type="select" label="Cross type"> | 163 <param name="cross_type" argument="-A" type="select" label="Cross type"> |
167 <expand macro="cross_types"/> | 164 <expand macro="cross_types"/> |
168 </param> | 165 </param> |
169 </when> | 166 </when> |
170 <when value="population"> | 167 <when value="population"> |
171 <param name="individual_sample" argument="-s" format="fastqsanger,fasta" type="data" multiple="true" label="Files containing an individual sample from a population" help="files containing an individual sample from a population (only R1 reads). Dataset names will be used as sample name (no space allowed)." /> | 168 <param name="individual_sample" argument="-s" format="fastqsanger,fastqsanger.gz,fasta" type="data" multiple="true" label="Files containing an individual sample from a population" help="files containing an individual sample from a population (only R1 reads). Dataset names will be used as sample name (no space allowed)." /> |
172 <param name="popmap" argument="-O" type="data" format="tabular,txt" label="Specify a population map" /> | 169 <param name="popmap" argument="-O" type="data" format="tabular,txt" label="Specify a population map" /> |
173 </when> | 170 </when> |
174 </conditional> | 171 </conditional> |
175 | 172 |
176 <!-- stack assembly options --> | 173 <!-- stack assembly options --> |
191 </section> | 188 </section> |
192 </inputs> | 189 </inputs> |
193 <outputs> | 190 <outputs> |
194 <data format="txt" name="output_log" label="denovo_map.log with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/denovo_map.log" /> | 191 <data format="txt" name="output_log" label="denovo_map.log with ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/denovo_map.log" /> |
195 | 192 |
193 <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/summary.html" /> | |
194 | |
196 <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" /> | 195 <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" /> |
197 <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" /> | 196 <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" /> |
198 <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" /> | 197 <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" /> |
199 | 198 |
200 <expand macro="genotypes_output_light"/> | 199 <expand macro="genotypes_output_light"/> |
230 <output name="output_log"> | 229 <output name="output_log"> |
231 <assert_contents> | 230 <assert_contents> |
232 <has_text text="denovo_map.pl completed" /> | 231 <has_text text="denovo_map.pl completed" /> |
233 </assert_contents> | 232 </assert_contents> |
234 </output> | 233 </output> |
234 <output name="output_summary"> | |
235 <assert_contents> | |
236 <has_text text="Stacks Statistics" /> | |
237 </assert_contents> | |
238 </output> | |
235 | 239 |
236 <!-- catalog --> | 240 <!-- catalog --> |
237 <output name="catalogtags"> | 241 <output name="catalogtags"> |
238 <assert_contents> | 242 <assert_contents> |
239 <has_text text="catalog generated on" /> | 243 <has_text text="catalog generated on" /> |
310 <output name="output_log"> | 314 <output name="output_log"> |
311 <assert_contents> | 315 <assert_contents> |
312 <has_text text="denovo_map.pl completed" /> | 316 <has_text text="denovo_map.pl completed" /> |
313 </assert_contents> | 317 </assert_contents> |
314 </output> | 318 </output> |
319 <output name="output_summary"> | |
320 <assert_contents> | |
321 <has_text text="Stacks Statistics" /> | |
322 </assert_contents> | |
323 </output> | |
315 | 324 |
316 <!-- catalog --> | 325 <!-- catalog --> |
317 <output name="catalogtags"> | 326 <output name="catalogtags"> |
318 <assert_contents> | 327 <assert_contents> |
319 <has_text text="catalog generated on" /> | 328 <has_text text="catalog generated on" /> |
390 <output name="output_log"> | 399 <output name="output_log"> |
391 <assert_contents> | 400 <assert_contents> |
392 <has_text text="denovo_map.pl completed" /> | 401 <has_text text="denovo_map.pl completed" /> |
393 </assert_contents> | 402 </assert_contents> |
394 </output> | 403 </output> |
404 <output name="output_summary"> | |
405 <assert_contents> | |
406 <has_text text="Stacks Statistics" /> | |
407 </assert_contents> | |
408 </output> | |
395 | 409 |
396 <!-- catalog --> | 410 <!-- catalog --> |
397 <output name="catalogtags"> | 411 <output name="catalogtags"> |
398 <assert_contents> | 412 <assert_contents> |
399 <has_text text="catalog generated on" /> | 413 <has_text text="catalog generated on" /> |
432 </assert_contents> | 446 </assert_contents> |
433 </output> | 447 </output> |
434 <output name="out_sumstats"> | 448 <output name="out_sumstats"> |
435 <assert_contents> | 449 <assert_contents> |
436 <has_text text="Smoothed Pi" /> | 450 <has_text text="Smoothed Pi" /> |
451 </assert_contents> | |
452 </output> | |
453 | |
454 <!-- samples --> | |
455 <output_collection name="tags"> | |
456 <element name="PopA_01.tags"> | |
457 <assert_contents> | |
458 <has_text text="generated on " /> | |
459 </assert_contents> | |
460 </element> | |
461 </output_collection> | |
462 <output_collection name="snps"> | |
463 <element name="PopA_01.snps"> | |
464 <assert_contents> | |
465 <has_text text="generated on " /> | |
466 </assert_contents> | |
467 </element> | |
468 </output_collection> | |
469 <output_collection name="alleles"> | |
470 <element name="PopA_01.alleles"> | |
471 <assert_contents> | |
472 <has_text text="generated on " /> | |
473 </assert_contents> | |
474 </element> | |
475 </output_collection> | |
476 <output_collection name="matches"> | |
477 <element name="PopA_01.matches"> | |
478 <assert_contents> | |
479 <has_text text="generated on " /> | |
480 </assert_contents> | |
481 </element> | |
482 </output_collection> | |
483 </test> | |
484 <test> | |
485 <param name="options_usage|rad_analysis_type" value="genetic"/> | |
486 <param name="options_usage|parent_sequences" value="demultiplexed/PopA_01.1.fq.gzip" ftype="fastqsanger.gz" /> | |
487 <output name="output_log"> | |
488 <assert_contents> | |
489 <has_text text="denovo_map.pl completed" /> | |
490 </assert_contents> | |
491 </output> | |
492 <output name="output_summary"> | |
493 <assert_contents> | |
494 <has_text text="Stacks Statistics" /> | |
495 </assert_contents> | |
496 </output> | |
497 | |
498 <!-- catalog --> | |
499 <output name="catalogtags"> | |
500 <assert_contents> | |
501 <has_text text="catalog generated on" /> | |
502 </assert_contents> | |
503 </output> | |
504 <output name="catalogsnps"> | |
505 <assert_contents> | |
506 <has_text text="catalog generated on" /> | |
507 </assert_contents> | |
508 </output> | |
509 <output name="catalogalleles"> | |
510 <assert_contents> | |
511 <has_text text="catalog generated on" /> | |
512 </assert_contents> | |
513 </output> | |
514 | |
515 <!-- genotypes --> | |
516 <output name="out_generic_haplo"> | |
517 <assert_contents> | |
518 <has_text text="Catalog ID" /> | |
519 </assert_contents> | |
520 </output> | |
521 <output name="out_sql_markers"> | |
522 <assert_contents> | |
523 <has_text text="Total Genotypes" /> | |
524 </assert_contents> | |
525 </output> | |
526 <output name="out_joinmap"> | |
527 <assert_contents> | |
528 <has_text text="batch_1.genotypes_" /> | |
529 </assert_contents> | |
530 </output> | |
531 <output name="out_sql_genotypes"> | |
532 <assert_contents> | |
533 <has_text text="SQL ID" /> | |
437 </assert_contents> | 534 </assert_contents> |
438 </output> | 535 </output> |
439 | 536 |
440 <!-- samples --> | 537 <!-- samples --> |
441 <output_collection name="tags"> | 538 <output_collection name="tags"> |