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