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