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