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