0
|
1 <tool id="plant_tribes_phylogenomics_analysis" name="PhylogenomicsAnalysis" version="1.0.0">
|
|
2 <description>pipeline</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="0.2">plant_tribes_phylogenomics_analysis</requirement>
|
|
5 </requirements>
|
|
6 <stdio>
|
|
7 <!-- Anything other than zero is an error -->
|
|
8 <exit_code range="1:" />
|
|
9 <!-- In case the return code has not been set properly check stderr too -->
|
|
10 <regex match="Error:" />
|
|
11 <regex match="Exception:" />
|
|
12 </stdio>
|
|
13 <command>
|
|
14 <![CDATA[
|
3
|
15 #import os
|
9
|
16 #import sys
|
10
|
17 #set invalid_input = "The selected input is not a valid list of sequences classified into gene family clusters, select another input."
|
|
18 #if not $os.path.exists($orthogroup_faa.extra_files_path):
|
|
19 print > $sys.stderr($invalid_input)
|
|
20 $sys.exit(1)
|
9
|
21 #end if
|
3
|
22 #set src_dir = $os.path.join('phylogenomicsAnalysis_dir', 'orthogroups_fasta')
|
12
|
23 #set num_orthogroup_faa = 0
|
|
24 #for f in $os.listdir($src_dir):
|
|
25 #if $f.endswith('.faa')])
|
|
26 set num_orthogroup_faa = $num_orthogroup_faa + 1
|
|
27 #end if
|
|
28 #end for
|
10
|
29 #if $num_orthogroup_faa == 0:
|
|
30 print > $sys.stderr($invalid_input)
|
|
31 $sys.exit(1)
|
|
32 #end if
|
12
|
33 #set num_orthogroup_fna = 0
|
|
34 #for f in $os.listdir($src_dir):
|
|
35 #if $f.endswith('.fna')])
|
|
36 set num_orthogroup_fna = $num_orthogroup_fna + 1
|
|
37 #end if
|
|
38 #end for
|
3
|
39 #set dest_dir = $output.extra_files_path
|
|
40 mkdir -p $dest_dir &&
|
0
|
41 PhylogenomicsAnalysis
|
7
|
42 --orthogroup_faa "$orthogroup_faa.extra_files_path"
|
0
|
43 --scaffold "$scaffold"
|
|
44 --method $method
|
|
45 #if str($options_type.options_type_selector) == 'advanced':
|
5
|
46 #if str($options_type.multiple_sequence_alignments_cond.multiple_sequence_alignments) == 'yes':
|
0
|
47 #set multiple_sequence_alignments_option_cond = $options_type.multiple_sequence_alignments_cond.multiple_sequence_alignments_option_cond
|
5
|
48 #set multiple_sequence_alignments_option = $multiple_sequence_alignments_option_cond.multiple_sequence_alignments_option
|
|
49 #set multiple_codon_alignments_cond = $options_type.multiple_sequence_alignments_cond.multiple_codon_alignments_cond
|
6
|
50 #set multiple_codon_alignments = $multiple_codon_alignments_cond.multiple_codon_alignments
|
7
|
51 #set use_corresponding_coding_sequences_cond = $multiple_codon_alignments_cond.use_corresponding_coding_sequences_cond
|
|
52 #set use_corresponding_coding_sequences = $use_corresponding_coding_sequences_cond.use_corresponding_coding_sequences
|
5
|
53 #if str($multiple_sequence_alignments_option) == 'create_alignments':
|
0
|
54 --create_alignments
|
5
|
55 #else if str($multiple_sequence_alignments_option) == 'add_alignments':
|
0
|
56 --add_alignments
|
5
|
57 #else if str($multiple_sequence_alignments_option) == 'pasta_alignments':
|
0
|
58 --pasta_alignments
|
|
59 --pasta_iter_limit $multiple_sequence_alignments_option_cond.pasta_iter_limit
|
|
60 #end if
|
5
|
61 #if str($multiple_codon_alignments) == 'yes':
|
0
|
62 --codon_alignments
|
7
|
63 #if str($use_corresponding_coding_sequences) == 'yes':
|
10
|
64 #if $num_orthogroup_fna == 0:
|
|
65 print > $sys.stderr("No corresponding coding sequences were generated for the selected input. You must not have selected 'Yes' for the 'Create corresponding coding sequences?' option in the GeneFamilyClassifier tool for the selected input.")
|
|
66 $sys.exit(1)
|
|
67 #end if
|
7
|
68 --orthogroup_fna
|
|
69 #end if
|
0
|
70 --sequence_type $multiple_codon_alignments_cond.sequence_type
|
|
71 #end if
|
|
72 #end if
|
|
73 #if str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes':
|
|
74 #set tree_inference_cond = $options_type.phylogenetic_trees_cond.tree_inference_cond
|
|
75 #set tree_inference_method = $tree_inference_cond.tree_inference
|
|
76 --tree_inference $tree_inference_method
|
|
77 #if str($tree_inference_method) == 'raxml':
|
|
78 --rooting_order "$tree_inference_cond.rooting_order"
|
|
79 --bootstrap_replicates $tree_inference_cond.bootstrap_replicates
|
|
80 #end if
|
|
81 --max_orthogroup_size $options_type.phylogenetic_trees_cond.max_orthogroup_size
|
|
82 --min_orthogroup_size $options_type.phylogenetic_trees_cond.min_orthogroup_size
|
|
83 #end if
|
|
84 #if str($options_type.msa_quality_control_options_cond.msa_quality_control_options) == 'yes':
|
|
85 #set msa_quality_control_options_cond = $options_type.msa_quality_control_options_cond
|
|
86 #set remove_gappy_sequences_cond = $msa_quality_control_options_cond.remove_gappy_sequences_cond
|
|
87 #if str($remove_gappy_sequences_cond) == 'yes':
|
|
88 #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond
|
|
89 --remove_sequences $remove_gappy_sequences_cond.remove_sequences
|
|
90 #if str($trim_type_cond.trim_type) == 'automated_trimming':
|
|
91 --automated_trimming
|
|
92 else:
|
|
93 --gap_trimming $trim_type_cond.gap_trimming
|
|
94 #end if
|
|
95 #end if
|
|
96 #end if
|
|
97 #end if
|
|
98 --scaffold_dir "${GALAXY_DATA_INDEX_DIR}/plant_tribes/scaffolds"
|
4
|
99 --num_threads \${GALAXY_SLOTS:-4}
|
|
100 && echo "Sequence alignments and corresponding phylogenies: `ls $src_dir | wc -l` files" > $output
|
|
101 && ls $src_dir >> $output
|
|
102 && mv $src_dir/* $dest_dir
|
0
|
103 ]]>
|
|
104 </command>
|
|
105 <inputs>
|
7
|
106 <param name="orthogroup_faa" format="txt" type="data" label="Select sequences classified into gene family clusters"/>
|
0
|
107 <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold">
|
|
108 <options from_data_table="plant_tribes_scaffolds" />
|
|
109 <validator type="no_options" message="No PlantTribes scaffolds are available. Use the PlantTribes Scaffolds Download Data Manager tool to install and populate the PlantTribes scaffolds data table."/>
|
|
110 </param>
|
|
111 <param name="method" type="select" label="Protein clustering method">
|
|
112 <option value="gfam" selected="true">GFam</option>
|
|
113 <option value="orthofinder">OrthoFinder</option>
|
|
114 <option value="orthomcl">OrthoMCL</option>
|
|
115 </param>
|
|
116 <conditional name="options_type">
|
|
117 <param name="options_type_selector" type="select" label="Options Configuration">
|
|
118 <option value="basic" selected="true">Basic</option>
|
|
119 <option value="advanced">Advanced</option>
|
|
120 </param>
|
|
121 <when value="basic" />
|
|
122 <when value="advanced">
|
|
123 <conditional name="multiple_sequence_alignments_cond">
|
5
|
124 <param name="multiple_sequence_alignments" type="select" label="Set multiple sequence alignments options?">
|
0
|
125 <option value="no" selected="true">No</option>
|
|
126 <option value="yes">Yes</option>
|
|
127 </param>
|
|
128 <when value="no" />
|
|
129 <when value="yes">
|
|
130 <conditional name="multiple_sequence_alignments_option_cond">
|
|
131 <param name="multiple_sequence_alignments_option" label="Select option" type="select" force_select="True">
|
|
132 <option value="create_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (MAFFT algorithm)</option>
|
|
133 <option value="add_alignments">Add unaligned orthogroup proteins to scaffold backbone multiple sequence alignments (MAFFT algorithm)</option>
|
|
134 <option value="pasta_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (PASTA algorithm)</option>
|
|
135 </param>
|
|
136 <when value="create_alignments"/>
|
|
137 <when value="add_alignments"/>
|
|
138 <when value="pasta_alignments">
|
|
139 <param name="pasta_iter_limit" type="integer" value="3" min="0" label="Maximum number of iteration that the PASTA algorithm will run"/>
|
|
140 </when>
|
|
141 </conditional>
|
|
142 <conditional name="multiple_codon_alignments_cond">
|
|
143 <param name="multiple_codon_alignments" label="Construct orthogroup multiple codon alignments?" type="select">
|
|
144 <option value="no" selected="True">No</option>
|
|
145 <option value="yes">Yes</option>
|
|
146 </param>
|
|
147 <when value="yes">
|
|
148 <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference - (dna)">
|
|
149 <option value="protein" selected="true">Amino acid based</option>
|
|
150 <option value="dna">Nucleotide based</option>
|
|
151 </param>
|
7
|
152 <conditional name="use_corresponding_coding_sequences_cond">
|
10
|
153 <param name="use_corresponding_coding_sequences" type="select" label="Use corresponding coding sequences if available?" help="Must have selected 'Yes' for the 'Create corresponding coding sequences?' option in the GeneFamilyClassifier tool for the selected input above">
|
7
|
154 <option value="no" selected="true">No</option>
|
|
155 <option value="yes">Yes</option>
|
|
156 </param>
|
|
157 <when value="no" />
|
|
158 <when value="yes" />
|
|
159 </conditional>
|
0
|
160 </when>
|
|
161 <when value="no"/>
|
|
162 </conditional>
|
|
163 </when>
|
|
164 </conditional>
|
|
165 <conditional name="phylogenetic_trees_cond">
|
|
166 <param name="phylogenetic_trees" type="select" label="Set phylogenetic trees options?">
|
|
167 <option value="no" selected="true">No</option>
|
|
168 <option value="yes">Yes</option>
|
|
169 </param>
|
|
170 <when value="no" />
|
|
171 <when value="yes">
|
|
172 <conditional name="tree_inference_cond">
|
|
173 <param name="tree_inference" type="select" label="Phylogenetic trees inference method">
|
|
174 <option value="raxml" selected="true">RAxML</option>
|
|
175 <option value="fasttree">FastTree</option>
|
|
176 </param>
|
|
177 <when value="raxml">
|
|
178 <param name="rooting_order" format="txt" type="data" label="Select file containing strings matching sequence identifiers of species for determining the most basal taxa in the orthogroups for rooting trees"/>
|
|
179 <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"/>
|
|
180 </when>
|
|
181 <when value="fasttree"/>
|
|
182 </conditional>
|
|
183 <param name="max_orthogroup_size" type="integer" value="100" min="0" label="Maximum number of sequences in orthogroup alignments"/>
|
|
184 <param name="min_orthogroup_size" type="integer" value="4" min="0" label="Minimum number of sequences in orthogroup alignments"/>
|
|
185 </when>
|
|
186 </conditional>
|
|
187 <conditional name="msa_quality_control_options_cond">
|
|
188 <param name="msa_quality_control_options" type="select" label="Set MSA quality control options?">
|
|
189 <option value="no" selected="true">No</option>
|
|
190 <option value="yes">Yes</option>
|
|
191 </param>
|
|
192 <when value="no" />
|
|
193 <when value="yes">
|
|
194 <conditional name="remove_gappy_sequences_cond">
|
|
195 <param name="remove_gappy_sequences" type="select" label="Remove gappy sequences in alignments?">
|
|
196 <option value="no" selected="true">No</option>
|
|
197 <option value="yes">Yes</option>
|
|
198 </param>
|
|
199 <when value="no"/>
|
|
200 <when value="yes">
|
|
201 <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"/>
|
|
202 <conditional name="trim_type_cond">
|
|
203 <param name="trim_type" type="select" label="Select process used for gap trimming">
|
|
204 <option value="automated_trimming" selected="true">Trim alignments using trimAl's ML heuristic trimming approach</option>
|
|
205 <option value="gap_trimming">Nucleotide based</option>
|
|
206 </param>
|
|
207 <when value="automated_trimming"/>
|
|
208 <when value="gap_trimming">
|
|
209 <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"/>
|
|
210 </when>
|
|
211 </conditional>
|
|
212 </when>
|
|
213 </conditional>
|
|
214 </when>
|
|
215 </conditional>
|
|
216 </when>
|
|
217 </conditional>
|
|
218 </inputs>
|
|
219 <outputs>
|
2
|
220 <data name="output" format="txt" label="Sequence alignments and corresponding phylogenies on ${on_string}"/>
|
0
|
221 </outputs>
|
|
222 <tests>
|
|
223 <test>
|
|
224 <param name="input" value="" ftype="fasta" />
|
|
225 <param name="prediction_method" value="transdecoder"/>
|
|
226 <param name="target_gene_family_assembly" value="no"/>
|
|
227 <param name="strand_specific" value="yes"/>
|
|
228 <param name="dereplicate" value="yes"/>
|
|
229 <param name="min_length" value="200"/>
|
|
230 <output_collection name="orthos" type="list">
|
|
231 </output_collection>
|
|
232 </test>
|
|
233 </tests>
|
|
234 <help>
|
|
235 This tool is one of the PlantTribes' collection of automated modular analysis pipelines that utilize objective classifications of
|
|
236 complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. It performs phylogenomic
|
|
237 analyses, comparing and analyzing the sequences of single genes, or a small number of genes, as well as many other types of data.
|
|
238
|
|
239 -----
|
|
240
|
|
241 **Options**
|
|
242
|
|
243 * **Orthogroups or gene families proteins scaffold** - PlantTribes scaffolds data.
|
|
244 * **Protein clustering method** - One of GFam, OrthoFinder or OrthoMCL.
|
|
245 * **Protein classification method** - One of blastp, HMMScan or both.
|
|
246 * **SuperOrthogroups MCL clustering** - blastp e-value matrix between all pairs of orthogroups.
|
|
247 * **Minumum single copy taxa required in orthogroup** - Used with "Minumum single copy taxa required in orthogroup" configuration only.
|
|
248 * **Minumum taxa required in single copy orthogroup** - Used with "Minumum single copy taxa required in orthogroup" configuration only.
|
|
249 * **Corresponding coding sequences (CDS) fasta file** - Used only when selecting "Create orthogroup fasta files?".
|
|
250
|
|
251 </help>
|
|
252 <citations>
|
|
253 <citation type="bibtex">
|
|
254 @unpublished{None,
|
|
255 author = {None},
|
|
256 title = {None},
|
|
257 year = {None},
|
|
258 eprint = {None},
|
|
259 url = {None}
|
|
260 }</citation>
|
|
261 </citations>
|
|
262 </tool>
|