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