7
|
1 <tool id="plant_tribes_kaks_analysis" name="KaKsAnalysis" version="@WRAPPER_VERSION@.4.0">
|
0
|
2 <description>estimates paralogous and orthologous pairwise synonymous (Ks) and non-synonymous (Ka) substitution rates</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
3
|
6 <requirements>
|
7
|
7 <requirement type="package" version="1.0.4">plant_tribes_kaks_analysis</requirement>
|
3
|
8 </requirements>
|
0
|
9 <command detect_errors="exit_code"><![CDATA[
|
|
10 #set output_dir = 'kaksAnalysis_dir'
|
|
11 #set comparison = $comparison_cond.comparison
|
|
12 #if str($options_type.options_type_selector) == 'advanced':
|
|
13 #set codeml_ctl_file_cond = $options_type.codeml_ctl_file_cond
|
|
14 #set codeml_ctl_file_select = $codeml_ctl_file_cond.codeml_ctl_file_select
|
|
15 #set fit_components_cond = $options_type.fit_components_cond
|
|
16 #set fit_components = $fit_components_cond.fit_components
|
|
17 #set recalibrate_cond = $options_type.recalibrate_cond
|
|
18 #set recalibrate = $recalibrate_cond.recalibrate
|
|
19 #set set_min_coverage_cond = $options_type.set_min_coverage_cond
|
|
20 #set set_min_coverage = $set_min_coverage_cond.set_min_coverage
|
|
21 #set set_lower_ks_limit_cond = $options_type.set_lower_ks_limit_cond
|
|
22 #set set_lower_ks_limit = $set_lower_ks_limit_cond.set_lower_ks_limit
|
|
23 #set set_upper_ks_limit_cond = $options_type.set_upper_ks_limit_cond
|
|
24 #set set_upper_ks_limit = $set_upper_ks_limit_cond.set_upper_ks_limit
|
|
25 #else:
|
|
26 #set codeml_ctl_file_select = 'no'
|
|
27 #set fit_components = 'no'
|
|
28 #set set_lower_ks_limit = 'no'
|
|
29 #set set_upper_ks_limit = 'no'
|
|
30 #end if
|
|
31 KaKsAnalysis
|
|
32 --num_threads \${GALAXY_SLOTS:-4}
|
|
33 --coding_sequences_species_1 '$coding_sequences_species_1'
|
|
34 --proteins_species_1 '$proteins_species_1'
|
|
35 --comparison $comparison
|
|
36 #if str($comparison) == 'orthologs':
|
|
37 --coding_sequences_species_2 '$comparison_cond.coding_sequences_species_2'
|
|
38 --proteins_species_2 '$comparison_cond.proteins_species_2'
|
3
|
39 #if str($comparison_cond.blast_option) == 'crbblast':
|
|
40 --crb_blast
|
|
41 #end if
|
0
|
42 #end if
|
|
43 #if str($options_type.options_type_selector) == 'advanced':
|
|
44 #if str($set_min_coverage) == 'yes':
|
|
45 --min_coverage $set_min_coverage_cond.min_coverage
|
|
46 #end if
|
|
47 #if str($recalibrate) == 'yes':
|
|
48 --recalibration_rate $recalibrate_cond.recalibration_rate
|
|
49 #end if
|
|
50 #if str($codeml_ctl_file_select) == 'yes':
|
|
51 --codeml_ctl_file '$codeml_ctl_file_cond.codeml_ctl_file'
|
|
52 # No else block needed here because the default codeml_ctl config
|
|
53 # will be used if the --codeml_ctl_file flag is missing.
|
|
54 #end if
|
|
55 #if str($fit_components) == 'yes':
|
|
56 --fit_components
|
|
57 --num_of_components $fit_components_cond.num_of_components
|
|
58 #end if
|
|
59 #if str($set_lower_ks_limit) == 'yes':
|
|
60 --min_ks $set_lower_ks_limit_cond.min_ks
|
|
61 #end if
|
|
62 #if str($set_upper_ks_limit) == 'yes':
|
|
63 --max_ks $set_upper_ks_limit_cond.max_ks
|
|
64 #end if
|
|
65 #end if
|
4
|
66 &>kaks_analysis_log.txt;
|
|
67 if [[ $? -ne 0 ]]; then
|
|
68 cp kaks_analysis_log.txt '$output_species1_fna';
|
|
69 cp kaks_analysis_log.txt '$output_species1_faa';
|
|
70 #if str($comparison) == 'paralogs':
|
|
71 cp kaks_analysis_log.txt '$output_species1_paralog';
|
|
72 cp kaks_analysis_log.txt '$output_rbhb_paralog';
|
|
73 #else:
|
|
74 cp kaks_analysis_log.txt '$output_species2_faa';
|
|
75 cp kaks_analysis_log.txt '$output_species2_fna';
|
|
76 cp kaks_analysis_log.txt '$output_species1_ortholog';
|
|
77 cp kaks_analysis_log.txt '$output_species2_ortholog';
|
|
78 cp kaks_analysis_log.txt '$output_rbhb_ortholog';
|
|
79 #end if
|
|
80 cp kaks_analysis_log.txt '$output_kaks';
|
|
81 #if str($fit_components) == 'yes':
|
5
|
82 cp kaks_analysis_log.txt '$output_components';
|
4
|
83 #end if
|
|
84 else
|
5
|
85 mv $output_dir/species1.fna '$output_species1_fna';
|
|
86 mv $output_dir/species1.faa '$output_species1_faa';
|
4
|
87 #if str($comparison) == 'paralogs':
|
5
|
88 mv $output_dir/species1.fna.blastn.paralogs '$output_species1_paralog';
|
|
89 mv $output_dir/*.rbhb '$output_rbhb_paralog';
|
4
|
90 #else:
|
5
|
91 mv $output_dir/species2.faa '$output_species2_faa';
|
|
92 mv $output_dir/species2.fna '$output_species2_fna';
|
|
93 mv $output_dir/species1.fna.blastn.orthologs '$output_species1_ortholog';
|
|
94 mv $output_dir/species2.fna.blastn.orthologs '$output_species2_ortholog';
|
|
95 mv $output_dir/*.rbhb '$output_rbhb_ortholog';
|
4
|
96 #end if
|
5
|
97 mv $output_dir/*.kaks '$output_kaks';
|
4
|
98 #if str($fit_components) == 'yes':
|
5
|
99 mv $output_dir/*.components '$output_components';
|
4
|
100 #end if
|
|
101 fi
|
0
|
102 ]]></command>
|
|
103 <inputs>
|
|
104 <param name="coding_sequences_species_1" format="fasta" type="data" label="Coding sequences for the first species" />
|
|
105 <param name="proteins_species_1" format="fasta" type="data" label="Protein sequences for the first species" />
|
|
106 <conditional name="comparison_cond">
|
|
107 <param name="comparison" type="select" label="Type of sequence comparison">
|
|
108 <option value="paralogs" selected="true">Paralogous</option>
|
|
109 <option value="orthologs">Orthologous</option>
|
|
110 </param>
|
|
111 <when value="paralogs" />
|
|
112 <when value="orthologs">
|
|
113 <param name="coding_sequences_species_2" format="fasta" type="data" label="Coding sequences for the second species" />
|
|
114 <param name="proteins_species_2" format="fasta" type="data" label="Protein sequences for the second species" />
|
3
|
115 <param name="blast_option" type="select" display="radio" label="Determine for cross-species orthologs using">
|
|
116 <option value="blast" selected="true">reciprocal best BLAST</option>
|
|
117 <option value="crbblast">conditional reciprocal best BLAST</option>
|
|
118 </param>
|
0
|
119 </when>
|
|
120 </conditional>
|
|
121 <conditional name="options_type">
|
|
122 <param name="options_type_selector" type="select" label="Options Configuration">
|
|
123 <option value="basic" selected="true">Basic</option>
|
|
124 <option value="advanced">Advanced</option>
|
|
125 </param>
|
|
126 <when value="basic" />
|
|
127 <when value="advanced">
|
|
128 <conditional name="set_min_coverage_cond">
|
|
129 <param name="set_min_coverage" type="select" label="Alignment coverage configuration">
|
|
130 <option value="no" selected="true">No</option>
|
|
131 <option value="yes">Yes</option>
|
|
132 </param>
|
|
133 <when value="no" />
|
|
134 <when value="yes">
|
|
135 <param name="min_coverage" type="float" value="0.5" min="0.3" max="1.0" label="match score" />
|
|
136 </when>
|
|
137 </conditional>
|
|
138 <conditional name="recalibrate_cond">
|
|
139 <param name="recalibrate" type="select" label="Species rates recalibration configuration">
|
|
140 <option value="no" selected="true">No</option>
|
|
141 <option value="yes">Yes</option>
|
|
142 </param>
|
|
143 <when value="no" />
|
|
144 <when value="yes">
|
|
145 <param name="recalibration_rate" type="float" value="0.0" min="0.0" label="Recalibration rate" />
|
|
146 </when>
|
|
147 </conditional>
|
|
148 <conditional name="codeml_ctl_file_cond">
|
|
149 <param name="codeml_ctl_file_select" type="select" label="PAML codeml configuration">
|
|
150 <option value="no" selected="true">No</option>
|
|
151 <option value="yes">Yes</option>
|
|
152 </param>
|
|
153 <when value="no" />
|
|
154 <when value="yes">
|
|
155 <param name="codeml_ctl_file" format="txt" type="data" label="PAML codeml control file" />
|
|
156 </when>
|
|
157 </conditional>
|
|
158 <conditional name="fit_components_cond">
|
|
159 <param name="fit_components" type="select" label="Rates clustering configuration">
|
|
160 <option value="no" selected="true">No</option>
|
|
161 <option value="yes">Yes</option>
|
|
162 </param>
|
|
163 <when value="no" />
|
|
164 <when value="yes">
|
|
165 <param name="num_of_components" type="integer" value="1" min="1" label="Number of components" />
|
|
166 </when>
|
|
167 </conditional>
|
|
168 <conditional name="set_lower_ks_limit_cond">
|
|
169 <param name="set_lower_ks_limit" type="select" label="Lower limit synonymous subsitution rates configuration">
|
|
170 <option value="no" selected="true">No</option>
|
|
171 <option value="yes">Yes</option>
|
|
172 </param>
|
|
173 <when value="no" />
|
|
174 <when value="yes">
|
|
175 <param name="min_ks" type="float" value="0.0" min="0.0" label="Minimum rate" />
|
|
176 </when>
|
|
177 </conditional>
|
|
178 <conditional name="set_upper_ks_limit_cond">
|
|
179 <param name="set_upper_ks_limit" type="select" label="Upper limit synonymous subsitution rates configuration">
|
|
180 <option value="no" selected="true">No</option>
|
|
181 <option value="yes">Yes</option>
|
|
182 </param>
|
|
183 <when value="no" />
|
|
184 <when value="yes">
|
|
185 <param name="max_ks" type="float" value="0.0" min="0.0" label="Maximum rate" />
|
|
186 </when>
|
|
187 </conditional>
|
|
188 </when>
|
|
189 </conditional>
|
|
190 <!-- Required due to the Emmix license -->
|
|
191 <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False">
|
|
192 <validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
|
|
193 </param>
|
|
194 </inputs>
|
|
195 <outputs>
|
3
|
196 <data name="output_species1_fna" format="fasta" label="${tool.name} (coding sequences species1) on ${on_string}" />
|
|
197 <data name="output_species1_faa" format="fasta" label="${tool.name} (amino acids species1) on ${on_string}" />
|
|
198 <data name="output_species2_fna" format="fasta" label="${tool.name} (coding sequences species2) on ${on_string}">
|
0
|
199 <filter>comparison_cond['comparison'] == 'orthologs'</filter>
|
|
200 </data>
|
3
|
201 <data name="output_species2_faa" format="fasta" label="${tool.name} (amino acids species2) on ${on_string}">
|
0
|
202 <filter>comparison_cond['comparison'] == 'orthologs'</filter>
|
|
203 </data>
|
3
|
204 <data name="output_species1_paralog" format="tabular" label="${tool.name} (blastn results species1 vs species1) on ${on_string}">
|
0
|
205 <filter>comparison_cond['comparison'] == 'paralogs'</filter>
|
|
206 </data>
|
3
|
207 <data name="output_species1_ortholog" format="tabular" label="${tool.name} (blastn results species1 vs species2) on ${on_string}">
|
|
208 <filter>comparison_cond['comparison'] == 'orthologs'</filter>
|
|
209 </data>
|
|
210 <data name="output_species2_ortholog" format="tabular" label="${tool.name} (blastn results species2 vs species1) on ${on_string}">
|
0
|
211 <filter>comparison_cond['comparison'] == 'orthologs'</filter>
|
|
212 </data>
|
3
|
213 <data name="output_rbhb_paralog" format="tabular" label="${tool.name} (paralogous pairs) on ${on_string}">
|
|
214 <filter>comparison_cond['comparison'] == 'paralogs'</filter>
|
|
215 </data>
|
|
216 <data name="output_rbhb_ortholog" format="tabular" label="${tool.name} (orthologous pairs) on ${on_string}">
|
0
|
217 <filter>comparison_cond['comparison'] == 'orthologs'</filter>
|
|
218 </data>
|
3
|
219 <data name="output_kaks" format="tabular" label="${tool.name} (KaKs distribution) on ${on_string}" />
|
|
220 <data name="output_components" format="ptkscmp" label="${tool.name} (significant components in the KaKs distribution) on ${on_string}">
|
0
|
221 <filter>options_type['options_type_selector'] == 'advanced' and options_type['fit_components_cond']['fit_components'] == 'yes'</filter>
|
|
222 </data>
|
|
223 </outputs>
|
|
224 <tests>
|
|
225 <test>
|
|
226 <param name="coding_sequences_species_1" value="species1_cds.fasta" ftype="fasta"/>
|
|
227 <param name="proteins_species_1" value="species1_pep.fasta" ftype="fasta"/>
|
1
|
228 <param name="non_commercial_use" value="True"/>
|
0
|
229 <output name="output_species1_fna" file="species1_cds.fasta" ftype="fasta" compare="contains"/>
|
|
230 <output name="output_species1_faa" file="species1_pep.fasta" ftype="fasta" compare="contains"/>
|
|
231 <output name="output_species1_paralog" file="output_blastn_results1.tabular" ftype="tabular" compare="contains"/>
|
3
|
232 <output name="output_rbhb_paralog" file="output_paralogous_pairs.tabular" ftype="tabular"/>
|
0
|
233 <output name="output_kaks" file="output1.tabular" ftype="tabular"/>
|
|
234 </test>
|
|
235 </tests>
|
|
236 <help>
|
|
237 This tool is one of the PlantTribes collection of automated modular analysis pipelines for comparative and evolutionary analyses
|
|
238 of genome-scale gene families and transcriptomes. This tool estimates paralogous and orthologous pairwise synonymous (Ks) and
|
|
239 non-synonymous (Ka) substitution rates for a set of gene coding sequences either produced by the AssemblyPostProcessor tool or
|
|
240 from an external source. Optionally, the resulting set of estimated Ks values can be clustered into components using a mixture
|
|
241 of multivariate normal distributions to identify significant duplication event(s) in a species or a pair of species.
|
|
242
|
|
243 -----
|
|
244
|
|
245 * **Required options**
|
|
246
|
|
247 - **Coding sequences for the first species** - coding sequence fasta file for the first species either produced by the AssemblyPostProcessor tool or from an external source selected from your history.
|
|
248 - **Protein sequences for the first species** - corresponding protein sequence fasta files for the first species either produced by the AssemblyPostProcessor tool or from an external source selected from your history.
|
|
249 - **Type of sequence comparison** - pairwise sequence comparison to determine homologous pairs. This can be either paralogous for self-species comparison or orthologous for cross-species comparison. Cross-species comparison requires input for the second species.
|
|
250
|
|
251 * **Other options**
|
|
252
|
|
253 - **Coding sequences for the second species** - coding sequence fasta file for the second species either produced by the AssemblyPostProcessor tool or from an external source selected from your history. This option is required only for orthologous comparison.
|
|
254 - **Protein sequences for the second species** - corresponding protein sequence fasta files for the second species either produced by the AssemblyPostProcessor tool or from an external source selected from your history. This option is required only for orthologous comparison.
|
3
|
255
|
|
256 - **Determine for cross-species orthologs using** - select option for blast orthology.
|
|
257
|
|
258 - **reciprocal best BLAST** - use the default stringent reciprocal BLAST package for orthology assignment.
|
|
259 - **conditional reciprocal best BLAST** - use the CRB-BLAST package for orthology assignment which increases sensitivity to orthology comparisons and determines additional cross-species orthologs that are being left out by the defaul stringent reciprocal BLAST.
|
|
260
|
0
|
261 - **Alignment coverage configuration** - select 'Yes' to set the minimum allowable alignment coverage length between homologous pairs. PlantTribes uses global codon alignment match score to determine the pairwise alignment coverage. By default, the match score is set to 0.5 if 'No' is selected.
|
|
262
|
|
263 - **match score** - number of base matches in a pairwise sequence alignment divided by the length of shorter sequence. Positions in the alignment corresponding to gaps are not considered. The score is restricted to the range 0.3 - 1.0.
|
|
264
|
|
265 - **Species rates recalibration configuration** - select 'Yes' to recalibrate synonymous substitution rates of a species using a predetermined evolutionary rate. Recalibration evolutionary rate can be determined from a species tree inferred from a collection of conserved single copy genes from taxa of interest as described in [7]. Rate recalibration applies only to paralogous comparisons.
|
|
266
|
|
267 - **recalibration rate** - a predetermined evolutionary recalibration rate.
|
|
268
|
|
269 - **PAML codeml configuration** - select 'Yes' to enable selection of a PAML codeml control file to carry out maximum likelihood analysis of protein-coding DNA sequences using codon substitution models. Template file "codeml.ctl.args" can be found in the scaffold data installed into Galaxy via the PlantTribes Scaffolds Download Data Manager tool, and are also available at the PlantTribes GitHub `repository`_. Default settings shown in the template are used if 'No' is selected.
|
|
270 - **Rates clustering configuration** - select 'Yes' to estimate clusters of synonymous substitution rates using a mixture of multivariate normal distributions which represent putative duplication event(s).
|
|
271
|
|
272 - **Number of components** - number of components to include in the normal mixture model.
|
|
273
|
|
274 - **Lower limit synonymous substitution rates configuration** - select 'Yes' to set the minimum allowable synonymous substitution rate to use in the normal mixtures cluster analysis to exclude young paralogs that arise from normal gene births and deaths in a genome.
|
|
275
|
|
276 - **Minimum rate** - minimum allowable synonymous substitution rate.
|
|
277
|
|
278 - **Upper limit synonymous substitution rates configuration** - select 'Yes' to set the maximum allowable synonymous substitution rate to use in the normal mixtures cluster analysis to exclude likely ancient paralogs in a genome.
|
|
279
|
|
280 - **Maximum rate** - maximum allowable synonymous substitution rate.
|
|
281
|
|
282 .. _repository: https://github.com/dePamphilis/PlantTribes/blob/master/config/codeml.ctl.args
|
|
283
|
|
284 </help>
|
|
285 <citations>
|
|
286 <expand macro="citation1" />
|
|
287 <citation type="bibtex">
|
|
288 @article{Wall2008,
|
|
289 journal = {Nucleic Acids Research},
|
|
290 author = {2. Wall PK, Leebens-Mack J, Muller KF, Field D, Altman NS},
|
|
291 title = {PlantTribes: a gene and gene family resource for comparative genomics in plants},
|
|
292 year = {2008},
|
|
293 volume = {36},
|
|
294 number = {suppl 1},
|
|
295 pages = {D970-D976},}
|
|
296 </citation>
|
|
297 <citation type="bibtex">
|
|
298 @article{Altschul1990,
|
|
299 journal = {Journal of molecular biology}
|
|
300 author = {3. Altschul SF, Gish W, Miller W, Myers EW, Lipman DJ},
|
|
301 title = {Basic local alignment search tool},
|
|
302 year = {1990},
|
|
303 volume = {215},
|
|
304 number = {3},
|
|
305 pages = {403-410},}
|
|
306 </citation>
|
|
307 <citation type="bibtex">
|
|
308 @article{Katoh2013,
|
|
309 journal = {Molecular biology and evolution},
|
|
310 author = {4. Katoh K, Standley DM},
|
|
311 title = {MAFFT multiple sequence alignment software version 7: improvements in performance and usability},
|
|
312 year = {2013},
|
|
313 volume = {30},
|
|
314 number = {4},
|
|
315 pages = {772-780},}
|
|
316 </citation>
|
|
317 <citation type="bibtex">
|
|
318 @article{Yang2007,
|
|
319 journal = {Molecular biology and evolution},
|
|
320 author = {5. Yang Z},
|
|
321 title = {PAML 4: phylogenetic analysis by maximum likelihood},
|
|
322 year = {2007},
|
|
323 volume = {24},
|
|
324 number = {8},
|
|
325 pages = {1586-1591},}
|
|
326 </citation>
|
|
327 <citation type="bibtex">
|
|
328 @article{McLachlan1999,
|
|
329 journal = {Journal of Statistical Software},
|
|
330 author = {6. McLachlan GJ, Peel D, Basford KE, Adams P},
|
|
331 title = {The EMMIX software for the fitting of mixtures of normal and t-components},
|
|
332 year = {1999},
|
|
333 volume = {4},
|
|
334 number = {2},
|
|
335 pages = {1-14},}
|
|
336 </citation>
|
|
337 <citation type="bibtex">
|
|
338 @article{Cui2006,
|
|
339 journal = {Genome Research},
|
|
340 author = {7. Cui L, Wall PK, Leebens-Mack JH, Lindsay BG, Soltis DE, Doyle JJ, Soltis PS, Carlson JE, Arumuganathan K, Barakat A, Albert VA},
|
|
341 title = {Widespread genome duplications throughout the history of flowering plants},
|
|
342 year = {2006},
|
|
343 volume = {16},
|
|
344 number = {6},
|
|
345 pages = {738-749},}
|
|
346 </citation>
|
|
347 </citations>
|
|
348 </tool>
|