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