42
|
1 <tool id="plant_tribes_phylogenomics_analysis" name="Create multiple sequence alignments" version="0.3">
|
|
2 <description>and inferred maximum likelihood phylogenies</description>
|
0
|
3 <requirements>
|
51
|
4 <requirement type="package" version="0.3">plant_tribes_phylogenomics_analysis
|
|
5 </requirement>
|
0
|
6 </requirements>
|
|
7 <stdio>
|
|
8 <!-- Anything other than zero is an error -->
|
|
9 <exit_code range="1:" />
|
40
|
10 <exit_code range=":-1" />
|
|
11 <!-- In case the return code has not been set propery check stderr too -->
|
0
|
12 <regex match="Error:" />
|
|
13 <regex match="Exception:" />
|
|
14 </stdio>
|
|
15 <command>
|
|
16 <![CDATA[
|
3
|
17 #import os
|
9
|
18 #import sys
|
14
|
19
|
42
|
20 #set input_format = $input_format_cond.input_format
|
|
21 #set pipeline_output_dir = 'phylogenomicsAnalysis_dir'
|
|
22 #set src_aln_dir = $os.path.join($pipeline_output_dir, 'orthogroups_aln')
|
|
23 #set src_fasta_dir = $os.path.join($pipeline_output_dir, 'orthogroups_fasta')
|
44
|
24 #set src_tree_dir = $os.path.join($pipeline_output_dir, 'orthogroups_tree')
|
14
|
25
|
51
|
26 #if str($input_format) == 'ptortho':
|
|
27 #set dest_fasta_dir = $output_fasta_ptortho.extra_files_path
|
42
|
28 #set multiple_codon_alignments = 'no'
|
45
|
29 #set use_corresponding_coding_sequences = 'no'
|
14
|
30 #else:
|
51
|
31 #set dest_fasta_dir = $output_fasta_ptorthocs.extra_files_path
|
42
|
32 #set multiple_codon_alignments_cond = $input_format_cond.multiple_codon_alignments_cond
|
|
33 #set multiple_codon_alignments = $multiple_codon_alignments_cond.multiple_codon_alignments
|
|
34 #if str($multiple_codon_alignments) == 'yes':
|
|
35 #set use_corresponding_coding_sequences_cond = $multiple_codon_alignments_cond.use_corresponding_coding_sequences_cond
|
|
36 #set use_corresponding_coding_sequences = $use_corresponding_coding_sequences_cond.use_corresponding_coding_sequences
|
|
37 #else:
|
|
38 #set use_corresponding_coding_sequences = 'no'
|
|
39 #end if
|
10
|
40 #end if
|
42
|
41 mkdir -p $dest_fasta_dir &&
|
|
42
|
|
43 #if str($options_type.options_type_selector) == 'advanced':
|
|
44 #set multiple_sequence_alignments_cond = $options_type.multiple_sequence_alignments_cond
|
|
45 #set multiple_sequence_alignments = $multiple_sequence_alignments_cond.multiple_sequence_alignments
|
|
46 #if str($multiple_sequence_alignments) == 'yes':
|
|
47 #set multiple_sequence_alignments_option_cond = $options_type.multiple_sequence_alignments_cond.multiple_sequence_alignments_option_cond
|
|
48 #set multiple_sequence_alignments_option = $multiple_sequence_alignments_option_cond.multiple_sequence_alignments_option
|
|
49 #set generate_output_aln = True
|
|
50 #set dest_aln_dir = $output_aln.extra_files_path
|
|
51 mkdir -p $dest_aln_dir &&
|
|
52 #else:
|
|
53 #set generate_output_aln = False
|
|
54 #end if
|
48
|
55 #else:
|
|
56 #set generate_output_aln = False
|
46
|
57 #end if
|
14
|
58
|
|
59 #if str($options_type.options_type_selector) == 'advanced' and str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes':
|
|
60 #set generate_output_tree = True
|
|
61 #set dest_tree_dir = $output_tree.extra_files_path
|
|
62 mkdir -p $dest_tree_dir &&
|
|
63 #else:
|
|
64 #set generate_output_tree = False
|
|
65 #end if
|
|
66
|
0
|
67 PhylogenomicsAnalysis
|
44
|
68 --num_threads \${GALAXY_SLOTS:-4}
|
51
|
69 #if str($input_format) == 'ptortho':
|
|
70 --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path'
|
47
|
71 #else:
|
51
|
72 --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path'
|
52
|
73 --orthogroup_fna
|
47
|
74 #end if
|
60
|
75 --config_dir '$scaffold.fields.path'
|
58
|
76 --scaffold '$scaffold.fields.path'
|
0
|
77 --method $method
|
14
|
78
|
0
|
79 #if str($options_type.options_type_selector) == 'advanced':
|
42
|
80 #if str($multiple_sequence_alignments) == 'yes':
|
5
|
81 #if str($multiple_sequence_alignments_option) == 'create_alignments':
|
0
|
82 --create_alignments
|
5
|
83 #else if str($multiple_sequence_alignments_option) == 'add_alignments':
|
0
|
84 --add_alignments
|
5
|
85 #else if str($multiple_sequence_alignments_option) == 'pasta_alignments':
|
40
|
86 --pasta_script_path '$__tool_directory__/run_pasta.py'
|
0
|
87 --pasta_alignments
|
|
88 --pasta_iter_limit $multiple_sequence_alignments_option_cond.pasta_iter_limit
|
|
89 #end if
|
|
90 #end if
|
14
|
91
|
0
|
92 #if str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes':
|
|
93 #set tree_inference_cond = $options_type.phylogenetic_trees_cond.tree_inference_cond
|
|
94 #set tree_inference_method = $tree_inference_cond.tree_inference
|
|
95 --tree_inference $tree_inference_method
|
|
96 #if str($tree_inference_method) == 'raxml':
|
14
|
97 #set rooting_order_file_cond = $tree_inference_cond.rooting_order_file_cond
|
|
98 #set rooting_order_file = $rooting_order_file_cond.rooting_order_file
|
|
99 #if str($rooting_order_file) == 'yes':
|
49
|
100 --rooting_order '$rooting_order_file_cond.rooting_order'
|
61
|
101 # No else block needed here because the default rooting_order
|
60
|
102 # configuration will be used if the --rooting_order flag is missing.
|
14
|
103 #end if
|
0
|
104 --bootstrap_replicates $tree_inference_cond.bootstrap_replicates
|
|
105 #end if
|
|
106 --max_orthogroup_size $options_type.phylogenetic_trees_cond.max_orthogroup_size
|
|
107 --min_orthogroup_size $options_type.phylogenetic_trees_cond.min_orthogroup_size
|
|
108 #end if
|
14
|
109
|
0
|
110 #if str($options_type.msa_quality_control_options_cond.msa_quality_control_options) == 'yes':
|
|
111 #set msa_quality_control_options_cond = $options_type.msa_quality_control_options_cond
|
|
112 #set remove_gappy_sequences_cond = $msa_quality_control_options_cond.remove_gappy_sequences_cond
|
|
113 #if str($remove_gappy_sequences_cond) == 'yes':
|
|
114 #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond
|
|
115 --remove_sequences $remove_gappy_sequences_cond.remove_sequences
|
|
116 #if str($trim_type_cond.trim_type) == 'automated_trimming':
|
|
117 --automated_trimming
|
26
|
118 #else:
|
0
|
119 --gap_trimming $trim_type_cond.gap_trimming
|
|
120 #end if
|
|
121 #end if
|
|
122 #end if
|
|
123 #end if
|
53
|
124 >/dev/null
|
14
|
125
|
51
|
126 && echo "Sequence alignments and corresponding phylogenies"
|
|
127 #if str($input_format) == 'ptortho':
|
|
128 && echo -e "#Size\tName" > $output_fasta_ptortho
|
|
129 && ls -l $src_fasta_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_fasta_ptortho
|
42
|
130 #else:
|
51
|
131 && echo -e "#Size\tName" > $output_fasta_ptorthocs
|
|
132 && ls -l $src_fasta_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_fasta_ptorthocs
|
42
|
133 #end if
|
61
|
134 #if len($os.listdir($src_fasta_dir)) > 0:
|
|
135 && mv $src_fasta_dir/* $dest_fasta_dir
|
|
136 #end if
|
14
|
137
|
|
138 #if $generate_output_aln:
|
51
|
139 && echo -e "#Size\tName" > $output_aln
|
61
|
140 #if len($os.listdir($src_aln_dir)) > 0:
|
|
141 ls -l $src_aln_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_aln
|
|
142 && mv $src_aln_dir/* $dest_aln_dir
|
|
143 #end if
|
14
|
144 #end if
|
|
145
|
|
146 #if $generate_output_tree:
|
51
|
147 && echo -e "#Size\tName" > $output_tree
|
61
|
148 #if len($os.listdir($src_tree_dir)) > 0:
|
|
149 && ls -l $src_tree_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_tree
|
|
150 && mv $src_tree_dir/* $dest_tree_dir
|
|
151 #end if
|
14
|
152 #end if
|
0
|
153 ]]>
|
|
154 </command>
|
|
155 <inputs>
|
42
|
156 <conditional name="input_format_cond">
|
|
157 <param name="input_format" type="select" label="Select type of data to sub sample">
|
53
|
158 <option value="ptortho">Precomputed orthologous gene family clusters</option>
|
|
159 <option value="ptorthocs">Precomputed orthologous gene family clusters with corresponding coding sequences</option>
|
42
|
160 </param>
|
51
|
161 <when value="ptortho">
|
|
162 <param name="input_ptortho" format="ptortho" type="data" label="Precomputed orthologous gene family clusters" />
|
42
|
163 </when>
|
51
|
164 <when value="ptorthocs">
|
|
165 <param name="input_ptorthocs" format="ptorthocs" type="data" label="Precomputed orthologous gene family clusters with corresponding coding sequences" />
|
42
|
166 <conditional name="multiple_codon_alignments_cond">
|
|
167 <param name="multiple_codon_alignments" type="select" label="Construct orthogroup multiple codon alignments?">
|
|
168 <option value="no" selected="True">No</option>
|
|
169 <option value="yes">Yes</option>
|
|
170 </param>
|
51
|
171 <when value="no" />
|
42
|
172 <when value="yes">
|
51
|
173 <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference (dna)">
|
42
|
174 <option value="protein" selected="true">Amino acid based</option>
|
|
175 <option value="dna">Nucleotide based</option>
|
|
176 </param>
|
|
177 <conditional name="use_corresponding_coding_sequences_cond">
|
|
178 <param name="use_corresponding_coding_sequences" type="select" label="Use corresponding coding sequences?">
|
|
179 <option value="no" selected="true">No</option>
|
|
180 <option value="yes">Yes</option>
|
|
181 </param>
|
|
182 <when value="no" />
|
|
183 <when value="yes" />
|
|
184 </conditional>
|
|
185 </when>
|
|
186 </conditional>
|
|
187 </when>
|
|
188 </conditional>
|
0
|
189 <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold">
|
|
190 <options from_data_table="plant_tribes_scaffolds" />
|
51
|
191 <validator type="no_options" message="No PlantTribes scaffolds are available. Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table." />
|
0
|
192 </param>
|
|
193 <param name="method" type="select" label="Protein clustering method">
|
|
194 <option value="gfam" selected="true">GFam</option>
|
|
195 <option value="orthofinder">OrthoFinder</option>
|
|
196 <option value="orthomcl">OrthoMCL</option>
|
|
197 </param>
|
|
198 <conditional name="options_type">
|
|
199 <param name="options_type_selector" type="select" label="Options Configuration">
|
|
200 <option value="basic" selected="true">Basic</option>
|
|
201 <option value="advanced">Advanced</option>
|
|
202 </param>
|
|
203 <when value="basic" />
|
|
204 <when value="advanced">
|
|
205 <conditional name="multiple_sequence_alignments_cond">
|
5
|
206 <param name="multiple_sequence_alignments" type="select" label="Set multiple sequence alignments options?">
|
0
|
207 <option value="no" selected="true">No</option>
|
|
208 <option value="yes">Yes</option>
|
|
209 </param>
|
|
210 <when value="no" />
|
|
211 <when value="yes">
|
|
212 <conditional name="multiple_sequence_alignments_option_cond">
|
51
|
213 <param name="multiple_sequence_alignments_option" label="Select method for multiple sequence alignments" type="select"
|
|
214 force_select="True">
|
0
|
215 <option value="create_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (MAFFT algorithm)</option>
|
|
216 <option value="add_alignments">Add unaligned orthogroup proteins to scaffold backbone multiple sequence alignments (MAFFT algorithm)</option>
|
|
217 <option value="pasta_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (PASTA algorithm)</option>
|
|
218 </param>
|
51
|
219 <when value="create_alignments" />
|
|
220 <when value="add_alignments" />
|
0
|
221 <when value="pasta_alignments">
|
51
|
222 <param name="pasta_iter_limit" type="integer" value="3" min="0" label="Maximum number of iteration that the PASTA algorithm will run" />
|
0
|
223 </when>
|
|
224 </conditional>
|
|
225 </when>
|
|
226 </conditional>
|
|
227 <conditional name="phylogenetic_trees_cond">
|
|
228 <param name="phylogenetic_trees" type="select" label="Set phylogenetic trees options?">
|
|
229 <option value="no" selected="true">No</option>
|
|
230 <option value="yes">Yes</option>
|
|
231 </param>
|
|
232 <when value="no" />
|
|
233 <when value="yes">
|
|
234 <conditional name="tree_inference_cond">
|
|
235 <param name="tree_inference" type="select" label="Phylogenetic trees inference method">
|
|
236 <option value="raxml" selected="true">RAxML</option>
|
|
237 <option value="fasttree">FastTree</option>
|
|
238 </param>
|
|
239 <when value="raxml">
|
14
|
240 <conditional name="rooting_order_file_cond">
|
61
|
241 <param name="rooting_order_file" type="select" label="Select rooting order configuration for rooting trees?" help="Select No for the default rooting order configuration which uses the most distant taxon present in the orthogroup">
|
14
|
242 <option value="no" selected="true">No</option>
|
|
243 <option value="yes">Yes</option>
|
|
244 </param>
|
51
|
245 <when value="no" />
|
14
|
246 <when value="yes">
|
56
|
247 <param name="rooting_order" format="txt" type="data" label="Rooting order configuration for rooting trees" />
|
14
|
248 </when>
|
|
249 </conditional>
|
51
|
250 <param name="bootstrap_replicates" type="integer" value="100" min="0" label="Number of replicates for rapid bootstrap analysis and search for the best-scoring ML tree" />
|
0
|
251 </when>
|
51
|
252 <when value="fasttree" />
|
0
|
253 </conditional>
|
51
|
254 <param name="max_orthogroup_size" type="integer" value="100" min="0" label="Maximum number of sequences in orthogroup alignments" />
|
|
255 <param name="min_orthogroup_size" type="integer" value="4" min="0" label="Minimum number of sequences in orthogroup alignments" />
|
0
|
256 </when>
|
|
257 </conditional>
|
|
258 <conditional name="msa_quality_control_options_cond">
|
|
259 <param name="msa_quality_control_options" type="select" label="Set MSA quality control options?">
|
|
260 <option value="no" selected="true">No</option>
|
|
261 <option value="yes">Yes</option>
|
|
262 </param>
|
|
263 <when value="no" />
|
|
264 <when value="yes">
|
|
265 <conditional name="remove_gappy_sequences_cond">
|
|
266 <param name="remove_gappy_sequences" type="select" label="Remove gappy sequences in alignments?">
|
|
267 <option value="no" selected="true">No</option>
|
|
268 <option value="yes">Yes</option>
|
|
269 </param>
|
51
|
270 <when value="no" />
|
0
|
271 <when value="yes">
|
51
|
272 <param name="remove_sequences" type="float" value="0.5" min="0" max="1" label="Remove sequences with gaps of" help="0.5 removes sequences with 50% gaps" />
|
0
|
273 <conditional name="trim_type_cond">
|
|
274 <param name="trim_type" type="select" label="Select process used for gap trimming">
|
51
|
275 <option value="gap_trimming" selected="true">Nucleotide based </option>
|
26
|
276 <option value="automated_trimming">Trim alignments using trimAl's ML heuristic trimming approach</option>
|
0
|
277 </param>
|
51
|
278 <when value="automated_trimming" />
|
0
|
279 <when value="gap_trimming">
|
51
|
280 <param name="gap_trimming" type="float" value="0.1" min="0" max="1.0" label="Remove sites in alignments with gaps of" help="0.1 removes sites with 90% gaps" />
|
0
|
281 </when>
|
|
282 </conditional>
|
|
283 </when>
|
|
284 </conditional>
|
|
285 </when>
|
|
286 </conditional>
|
|
287 </when>
|
|
288 </conditional>
|
|
289 </inputs>
|
|
290 <outputs>
|
51
|
291 <data name="output_fasta_ptortho" format="ptortho">
|
|
292 <filter>input_format_cond['input_format'] == 'ptortho'</filter>
|
41
|
293 </data>
|
51
|
294 <data name="output_fasta_ptorthocs" format="ptorthocs">
|
|
295 <filter>input_format_cond['input_format'] == 'ptorthocs'</filter>
|
41
|
296 </data>
|
54
|
297 <data name="output_aln" format="ptalign" label="Multiple alignments using method ${options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments_option_cond']['multiple_sequence_alignments_option']} on ${on_string}">
|
22
|
298 <filter>options_type['options_type_selector'] == 'advanced' and options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments'] == 'yes'</filter>
|
14
|
299 </data>
|
53
|
300 <data name="output_tree" format="pttree" label="Phylogenetic trees on ${on_string}">
|
14
|
301 <filter>options_type['options_type_selector'] == 'advanced' and options_type['phylogenetic_trees_cond']['phylogenetic_trees'] == 'yes'</filter>
|
|
302 </data>
|
0
|
303 </outputs>
|
|
304 <tests>
|
|
305 <test>
|
|
306 </test>
|
|
307 </tests>
|
|
308 <help>
|
59
|
309 This tool is one of the PlantTribes' collection of automated modular analysis pipelines that utilize objective classifications of
|
|
310 complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. It performs phylogenomic
|
|
311 analyses by creating multiple sequence alignments and inferred maximum likelihood phylogenies for orthogroups produced by the
|
|
312 **Classify gene sequences into precomputed orthologous gene family clusters** tool.
|
0
|
313
|
59
|
314 -----
|
0
|
315
|
59
|
316 **Options**
|
0
|
317
|
59
|
318 * **Required options**
|
18
|
319
|
59
|
320 - **Select gene family clusters** - Sequences classified into gene family clusters, optionally including corresponding coding sequences.
|
|
321 - **Orthogroups or gene families proteins scaffold** - PlantTribes scaffolds data.
|
|
322 - **Protein clustering method** - One of GFam (domain architecture based clustering), OrthoFinder (broadly defined clusters) or OrthoMCL (narrowly defined clusters).
|
|
323
|
|
324 * **Multiple sequence alignments options**
|
14
|
325
|
59
|
326 - **Select method for multiple sequence alignments** - Method used for setting multiple sequence alignments.
|
|
327 - **Input sequences include corresponding coding sequences?** - Selecting 'Yes' for this option requires that the selected input data format is 'ptorthocs'.
|
|
328 - **Construct orthogroup multiple codon alignments?** - Construct orthogroup multiple codon alignments.
|
|
329 - **Sequence type used in the phylogenetic inference** - Sequence type (dna or amino acid) used in the phylogenetic inference.
|
|
330 - **Use corresponding coding sequences?** - Selecting 'Yes' for this option requires that the selected input data format is 'ptorthocs' or this tool will produce an error.
|
14
|
331
|
59
|
332 * **Phylogenetic trees options**
|
15
|
333
|
59
|
334 - **Phylogenetic trees inference method** - Phylogenetic trees inference method.
|
|
335 - **Select rooting order configuration for rooting trees??** - If 'No' is selected, trees will be rooted using the most distant taxon present in the orthogroup.
|
|
336 - **Number of replicates for rapid bootstrap analysis and search for the best-scoring ML tree** - Number of replicates for rapid bootstrap analysis and search for the best-scoring ML tree.
|
|
337 - **Maximum number of sequences in orthogroup alignments** - Maximum number of sequences in orthogroup alignments.
|
|
338 - **Minimum number of sequences in orthogroup alignments** - Minimum number of sequences in orthogroup alignments.
|
14
|
339
|
59
|
340 * **MSA quality control options**
|
14
|
341
|
59
|
342 - **Remove sequences with gaps of** - Removes gappy sequences in alignments (i.e., 0.5 removes sequences with 50% gaps).
|
|
343 - **Select process used for gap trimming** - Either nucleotide based trimming or alignments are trimed using using trimAl's ML heuristic trimming approach.
|
|
344 - **Remove sites in alignments with gaps of** - If the process used for gap trimming is nucleotide based, this is the gap value used when removing gappy sites in alignments (i.e., 0.1 removes sites with 90% gaps).
|
14
|
345
|
0
|
346 </help>
|
|
347 <citations>
|
51
|
348 <citation type="bibtex">
|
|
349 @unpublished{None,
|
|
350 author = {Eric Wafula},
|
|
351 title = {None},
|
|
352 year = {None},
|
|
353 url = {https://github.com/dePamphilis/PlantTribes}
|
|
354 }
|
|
355 </citation>
|
|
356 <citation type="doi">10.1093/bioinformatics/btw412</citation>
|
|
357 <citation type="bibtex">
|
|
358 @published{Research in Computational Molecular Biology (RECOMB) (pp. 177–191),
|
|
359 author = {Mirarab, S., Nguyen, N., Warnow, T.},
|
|
360 title = {PASTA: Ultra-Large Multiple Sequence Alignment. In R. Sharan
|
|
361 (Ed.)},
|
|
362 year = {2014},
|
|
363 url = {https://github.com/smirarab/pasta}
|
|
364 }
|
|
365 </citation>
|
|
366 <citation type="bibtex">
|
|
367 @published{Bioinformatics,
|
|
368 author = {Salvador Capella-Gutierrez, Jose M. Silla-Martinez, Toni
|
|
369 Gabaldon},
|
|
370 title = {trimAl: a tool for automated alignment trimming in large-scale
|
|
371 phylogenetic analyses},
|
|
372 year = {2009},
|
|
373 url = {http://trimal.cgenomics.org}
|
|
374 }
|
|
375 </citation>
|
|
376 <citation type="bibtex">
|
|
377 @published{Bioinformatics,
|
|
378 author = {A. Stamatakis},
|
|
379 title = {RAxML Version 8: A tool for Phylogenetic Analysis and
|
|
380 Post-Analysis of Large Phylogenies},
|
|
381 year = {2014},
|
|
382 url = {http://sco.h-its.org/exelixis/web/software/raxml/index.html}
|
|
383 }
|
|
384 </citation>
|
|
385 <citation type="doi">10.1371/journal.pone.0009490</citation>
|
0
|
386 </citations>
|
|
387 </tool>
|