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