Mercurial > repos > iuc > kofamscan
comparison kofamscan.xml @ 3:c3c46f14c7a4 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kofamscan commit db30370820c68a8add7974d70ad04585cea5b084
author | iuc |
---|---|
date | Mon, 22 Apr 2024 14:41:54 +0000 |
parents | 95c71179a054 |
children | 2eb7932e91a3 |
comparison
equal
deleted
inserted
replaced
2:95c71179a054 | 3:c3c46f14c7a4 |
---|---|
1 <tool id="kofamscan" name="KofamScan" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> | 1 <tool id="kofamscan" name="KofamScan" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> |
2 <description>gene function annotation based on KEGG orthology and HMM</description> | 2 <description>gene function annotation based on KEGG orthology and HMM</description> |
3 <macros> | 3 <macros> |
4 <token name="@TOOL_VERSION@">1.3.0</token> | 4 <token name="@TOOL_VERSION@">1.3.0</token> |
5 <token name="@VERSION_SUFFIX@">1</token> | 5 <token name="@VERSION_SUFFIX@">2</token> |
6 <xml name="reportannotation" token_selected=""> | 6 <xml name="reportannotation" token_selected=""> |
7 <param name="reportannotation" type="boolean" truevalue="--report-unannotated" falsevalue="--no-report-unannotated" checked="@SELECTED@" label="Include sequence name to outputs even if no KOs are assigned?"/> | 7 <param name="reportannotation" type="boolean" truevalue="--report-unannotated" falsevalue="--no-report-unannotated" checked="@SELECTED@" label="Include sequence name to outputs even if no KOs are assigned?"/> |
8 </xml> | 8 </xml> |
9 </macros> | 9 </macros> |
10 <xrefs> | 10 <xrefs> |
12 </xrefs> | 12 </xrefs> |
13 <requirements> | 13 <requirements> |
14 <requirement type="package" version="@TOOL_VERSION@">kofamscan</requirement> | 14 <requirement type="package" version="@TOOL_VERSION@">kofamscan</requirement> |
15 <requirement type="package" version="3.0">zip</requirement> | 15 <requirement type="package" version="3.0">zip</requirement> |
16 </requirements> | 16 </requirements> |
17 <version_command><![CDATA[sansa -v | grep "Sansa " | cut -d "v" -f 3]]></version_command> | 17 <version_command><![CDATA[exec_annotation --version | cut -d " " -f 2]]></version_command> |
18 <command detect_errors="exit_code"><![CDATA[ | 18 <command detect_errors="exit_code"><![CDATA[ |
19 ## preprocessing | 19 #if $p_cond.p_sel != "cached" |
20 mkdir ./profile && | 20 ## preprocessing |
21 mkdir ./temp_extract && | 21 mkdir ./profile && |
22 #if $p_cond.p_sel == 'compressed' | 22 mkdir ./temp_extract && |
23 tar -xf '${p_cond.p}' -C temp_extract && | 23 #if $p_cond.p_sel == 'compressed' |
24 find ./temp_extract/ -name '*.hmm' -exec mv {} ./profile \; && | 24 tar -xf '${p_cond.p}' -C temp_extract && |
25 find ./temp_extract/ -name '*.hal' -exec mv {} ./profile \; && | 25 find ./temp_extract/ -name '*.hmm' -exec mv {} ./profile \; && |
26 #elif $p_cond.p_sel == 'hmm' | 26 find ./temp_extract/ -name '*.hal' -exec mv {} ./profile \; && |
27 ## input files require prefix 'K' and file extension '.hmm' | 27 #elif $p_cond.p_sel == 'hmm' |
28 #for $i, $current in enumerate($p_cond.p) | 28 ## input files require prefix 'K' and file extension '.hmm' |
29 ln -s '$current' 'profile/K${i}.hmm' && | 29 #for $i, $current in enumerate($p_cond.p) |
30 #end for | 30 ln -s '$current' 'profile/K${i}.hmm' && |
31 #end for | |
32 #end if | |
31 #end if | 33 #end if |
32 | 34 |
33 ## run | 35 ## run |
34 exec_annotation | 36 exec_annotation |
35 -p 'profile' | 37 |
38 #if $p_cond.p_sel != "cached" | |
39 -p 'profile' | |
40 -k '$p_cond.k' | |
41 #else | |
42 -p '$p_cond.kofam.fields.profile_dir/#if $p_cond.kofam_subset then $p_cond.kofam_subset else ""#' | |
43 -k '$p_cond.kofam.fields.ko_list' | |
44 #end if | |
36 -o 'result.txt' | 45 -o 'result.txt' |
37 -k '$k' | |
38 --cpu \${GALAXY_SLOTS:-4} | 46 --cpu \${GALAXY_SLOTS:-4} |
39 -E $E | 47 -E $E |
40 -T $ap.T | 48 -T $ap.T |
41 -f '$ap.f_cond.f_sel' | 49 -f '$ap.f_cond.f_sel' |
42 $ap.f_cond.reportannotation | 50 $ap.f_cond.reportannotation |
52 ]]></command> | 60 ]]></command> |
53 <inputs> | 61 <inputs> |
54 <param name="query" type="data" format="fasta" label="Select query sequence file" help="Nucleotide sequences are not accepted."/> | 62 <param name="query" type="data" format="fasta" label="Select query sequence file" help="Nucleotide sequences are not accepted."/> |
55 <conditional name="p_cond"> | 63 <conditional name="p_cond"> |
56 <param name="p_sel" type="select" label="Select profile database format"> | 64 <param name="p_sel" type="select" label="Select profile database format"> |
57 <option value="compressed" selected="true">Compressed set of HMM and HAL file(s)</option> | 65 <option value="cached" selected="true">Cached</option> |
66 <option value="compressed">Compressed set of HMM and HAL file(s)</option> | |
58 <option value="hmm">HMM file(s)</option> | 67 <option value="hmm">HMM file(s)</option> |
59 </param> | 68 </param> |
69 <when value="cached"> | |
70 <param name="kofam" type="select"> | |
71 <options from_data_table="kofam"/> | |
72 </param> | |
73 <param name="kofam_subset" type="select" optional="true"> | |
74 <options from_data_table="kofam_subset"> | |
75 <filter type="param_value" column="2" ref="kofam"/> | |
76 <filter type="sort_by" column="1"/> | |
77 <filter type="unique_value" column="1"/> | |
78 <column name="name" index="1"/> | |
79 <column name="value" index="0"/> | |
80 </options> | |
81 <validator type="no_options" message="No option available for this input"/> | |
82 </param> | |
83 </when> | |
60 <when value="compressed"> | 84 <when value="compressed"> |
61 <param argument="-p" type="data" format="tar" label="Select a compressed file with HMM and HAL file(s)" help="Compressed archives are available from KofamKOALA web service (https://www.genome.jp/tools/kofamkoala/)."/> | 85 <param argument="-p" type="data" format="tar" label="Select a compressed file with HMM and HAL file(s)" help="Compressed archives are available from KofamKOALA web service (https://www.genome.jp/tools/kofamkoala/)."/> |
86 <param argument="-k" type="data" format="tabular" label="Select KO list file"/> | |
62 </when> | 87 </when> |
63 <when value="hmm"> | 88 <when value="hmm"> |
64 <param argument="-p" type="data" format="hmm3" multiple="true" label="Select profile HMM file(s)"/> | 89 <param argument="-p" type="data" format="hmm3" multiple="true" label="Select profile HMM file(s)"/> |
90 <param argument="-k" type="data" format="tabular" label="Select KO list file"/> | |
65 </when> | 91 </when> |
66 </conditional> | 92 </conditional> |
67 <param argument="-k" type="data" format="tabular" label="Select KO list file"/> | |
68 <param argument="-E" type="float" min="0.0" max="1.0" value="0.01" label="Set E-value threshold"/> | 93 <param argument="-E" type="float" min="0.0" max="1.0" value="0.01" label="Set E-value threshold"/> |
69 <section name="ap" title="Advanced parameters" expanded="true"> | 94 <section name="ap" title="Advanced parameters" expanded="true"> |
70 <param argument="-T" type="integer" value="1" label="Set threshold scale" help="The score thresholds will be multiplied by this value."/> | 95 <param argument="-T" type="integer" value="1" label="Set threshold scale" help="The score thresholds will be multiplied by this value."/> |
71 <conditional name="f_cond"> | 96 <conditional name="f_cond"> |
72 <param name="f_sel" type="select" label="Select output format"> | 97 <param name="f_sel" type="select" label="Select output format"> |
95 <option value="tabular">HMMER tabular summary</option> | 120 <option value="tabular">HMMER tabular summary</option> |
96 </param> | 121 </param> |
97 </section> | 122 </section> |
98 </inputs> | 123 </inputs> |
99 <outputs> | 124 <outputs> |
125 <data name="out_result" format="txt" from_work_dir="result.txt" label="${tool.name} on ${on_string}: Results"> | |
126 <filter>'result' in ap['out']</filter> | |
127 <change_format> | |
128 <when input='ap.f_cond.f_sel' value="detail-tsv" format="tabular" /> | |
129 </change_format> | |
130 </data> | |
100 <data name="out_alignments" format="zip" from_work_dir="tmp/alignments.zip" label="${tool.name} on ${on_string}: HMMER alignments"> | 131 <data name="out_alignments" format="zip" from_work_dir="tmp/alignments.zip" label="${tool.name} on ${on_string}: HMMER alignments"> |
101 <filter>'alignments' in ap['out']</filter> | 132 <filter>'alignments' in ap['out']</filter> |
102 </data> | 133 </data> |
103 <data name="out_output" format="txt" from_work_dir="tmp/output/output.txt" label="${tool.name} on ${on_string}: HMMER output"> | 134 <data name="out_output" format="txt" from_work_dir="tmp/output/output.txt" label="${tool.name} on ${on_string}: HMMER output"> |
104 <filter>'output' in ap['out']</filter> | 135 <filter>'output' in ap['out']</filter> |
105 </data> | |
106 <data name="out_result" format="txt" from_work_dir="result.txt" label="${tool.name} on ${on_string}: Results"> | |
107 <filter>'result' in ap['out']</filter> | |
108 </data> | 136 </data> |
109 <data name="out_tabular" format="txt" from_work_dir="tmp/tabular/tabular.txt" label="${tool.name} on ${on_string}: HMMER tabular"> | 137 <data name="out_tabular" format="txt" from_work_dir="tmp/tabular/tabular.txt" label="${tool.name} on ${on_string}: HMMER tabular"> |
110 <filter>'tabular' in ap['out']</filter> | 138 <filter>'tabular' in ap['out']</filter> |
111 </data> | 139 </data> |
112 </outputs> | 140 </outputs> |
129 <!-- #2 --> | 157 <!-- #2 --> |
130 <test expect_num_outputs="4"> | 158 <test expect_num_outputs="4"> |
131 <param name="query" value="query.fasta"/> | 159 <param name="query" value="query.fasta"/> |
132 <conditional name="p_cond"> | 160 <conditional name="p_cond"> |
133 <param name="p_sel" value="hmm"/> | 161 <param name="p_sel" value="hmm"/> |
134 <param name="p" value="K00001.hmm,K00002.hmm,K00003.hmm"/> | 162 <param name="p" value="profiles/K00001.hmm,profiles/K00002.hmm,profiles/K00003.hmm"/> |
135 </conditional> | 163 </conditional> |
136 <param name="k" value="ko"/> | 164 <param name="k" value="ko"/> |
137 <param name="E" value="0.02"/> | 165 <param name="E" value="0.02"/> |
138 <section name="ap"> | 166 <section name="ap"> |
139 <param name="T" value="2"/> | 167 <param name="T" value="2"/> |
152 <assert_contents> | 180 <assert_contents> |
153 <has_n_lines n="224"/> | 181 <has_n_lines n="224"/> |
154 <has_line line="Internal pipeline statistics summary:"/> | 182 <has_line line="Internal pipeline statistics summary:"/> |
155 </assert_contents> | 183 </assert_contents> |
156 </output> | 184 </output> |
157 <output name="out_result"> | 185 <output name="out_result" ftype="tabular"> |
158 <assert_contents> | 186 <assert_contents> |
159 <has_n_lines n="9"/> | 187 <has_n_lines n="9"/> |
160 <has_text_matching expression=".+sp\|P19858\|LDHA_BOVIN"/> | 188 <has_text_matching expression=".+sp\|P19858\|LDHA_BOVIN"/> |
161 </assert_contents> | 189 </assert_contents> |
162 </output> | 190 </output> |
170 <!-- #3 --> | 198 <!-- #3 --> |
171 <test expect_num_outputs="1"> | 199 <test expect_num_outputs="1"> |
172 <param name="query" value="query.fasta"/> | 200 <param name="query" value="query.fasta"/> |
173 <conditional name="p_cond"> | 201 <conditional name="p_cond"> |
174 <param name="p_sel" value="hmm"/> | 202 <param name="p_sel" value="hmm"/> |
175 <param name="p" value="K00001.hmm,K00002.hmm,K00003.hmm"/> | 203 <param name="p" value="profiles/K00001.hmm,profiles/K00002.hmm,profiles/K00003.hmm"/> |
176 </conditional> | 204 </conditional> |
177 <param name="k" value="ko"/> | 205 <param name="k" value="ko"/> |
178 <section name="ap"> | 206 <section name="ap"> |
179 <conditional name="f_cond"> | 207 <conditional name="f_cond"> |
180 <param name="f_sel" value="mapper"/> | 208 <param name="f_sel" value="mapper"/> |
181 </conditional> | 209 </conditional> |
182 </section> | 210 </section> |
183 <output name="out_result"> | 211 <output name="out_result" ftype="txt"> |
184 <assert_contents> | 212 <assert_contents> |
185 <has_n_lines n="7"/> | 213 <has_n_lines n="7"/> |
186 <has_line line="sp|P19858|LDHA_BOVIN"/> | 214 <has_line line="sp|P19858|LDHA_BOVIN"/> |
187 </assert_contents> | 215 </assert_contents> |
188 </output> | 216 </output> |
190 <!-- #4 --> | 218 <!-- #4 --> |
191 <test expect_num_outputs="1"> | 219 <test expect_num_outputs="1"> |
192 <param name="query" value="query.fasta"/> | 220 <param name="query" value="query.fasta"/> |
193 <conditional name="p_cond"> | 221 <conditional name="p_cond"> |
194 <param name="p_sel" value="hmm"/> | 222 <param name="p_sel" value="hmm"/> |
195 <param name="p" value="K00001.hmm,K00002.hmm,K00003.hmm"/> | 223 <param name="p" value="profiles/K00001.hmm,profiles/K00002.hmm,profiles/K00003.hmm"/> |
196 </conditional> | 224 </conditional> |
197 <param name="k" value="ko"/> | 225 <param name="k" value="ko"/> |
198 <section name="ap"> | 226 <section name="ap"> |
199 <conditional name="f_cond"> | 227 <conditional name="f_cond"> |
200 <param name="f_sel" value="mapper-one-line"/> | 228 <param name="f_sel" value="mapper-one-line"/> |
217 <param name="k" value="ko"/> | 245 <param name="k" value="ko"/> |
218 <output name="out_result"> | 246 <output name="out_result"> |
219 <assert_contents> | 247 <assert_contents> |
220 <has_n_lines n="5"/> | 248 <has_n_lines n="5"/> |
221 <has_text_matching expression=".+sp\|P00329\|ADH1_MOUSE.+"/> | 249 <has_text_matching expression=".+sp\|P00329\|ADH1_MOUSE.+"/> |
250 </assert_contents> | |
251 </output> | |
252 </test> | |
253 <!-- #6 test with cached data --> | |
254 <test expect_num_outputs="1"> | |
255 <param name="query" value="query.fasta"/> | |
256 <conditional name="p_cond"> | |
257 <param name="p_sel" value="cached"/> | |
258 <param name="kofam" value="test_value"/> | |
259 </conditional> | |
260 <param name="k" value="ko"/> | |
261 <section name="ap"> | |
262 <conditional name="f_cond"> | |
263 <param name="f_sel" value="mapper-one-line"/> | |
264 </conditional> | |
265 </section> | |
266 <output name="out_result" ftype="txt"> | |
267 <assert_contents> | |
268 <has_n_lines n="7"/> | |
269 <has_line line="sp|P19858|LDHA_BOVIN"/> | |
270 </assert_contents> | |
271 </output> | |
272 </test> | |
273 <!-- #6 test with cached data + subset --> | |
274 <test expect_num_outputs="1"> | |
275 <param name="query" value="query.fasta"/> | |
276 <conditional name="p_cond"> | |
277 <param name="p_sel" value="cached"/> | |
278 <param name="kofam" value="test_value"/> | |
279 <param name="kofam_subset" value="SUBSET"/> | |
280 </conditional> | |
281 <param name="k" value="ko"/> | |
282 <section name="ap"> | |
283 <conditional name="f_cond"> | |
284 <param name="f_sel" value="mapper-one-line"/> | |
285 </conditional> | |
286 </section> | |
287 <output name="out_result" ftype="txt"> | |
288 <assert_contents> | |
289 <has_n_lines n="7"/> | |
290 <has_line line="sp|P19858|LDHA_BOVIN"/> | |
222 </assert_contents> | 291 </assert_contents> |
223 </output> | 292 </output> |
224 </test> | 293 </test> |
225 </tests> | 294 </tests> |
226 <help><![CDATA[ | 295 <help><![CDATA[ |