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