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