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