28
|
1 <tool id="plant_tribes_gene_family_classifier" name="Classify gene sequences" version="0.3">
|
|
2 <description>into precomputed orthologous gene family clusters</description>
|
0
|
3 <requirements>
|
28
|
4 <requirement type="package" version="0.3">plant_tribes_gene_family_classifier</requirement>
|
0
|
5 </requirements>
|
|
6 <stdio>
|
|
7 <!-- Anything other than zero is an error -->
|
|
8 <exit_code range="1:" />
|
29
|
9 <exit_code range=":-1" />
|
|
10 <!-- In case the return code has not been set propery check stderr too -->
|
0
|
11 <regex match="Error:" />
|
|
12 <regex match="Exception:" />
|
|
13 </stdio>
|
|
14 <command>
|
|
15 <![CDATA[
|
39
|
16 #import os
|
58
|
17 #import time
|
39
|
18 #set scaffold_path = $scaffold.fields.path
|
|
19 #set scaffold_dir = $os.path.split($scaffold_path)[0]
|
|
20 #set scaffold_selection = $os.path.split($scaffold_path)[1]
|
35
|
21
|
21
|
22 #if str($options_type.options_type_selector) == 'advanced':
|
51
|
23 #set specify_super_orthogroups_cond = $options_type.specify_super_orthogroups_cond
|
|
24 #set specify_super_orthogroups = $specify_super_orthogroups_cond.specify_super_orthogroups
|
17
|
25 #set create_orthogroup_cond = $options_type.create_orthogroup_cond
|
|
26 #set create_orthogroup = $create_orthogroup_cond.create_orthogroup
|
44
|
27 #set specify_single_copy_cond = $options_type.specify_single_copy_cond
|
46
|
28 #set specify_single_copy = $specify_single_copy_cond.specify_single_copy
|
44
|
29
|
51
|
30 #if str($specify_super_orthogroups) == 'yes':
|
|
31 #set specify_super_orthos = True
|
|
32 #set super_orthogroups = $specify_super_orthogroups_cond.super_orthogroups
|
|
33 #else:
|
|
34 #set specify_super_orthos = False
|
|
35 #end if
|
|
36
|
21
|
37 #if str($create_orthogroup) == 'yes':
|
44
|
38 #set create_ortho_sequences = True
|
|
39 #set orthogroups_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'orthogroups_fasta')
|
21
|
40 #set create_corresponding_coding_sequences_cond = $create_orthogroup_cond.create_corresponding_coding_sequences_cond
|
44
|
41
|
21
|
42 #if str($create_corresponding_coding_sequences_cond.create_corresponding_coding_sequences) == 'yes':
|
|
43 #set create_corresponding_coding_sequences = True
|
63
|
44 #set orthogroups_fasta_dest_dir = $output_ptorthocs.extra_files_path
|
21
|
45 #else:
|
|
46 #set create_corresponding_coding_sequences = False
|
63
|
47 #set orthogroups_fasta_dest_dir = $output_ptortho.extra_files_path
|
44
|
48 #end if
|
|
49 mkdir -p $orthogroups_fasta_dest_dir &&
|
21
|
50 #else:
|
|
51 #set create_ortho_sequences = False
|
23
|
52 #set create_corresponding_coding_sequences = False
|
21
|
53 #end if
|
52
|
54
|
|
55 #if str($specify_single_copy) == 'yes':
|
|
56 #set single_copy_orthogroup = True
|
|
57 #set single_copy_cond = $specify_single_copy_cond.single_copy_cond
|
|
58 ## FixMe: the single_copy_custom option is not currently supported.
|
|
59 #set single_copy = $single_copy_cond.single_copy
|
|
60 #if $create_ortho_sequences:
|
|
61 #set single_copy_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'single_copy_fasta')
|
|
62 #set single_copy_fasta_dest_dir = $output_ptsco.extra_files_path
|
|
63 mkdir -p $single_copy_fasta_dest_dir &&
|
|
64 #end if:
|
|
65 #else:
|
|
66 #set single_copy_orthogroup = False
|
|
67 #end if
|
|
68
|
13
|
69 #else:
|
47
|
70 #set single_copy_orthogroup = False
|
13
|
71 #set create_ortho_sequences = False
|
23
|
72 #set create_corresponding_coding_sequences = False
|
4
|
73 #end if
|
20
|
74
|
0
|
75 GeneFamilyClassifier
|
35
|
76 --proteins '$input'
|
|
77 --scaffold_dir '$scaffold_dir'
|
|
78 --scaffold '$scaffold_selection'
|
0
|
79 --method $method
|
13
|
80 --classifier $save_hmmscan_log_cond.classifier
|
30
|
81 --num_threads \${GALAXY_SLOTS:-4}
|
20
|
82
|
0
|
83 #if str($options_type.options_type_selector) == 'advanced':
|
51
|
84 #if specify_super_orthos:
|
|
85 --super_orthogroups $super_orthogroups
|
|
86 #end if
|
47
|
87 #if $single_copy_orthogroup:
|
44
|
88 --single_copy_taxa $single_copy_cond.single_copy_taxa
|
|
89 --taxa_present $single_copy_cond.taxa_present
|
0
|
90 #end if
|
17
|
91 #if str($create_orthogroup) == 'yes':
|
0
|
92 --orthogroup_fasta
|
18
|
93 #if $create_corresponding_coding_sequences:
|
35
|
94 --coding_sequences '$create_corresponding_coding_sequences_cond.coding_sequences'
|
17
|
95 #end if
|
0
|
96 #end if
|
|
97 #end if
|
44
|
98 >/dev/null
|
20
|
99
|
13
|
100 #if str($save_hmmscan_log_cond.classifier) == 'hmmscan' or str($save_hmmscan_log_cond.classifier) == 'both':
|
|
101 #if str($save_hmmscan_log_cond.save_hmmscan_log) == 'yes':
|
15
|
102 && mv geneFamilyClassification_dir/hmmscan.log $hmmscan_log
|
13
|
103 #else:
|
15
|
104 && rm geneFamilyClassification_dir/hmmscan.log
|
13
|
105 #end if
|
12
|
106 #end if
|
20
|
107
|
58
|
108 #if $create_ortho_sequences:
|
62
|
109 #if $create_corresponding_coding_sequences:
|
63
|
110 && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' > $output_ptorthocs
|
62
|
111 #else:
|
63
|
112 && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' > $output_ptortho
|
18
|
113 #end if
|
62
|
114 && mv $orthogroups_fasta_src_dir/* $orthogroups_fasta_dest_dir
|
4
|
115 #end if
|
20
|
116
|
47
|
117 #if $single_copy_orthogroup:
|
58
|
118 #if $create_ortho_sequences:
|
62
|
119 && ls -l $single_copy_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' > $output_ptsco
|
|
120 && mv $single_copy_fasta_src_dir/* $single_copy_fasta_dest_dir
|
52
|
121 #else:
|
|
122 && mv geneFamilyClassification_dir/*.singleCopy $output_single_copy
|
48
|
123 #end if
|
44
|
124 #end if
|
0
|
125 ]]>
|
|
126 </command>
|
|
127 <inputs>
|
|
128 <param name="input" format="fasta" type="data" label="Amino acids (proteins) sequences fasta file"/>
|
|
129 <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold">
|
|
130 <options from_data_table="plant_tribes_scaffolds" />
|
39
|
131 <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
|
132 </param>
|
|
133 <param name="method" type="select" label="Protein clustering method">
|
|
134 <option value="gfam" selected="true">GFam</option>
|
|
135 <option value="orthofinder">OrthoFinder</option>
|
|
136 <option value="orthomcl">OrthoMCL</option>
|
|
137 </param>
|
13
|
138 <conditional name="save_hmmscan_log_cond">
|
|
139 <param name="classifier" type="select" label="Protein classification method">
|
|
140 <option value="blastp" selected="true">blastp</option>
|
|
141 <option value="hmmscan">HMMScan</option>
|
|
142 <option value="both">Both blastp and HMMScan</option>
|
|
143 </param>
|
|
144 <when value="blastp" />
|
|
145 <when value="hmmscan">
|
|
146 <param name="save_hmmscan_log" type="select" label="Save hmmscan log?" help="Save the hmmscan log in an additional output dataset">
|
|
147 <option value="no" selected="true">No</option>
|
|
148 <option value="yes">Yes</option>
|
|
149 </param>
|
|
150 </when>
|
|
151 <when value="both">
|
|
152 <param name="save_hmmscan_log" type="select" label="Save hmmscan log?" help="Save the hmmscan log in an additional output dataset">
|
|
153 <option value="no" selected="true">No</option>
|
|
154 <option value="yes">Yes</option>
|
|
155 </param>
|
|
156 </when>
|
|
157 </conditional>
|
0
|
158 <conditional name="options_type">
|
|
159 <param name="options_type_selector" type="select" label="Options Configuration">
|
|
160 <option value="basic" selected="true">Basic</option>
|
|
161 <option value="advanced">Advanced</option>
|
|
162 </param>
|
|
163 <when value="basic" />
|
|
164 <when value="advanced">
|
51
|
165 <conditional name="specify_super_orthogroups_cond">
|
|
166 <param name="specify_super_orthogroups" type="select" label="Specify super orthogroups?" help="Secondary MCL clusters of orthogroups">
|
|
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 <param name="super_orthogroups" type="select" label="Super Orthogroups">
|
|
173 <option value="min_evalue" selected="true">Minimum e-value</option>
|
|
174 <option value="avg_evalue">Average e-value</option>
|
|
175 </param>
|
|
176 </when>
|
|
177 </conditional>
|
44
|
178 <conditional name="specify_single_copy_cond">
|
|
179 <param name="specify_single_copy" type="select" label="Specify single copy orthogroup selection?">
|
|
180 <option value="no" selected="true">No</option>
|
|
181 <option value="yes">Yes</option>
|
0
|
182 </param>
|
44
|
183 <when value="no"/>
|
|
184 <when value="yes">
|
|
185 <conditional name="single_copy_cond">
|
|
186 <param name="single_copy" type="select" label="Select single copy configuration">
|
|
187 <!--
|
|
188 FixMe: single_copy_custom is not currently supported because the
|
|
189 ~/config/*.singleCopy.config files are not easy to manage by a suer
|
|
190 and the GeneFamilyClassifier pipeline must be enhanced to provide an
|
|
191 optional parameter for the hard-coded path to the config.
|
|
192 <option value="custom" selected="true">Single copy orthogroup custom</option>
|
|
193 -->
|
|
194 <option value="taxa">Minumum single copy taxa required in orthogroup</option>
|
|
195 </param>
|
|
196 <when value="custom" />
|
|
197 <when value="taxa">
|
|
198 <param name="single_copy_taxa" type="integer" value="20" label="Minumum single copy taxa required in orthogroup"/>
|
|
199 <param name="taxa_present" type="integer" value="21" label="Minumum taxa required in single copy orthogroup"/>
|
|
200 </when>
|
|
201 </conditional>
|
0
|
202 </when>
|
|
203 </conditional>
|
|
204 <conditional name="create_orthogroup_cond">
|
|
205 <param name="create_orthogroup" type="select" label="Create orthogroup fasta files?">
|
|
206 <option value="no" selected="true">No</option>
|
|
207 <option value="yes">Yes</option>
|
|
208 </param>
|
|
209 <when value="no" />
|
|
210 <when value="yes">
|
17
|
211 <conditional name="create_corresponding_coding_sequences_cond">
|
|
212 <param name="create_corresponding_coding_sequences" type="select" label="Create corresponding coding sequences?">
|
|
213 <option value="no" selected="true">No</option>
|
|
214 <option value="yes">Yes</option>
|
|
215 </param>
|
|
216 <when value="no" />
|
|
217 <when value="yes">
|
|
218 <param name="coding_sequences" format="fasta" type="data" label="Corresponding coding sequences (CDS) fasta file"/>
|
|
219 </when>
|
|
220 </conditional>
|
0
|
221 </when>
|
|
222 </conditional>
|
|
223 </when>
|
|
224 </conditional>
|
|
225 </inputs>
|
|
226 <outputs>
|
15
|
227 <data name="hmmscan_log" format="txt" label="Protein classification hmmscan.log on ${on_string}">
|
|
228 <filter>save_hmmscan_log_cond['classifier'] in ['hmmscan', 'both'] and save_hmmscan_log_cond['save_hmmscan_log'] == 'yes'</filter>
|
|
229 </data>
|
63
|
230 <data name="output_ptortho" format="ptortho" label="Gene family clusters on ${on_string}">
|
33
|
231 <filter>options_type['options_type_selector'] == 'advanced' and options_type['create_orthogroup_cond']['create_orthogroup'] == 'yes' and options_type['create_orthogroup_cond']['create_corresponding_coding_sequences_cond']['create_corresponding_coding_sequences'] == 'no'</filter>
|
31
|
232 </data>
|
63
|
233 <data name="output_ptorthocs" format="ptorthocs" label="Gene family clusters and corresponding coding sequences on ${on_string}">
|
31
|
234 <filter>options_type['options_type_selector'] == 'advanced' and options_type['create_orthogroup_cond']['create_orthogroup'] == 'yes' and options_type['create_orthogroup_cond']['create_corresponding_coding_sequences_cond']['create_corresponding_coding_sequences'] == 'yes'</filter>
|
9
|
235 </data>
|
63
|
236 <data name="output_ptsco" format="tabular" label="Single copy orthogroups on ${on_string}">
|
53
|
237 <filter>options_type['options_type_selector'] == 'advanced' and options_type['create_orthogroup_cond']['create_orthogroup'] == 'yes' and options_type['specify_single_copy_cond']['specify_single_copy'] == 'yes'</filter>
|
63
|
238 <change_format>
|
|
239 <when input="options_type.create_orthogroup_cond.create_corresponding_coding_sequences_cond.create_corresponding_coding_sequences" value="no" format="ptortho" />
|
|
240 <when input="options_type.create_orthogroup_cond.create_corresponding_coding_sequences_cond.create_corresponding_coding_sequences" value="yes" format="ptorthocs" />
|
|
241 </change_format>
|
52
|
242 </data>
|
54
|
243 <data name="output_single_copy" format="tabular" label="Single copy orthogroups on ${on_string}">
|
53
|
244 <filter>options_type['options_type_selector'] == 'advanced' and options_type['create_orthogroup_cond']['create_orthogroup'] == 'no' and options_type['specify_single_copy_cond']['specify_single_copy'] == 'yes'</filter>
|
44
|
245 </data>
|
30
|
246 <collection name="orthos" type="list">
|
12
|
247 <discover_datasets pattern="__name__" directory="geneFamilyClassification_dir" visible="false" ext="tabular" />
|
0
|
248 </collection>
|
|
249 </outputs>
|
|
250 <tests>
|
39
|
251 <!-- Not sure how to test this since the tool requires scaffolds data which is extremely large and installed using a Data Manager -->
|
|
252 <!--
|
0
|
253 <test>
|
30
|
254 <param name="input" value="transcripts.cleaned.nr.pep" ftype="fasta" />
|
|
255 <param name="scaffold" value="22Gv1.1"/>
|
|
256 <param name="method" value="orthomcl"/>
|
|
257 <param name="classifier" value="blastp"/>
|
0
|
258 <param name="dereplicate" value="yes"/>
|
|
259 <param name="min_length" value="200"/>
|
|
260 <output_collection name="orthos" type="list">
|
35
|
261 <element name="proteins.blastp.22Gv1.1" file="proteins.blastp.22Gv1.1" ftype="tabular"/>
|
|
262 <element name="proteins.blastp.22Gv1.1.bestOrthos" file="proteins.blastp.22Gv1.1.bestOrthos" ftype="tabular"/>
|
|
263 <element name="proteins.blastp.22Gv1.1.bestOrthos.summary" file="proteins.blastp.22Gv1.1.bestOrthos.summary" ftype="tabular"/>
|
0
|
264 </output_collection>
|
|
265 </test>
|
35
|
266 -->
|
0
|
267 </tests>
|
|
268 <help>
|
|
269 This tool is one of the PlantTribes' collection of automated modular analysis pipelines that utilize objective classifications of
|
28
|
270 complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. This tool classifies gene
|
|
271 sequences into precomputed orthologous gene family clusters using either blastp (faster), HMMScan (slower but more sensitive
|
|
272 to remote homologs) or both (more exhaustive).
|
|
273
|
30
|
274 This tool accepts any of the following as input:
|
28
|
275
|
|
276 * the postprocessed assemblies produced by the **Postprocess de novo assembly transcripts into putative coding sequences** tool
|
|
277 * externally predicted coding sequences and their corresponding amino acid translations derived from a transcriptome assembly
|
|
278 * gene predictions from a sequenced genome
|
0
|
279
|
|
280 -----
|
|
281
|
|
282 **Options**
|
|
283
|
|
284 * **Orthogroups or gene families proteins scaffold** - PlantTribes scaffolds data.
|
28
|
285 * **Protein clustering method** - One of GFam (domain architecture based clustering), OrthoFinder (broadly defined clusters) or OrthoMCL (narrowly defined clusters).
|
|
286 * **Protein classification method** - blastp (faster), HMMScan (slower but more sensative to the remote homologs) or both (more exhaustive).
|
|
287 * **Super Orthogroups** - Secondary MCL clusters of orthogroups.
|
45
|
288 * **Specify single copy orthogroup selection?** - Select 'Yes' to specify one of 'Single copy orthogroup custom' (not yet supported) or 'Minumum single copy taxa required in orthogroup'.
|
0
|
289 * **Minumum single copy taxa required in orthogroup** - Used with "Minumum single copy taxa required in orthogroup" configuration only.
|
|
290 * **Minumum taxa required in single copy orthogroup** - Used with "Minumum single copy taxa required in orthogroup" configuration only.
|
|
291 * **Corresponding coding sequences (CDS) fasta file** - Used only when selecting "Create orthogroup fasta files?".
|
|
292
|
|
293 </help>
|
|
294 <citations>
|
|
295 <citation type="bibtex">
|
|
296 @unpublished{None,
|
28
|
297 author = {Eric Wafula},
|
0
|
298 title = {None},
|
|
299 year = {None},
|
35
|
300 url = {https://github.com/dePamphilis/PlantTribes}
|
|
301 }</citation>
|
|
302 <citation type="doi">10.1186/1471-2105-10-421</citation>
|
|
303 <citation type="bibtex">
|
|
304 @unpublished{None,
|
|
305 author = {None},
|
|
306 title = {HMMER 3.1+ hmmscan search sequence(s) against a profile database},
|
|
307 year = {2013},
|
|
308 url = {http://hmmer.org/}
|
0
|
309 }</citation>
|
|
310 </citations>
|
|
311 </tool>
|