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
|
|
17 #set scaffold_path = $scaffold.fields.path
|
|
18 #set scaffold_dir = $os.path.split($scaffold_path)[0]
|
|
19 #set scaffold_selection = $os.path.split($scaffold_path)[1]
|
35
|
20
|
21
|
21 #if str($options_type.options_type_selector) == 'advanced':
|
51
|
22 #set specify_super_orthogroups_cond = $options_type.specify_super_orthogroups_cond
|
|
23 #set specify_super_orthogroups = $specify_super_orthogroups_cond.specify_super_orthogroups
|
17
|
24 #set create_orthogroup_cond = $options_type.create_orthogroup_cond
|
|
25 #set create_orthogroup = $create_orthogroup_cond.create_orthogroup
|
44
|
26 #set specify_single_copy_cond = $options_type.specify_single_copy_cond
|
46
|
27 #set specify_single_copy = $specify_single_copy_cond.specify_single_copy
|
44
|
28
|
51
|
29 #if str($specify_super_orthogroups) == 'yes':
|
|
30 #set specify_super_orthos = True
|
|
31 #set super_orthogroups = $specify_super_orthogroups_cond.super_orthogroups
|
|
32 #else:
|
|
33 #set specify_super_orthos = False
|
|
34 #end if
|
|
35
|
21
|
36 #if str($create_orthogroup) == 'yes':
|
44
|
37 #set create_ortho_sequences = True
|
|
38 #set orthogroups_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'orthogroups_fasta')
|
21
|
39 #set create_corresponding_coding_sequences_cond = $create_orthogroup_cond.create_corresponding_coding_sequences_cond
|
44
|
40
|
21
|
41 #if str($create_corresponding_coding_sequences_cond.create_corresponding_coding_sequences) == 'yes':
|
|
42 #set create_corresponding_coding_sequences = True
|
63
|
43 #set orthogroups_fasta_dest_dir = $output_ptorthocs.extra_files_path
|
21
|
44 #else:
|
|
45 #set create_corresponding_coding_sequences = False
|
63
|
46 #set orthogroups_fasta_dest_dir = $output_ptortho.extra_files_path
|
44
|
47 #end if
|
|
48 mkdir -p $orthogroups_fasta_dest_dir &&
|
21
|
49 #else:
|
|
50 #set create_ortho_sequences = False
|
23
|
51 #set create_corresponding_coding_sequences = False
|
21
|
52 #end if
|
52
|
53
|
|
54 #if str($specify_single_copy) == 'yes':
|
|
55 #set single_copy_orthogroup = True
|
|
56 #set single_copy_cond = $specify_single_copy_cond.single_copy_cond
|
|
57 ## FixMe: the single_copy_custom option is not currently supported.
|
|
58 #set single_copy = $single_copy_cond.single_copy
|
|
59 #if $create_ortho_sequences:
|
|
60 #set single_copy_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'single_copy_fasta')
|
|
61 #set single_copy_fasta_dest_dir = $output_ptsco.extra_files_path
|
|
62 mkdir -p $single_copy_fasta_dest_dir &&
|
|
63 #end if:
|
|
64 #else:
|
|
65 #set single_copy_orthogroup = False
|
|
66 #end if
|
|
67
|
13
|
68 #else:
|
47
|
69 #set single_copy_orthogroup = False
|
13
|
70 #set create_ortho_sequences = False
|
23
|
71 #set create_corresponding_coding_sequences = False
|
4
|
72 #end if
|
20
|
73
|
0
|
74 GeneFamilyClassifier
|
35
|
75 --proteins '$input'
|
|
76 --scaffold_dir '$scaffold_dir'
|
|
77 --scaffold '$scaffold_selection'
|
0
|
78 --method $method
|
13
|
79 --classifier $save_hmmscan_log_cond.classifier
|
30
|
80 --num_threads \${GALAXY_SLOTS:-4}
|
20
|
81
|
0
|
82 #if str($options_type.options_type_selector) == 'advanced':
|
51
|
83 #if specify_super_orthos:
|
|
84 --super_orthogroups $super_orthogroups
|
|
85 #end if
|
47
|
86 #if $single_copy_orthogroup:
|
44
|
87 --single_copy_taxa $single_copy_cond.single_copy_taxa
|
|
88 --taxa_present $single_copy_cond.taxa_present
|
0
|
89 #end if
|
17
|
90 #if str($create_orthogroup) == 'yes':
|
0
|
91 --orthogroup_fasta
|
18
|
92 #if $create_corresponding_coding_sequences:
|
35
|
93 --coding_sequences '$create_corresponding_coding_sequences_cond.coding_sequences'
|
17
|
94 #end if
|
0
|
95 #end if
|
|
96 #end if
|
44
|
97 >/dev/null
|
20
|
98
|
13
|
99 #if str($save_hmmscan_log_cond.classifier) == 'hmmscan' or str($save_hmmscan_log_cond.classifier) == 'both':
|
|
100 #if str($save_hmmscan_log_cond.save_hmmscan_log) == 'yes':
|
15
|
101 && mv geneFamilyClassification_dir/hmmscan.log $hmmscan_log
|
13
|
102 #else:
|
15
|
103 && rm geneFamilyClassification_dir/hmmscan.log
|
13
|
104 #end if
|
12
|
105 #end if
|
20
|
106
|
58
|
107 #if $create_ortho_sequences:
|
62
|
108 #if $create_corresponding_coding_sequences:
|
65
|
109 && echo "#Size\tName" > $output_ptorthocs
|
|
110 && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_ptorthocs
|
62
|
111 #else:
|
65
|
112 && echo "#Size\tName" > $output_ptortho
|
|
113 && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_ptortho
|
18
|
114 #end if
|
62
|
115 && mv $orthogroups_fasta_src_dir/* $orthogroups_fasta_dest_dir
|
4
|
116 #end if
|
20
|
117
|
47
|
118 #if $single_copy_orthogroup:
|
58
|
119 #if $create_ortho_sequences:
|
65
|
120 && echo "#Size\tName" > $output_ptsco
|
|
121 && ls -l $single_copy_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_ptsco
|
62
|
122 && mv $single_copy_fasta_src_dir/* $single_copy_fasta_dest_dir
|
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 -->
|
65
|
194 <option value="taxa">Minimum single copy taxa required in orthogroup</option>
|
44
|
195 </param>
|
|
196 <when value="custom" />
|
|
197 <when value="taxa">
|
65
|
198 <param name="single_copy_taxa" type="integer" value="20" label="Minimum single copy taxa required in orthogroup"/>
|
|
199 <param name="taxa_present" type="integer" value="21" label="Minimum taxa required in single copy orthogroup"/>
|
44
|
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>
|
30
|
243 <collection name="orthos" type="list">
|
12
|
244 <discover_datasets pattern="__name__" directory="geneFamilyClassification_dir" visible="false" ext="tabular" />
|
0
|
245 </collection>
|
|
246 </outputs>
|
|
247 <tests>
|
39
|
248 <!-- Not sure how to test this since the tool requires scaffolds data which is extremely large and installed using a Data Manager -->
|
|
249 <!--
|
0
|
250 <test>
|
30
|
251 <param name="input" value="transcripts.cleaned.nr.pep" ftype="fasta" />
|
|
252 <param name="scaffold" value="22Gv1.1"/>
|
|
253 <param name="method" value="orthomcl"/>
|
|
254 <param name="classifier" value="blastp"/>
|
0
|
255 <param name="dereplicate" value="yes"/>
|
|
256 <param name="min_length" value="200"/>
|
|
257 <output_collection name="orthos" type="list">
|
35
|
258 <element name="proteins.blastp.22Gv1.1" file="proteins.blastp.22Gv1.1" ftype="tabular"/>
|
|
259 <element name="proteins.blastp.22Gv1.1.bestOrthos" file="proteins.blastp.22Gv1.1.bestOrthos" ftype="tabular"/>
|
|
260 <element name="proteins.blastp.22Gv1.1.bestOrthos.summary" file="proteins.blastp.22Gv1.1.bestOrthos.summary" ftype="tabular"/>
|
0
|
261 </output_collection>
|
|
262 </test>
|
35
|
263 -->
|
0
|
264 </tests>
|
|
265 <help>
|
|
266 This tool is one of the PlantTribes' collection of automated modular analysis pipelines that utilize objective classifications of
|
28
|
267 complete protein sequences from sequenced plant genomes to perform comparative evolutionary studies. This tool classifies gene
|
|
268 sequences into precomputed orthologous gene family clusters using either blastp (faster), HMMScan (slower but more sensitive
|
|
269 to remote homologs) or both (more exhaustive).
|
|
270
|
30
|
271 This tool accepts any of the following as input:
|
28
|
272
|
|
273 * the postprocessed assemblies produced by the **Postprocess de novo assembly transcripts into putative coding sequences** tool
|
|
274 * externally predicted coding sequences and their corresponding amino acid translations derived from a transcriptome assembly
|
|
275 * gene predictions from a sequenced genome
|
0
|
276
|
|
277 -----
|
|
278
|
|
279 **Options**
|
|
280
|
|
281 * **Orthogroups or gene families proteins scaffold** - PlantTribes scaffolds data.
|
28
|
282 * **Protein clustering method** - One of GFam (domain architecture based clustering), OrthoFinder (broadly defined clusters) or OrthoMCL (narrowly defined clusters).
|
|
283 * **Protein classification method** - blastp (faster), HMMScan (slower but more sensative to the remote homologs) or both (more exhaustive).
|
|
284 * **Super Orthogroups** - Secondary MCL clusters of orthogroups.
|
65
|
285 * **Specify single copy orthogroup selection?** - Select 'Yes' to specify 'Minimum single copy taxa required in orthogroup'.
|
|
286 * **Minimum single copy taxa required in orthogroup** - Used with "Minimum single copy taxa required in orthogroup" configuration only.
|
|
287 * **Minimum taxa required in single copy orthogroup** - Used with "Minimum single copy taxa required in orthogroup" configuration only.
|
0
|
288 * **Corresponding coding sequences (CDS) fasta file** - Used only when selecting "Create orthogroup fasta files?".
|
|
289
|
|
290 </help>
|
|
291 <citations>
|
|
292 <citation type="bibtex">
|
|
293 @unpublished{None,
|
28
|
294 author = {Eric Wafula},
|
0
|
295 title = {None},
|
|
296 year = {None},
|
35
|
297 url = {https://github.com/dePamphilis/PlantTribes}
|
|
298 }</citation>
|
|
299 <citation type="doi">10.1186/1471-2105-10-421</citation>
|
|
300 <citation type="bibtex">
|
|
301 @unpublished{None,
|
|
302 author = {None},
|
|
303 title = {HMMER 3.1+ hmmscan search sequence(s) against a profile database},
|
|
304 year = {2013},
|
|
305 url = {http://hmmer.org/}
|
0
|
306 }</citation>
|
|
307 </citations>
|
|
308 </tool>
|