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