0
|
1 <?xml version="1.0" ?>
|
|
2 <tool id="qiime_feature-classifier_fit-classifier-naive-bayes" name="qiime feature-classifier fit-classifier-naive-bayes" version="2019.4">
|
|
3 <description> - Train the naive_bayes classifier</description>
|
|
4 <requirements>
|
|
5 <requirement type="package" version="2019.4">qiime2</requirement>
|
|
6 </requirements>
|
|
7 <command><![CDATA[
|
|
8 qiime feature-classifier fit-classifier-naive-bayes
|
|
9
|
|
10 --i-reference-reads=$ireferencereads
|
|
11
|
|
12
|
|
13 #if str( $id_to_taxonomy_fp.selector ) == 'history'
|
|
14 #set $tax = $id_to_taxonomy_fp.taxonomy_fp
|
|
15 --i-reference-taxonomy '$tax'
|
|
16 #else:
|
|
17 #set $tax = $id_to_taxonomy_fp.taxonomy_fp.fields.path
|
|
18 --i-reference-taxonomy '$tax'
|
|
19 #end if
|
|
20
|
|
21
|
|
22 #if str($iclassweight) != 'None':
|
|
23 --i-class-weight=$iclassweight
|
|
24 #end if
|
|
25
|
|
26 #if $pclassifyalpha:
|
|
27 --p-classify--alpha=$pclassifyalpha
|
|
28 #end if
|
|
29
|
|
30 #if $pclassifychunksize:
|
|
31 --p-classify--chunk-size=$pclassifychunksize
|
|
32 #end if
|
|
33
|
4
|
34
|
|
35
|
|
36
|
|
37 #if '__sq__' in str($pclassifyclassprior):
|
|
38 #set $pclassifyclassprior_temp = $pclassifyclassprior.replace('__sq__', "'")
|
|
39 #set $pclassifyclassprior = $pclassifyclassprior_temp
|
|
40 #end if
|
|
41
|
0
|
42 #if str($pclassifyclassprior):
|
|
43 --p-classify--class-prior="$pclassifyclassprior"
|
|
44 #end if
|
|
45
|
4
|
46
|
|
47
|
|
48
|
0
|
49 #if $pclassifyfitprior:
|
|
50 --p-classify--fit-prior
|
|
51 #end if
|
|
52
|
|
53 #if $pfeatextalternatesign:
|
|
54 --p-feat-ext--alternate-sign
|
|
55 #end if
|
|
56
|
4
|
57
|
|
58
|
|
59
|
|
60
|
|
61 #if '__sq__' in str($pfeatextanalyzer):
|
|
62 #set $pfeatextanalyzer_temp = $pfeatextanalyzer.replace('__sq__', "'")
|
|
63 #set $pfeatextanalyzer = $pfeatextanalyzer_temp
|
|
64 #end if
|
|
65
|
0
|
66 #if str($pfeatextanalyzer):
|
|
67 --p-feat-ext--analyzer="$pfeatextanalyzer"
|
|
68 #end if
|
|
69
|
4
|
70
|
|
71
|
|
72
|
|
73
|
0
|
74 #if $pfeatextbinary:
|
|
75 --p-feat-ext--binary
|
|
76 #end if
|
|
77
|
4
|
78
|
|
79
|
|
80 #if '__sq__' in str($pfeatextdecodeerror):
|
|
81 #set $pfeatextdecodeerror_temp = $pfeatextdecodeerror.replace('__sq__', "'")
|
|
82 #set $pfeatextdecodeerror = $pfeatextdecodeerror_temp
|
|
83 #end if
|
|
84
|
0
|
85 #if str($pfeatextdecodeerror):
|
|
86 --p-feat-ext--decode-error="$pfeatextdecodeerror"
|
|
87 #end if
|
|
88
|
4
|
89
|
|
90
|
|
91
|
|
92
|
|
93 #if '__sq__' in str($pfeatextencoding):
|
|
94 #set $pfeatextencoding_temp = $pfeatextencoding.replace('__sq__', "'")
|
|
95 #set $pfeatextencoding = $pfeatextencoding_temp
|
|
96 #end if
|
|
97
|
0
|
98 #if str($pfeatextencoding):
|
|
99 --p-feat-ext--encoding="$pfeatextencoding"
|
|
100 #end if
|
|
101
|
4
|
102
|
|
103
|
|
104
|
|
105
|
|
106 #if '__sq__' in str($pfeatextinput):
|
|
107 #set $pfeatextinput_temp = $pfeatextinput.replace('__sq__', "'")
|
|
108 #set $pfeatextinput = $pfeatextinput_temp
|
|
109 #end if
|
|
110
|
0
|
111 #if str($pfeatextinput):
|
|
112 --p-feat-ext--input="$pfeatextinput"
|
|
113 #end if
|
|
114
|
4
|
115
|
|
116
|
|
117
|
0
|
118 #if $pnofeatextlowercase:
|
|
119 --p-no-feat-ext--lowercase
|
|
120 #end if
|
|
121
|
|
122 #if $pfeatextnfeatures:
|
|
123 --p-feat-ext--n-features=$pfeatextnfeatures
|
|
124 #end if
|
|
125
|
4
|
126
|
|
127
|
|
128
|
|
129 #if '__sq__' in str($pfeatextngramrange):
|
|
130 #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('__sq__', "'")
|
|
131 #set $pfeatextngramrange = $pfeatextngramrange_temp
|
|
132 #end if
|
|
133
|
0
|
134 #if '__ob__' in str($pfeatextngramrange):
|
|
135 #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('__ob__', '[')
|
|
136 #set $pfeatextngramrange = $pfeatextngramrange_temp
|
|
137 #end if
|
|
138 #if 'X' in str($pfeatextngramrange):
|
|
139 #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('X', '\\')
|
|
140 #set $pfeatextngramrange = $pfeatextngramrange_temp
|
|
141 #end if
|
|
142
|
|
143 #if str($pfeatextngramrange):
|
|
144 --p-feat-ext--ngram-range="$pfeatextngramrange"
|
|
145 #end if
|
|
146
|
|
147
|
4
|
148
|
|
149
|
|
150
|
0
|
151 #if $pfeatextnonnegative:
|
|
152 --p-feat-ext--non-negative
|
|
153 #end if
|
|
154
|
4
|
155
|
|
156 #if '__sq__' in str($pfeatextnorm):
|
|
157 #set $pfeatextnorm_temp = $pfeatextnorm.replace('__sq__', "'")
|
|
158 #set $pfeatextnorm = $pfeatextnorm_temp
|
|
159 #end if
|
|
160
|
0
|
161 #if str($pfeatextnorm):
|
|
162 --p-feat-ext--norm="$pfeatextnorm"
|
|
163 #end if
|
|
164
|
4
|
165
|
|
166
|
|
167
|
|
168 #if '__sq__' in str($pfeatextpreprocessor):
|
|
169 #set $pfeatextpreprocessor_temp = $pfeatextpreprocessor.replace('__sq__', "'")
|
|
170 #set $pfeatextpreprocessor = $pfeatextpreprocessor_temp
|
|
171 #end if
|
|
172
|
0
|
173 #if str($pfeatextpreprocessor):
|
|
174 --p-feat-ext--preprocessor="$pfeatextpreprocessor"
|
|
175 #end if
|
|
176
|
4
|
177
|
|
178
|
|
179
|
|
180 #if '__sq__' in str($pfeatextstopwords):
|
|
181 #set $pfeatextstopwords_temp = $pfeatextstopwords.replace('__sq__', "'")
|
|
182 #set $pfeatextstopwords = $pfeatextstopwords_temp
|
|
183 #end if
|
|
184
|
0
|
185 #if str($pfeatextstopwords):
|
|
186 --p-feat-ext--stop-words="$pfeatextstopwords"
|
|
187 #end if
|
|
188
|
4
|
189
|
|
190
|
|
191
|
|
192
|
|
193 #if '__sq__' in str($pfeatextstripaccents):
|
|
194 #set $pfeatextstripaccents_temp = $pfeatextstripaccents.replace('__sq__', "'")
|
|
195 #set $pfeatextstripaccents = $pfeatextstripaccents_temp
|
|
196 #end if
|
|
197
|
0
|
198 #if str($pfeatextstripaccents):
|
|
199 --p-feat-ext--strip-accents="$pfeatextstripaccents"
|
|
200 #end if
|
|
201
|
4
|
202
|
|
203
|
|
204
|
|
205
|
|
206
|
|
207 #if '__sq__' in str($pfeatexttokenpattern):
|
|
208 #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('__sq__', "'")
|
|
209 #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
|
|
210 #end if
|
|
211
|
0
|
212 #if '__ob__' in str($pfeatexttokenpattern):
|
|
213 #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('__ob__', '[')
|
|
214 #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
|
|
215 #end if
|
4
|
216
|
0
|
217 #if 'X' in str($pfeatexttokenpattern):
|
|
218 #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('X', '\\')
|
|
219 #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
|
|
220 #end if
|
|
221
|
|
222 #if str($pfeatexttokenpattern):
|
|
223 --p-feat-ext--token-pattern="$pfeatexttokenpattern"
|
|
224 #end if
|
|
225
|
|
226
|
4
|
227
|
|
228
|
|
229
|
|
230 #if '__sq__' in str($pfeatexttokenizer):
|
|
231 #set $pfeatexttokenizer_temp = $pfeatexttokenizer.replace('__sq__', "'")
|
|
232 #set $pfeatexttokenizer = $pfeatexttokenizer_temp
|
|
233 #end if
|
|
234
|
0
|
235 #if str($pfeatexttokenizer):
|
|
236 --p-feat-ext--tokenizer="$pfeatexttokenizer"
|
|
237 #end if
|
|
238
|
|
239 --o-classifier=oclassifier
|
|
240 ;
|
|
241 cp oclassifier.qza $oclassifier
|
|
242 ]]></command>
|
|
243 <inputs>
|
|
244 <param format="qza,no_unzip.zip" label="--i-reference-reads: ARTIFACT FeatureData[Sequence] [required]" name="ireferencereads" optional="False" type="data"/>
|
|
245 <param format="qza,no_unzip.zip" label="--i-class-weight: ARTIFACT FeatureTable[RelativeFrequency] [optional]" name="iclassweight" optional="True" type="data"/>
|
|
246
|
|
247 <conditional name="id_to_taxonomy_fp" optional="True">
|
|
248 <param name="selector" type="select" label="Reference taxonomy to query">
|
|
249 <option value="cached">Public databases</option>
|
|
250 <option value="history">Databases from your history</option>
|
|
251 </param>
|
|
252 <when value="cached">
|
|
253 <param argument="--taxonomy_fp" label="Reference taxonomy" type="select" optional="True">
|
|
254 <options from_data_table="qiime_taxonomy" />
|
|
255 </param>
|
|
256 </when>
|
|
257 <when value="history">
|
|
258 <param argument="--taxonomy_fp" type="data" format="qza,no_unzip.zip" label="Reference databases" optional="True" />
|
|
259 </when>
|
|
260 </conditional>
|
|
261
|
|
262 <param label="--p-classify--alpha: NUMBER [default: 0.001]" name="pclassifyalpha" optional="True" type="float" value="0.001"/>
|
|
263 <param label="--p-classify--chunk-size: INTEGER [default: 20000]" name="pclassifychunksize" optional="True" type="integer" value="20000"/>
|
4
|
264 <param label="--p-classify--class-prior: TEXT [default: 'null']" name="pclassifyclassprior" optional="True" type="text" value="null"/>
|
0
|
265 <param label="--p-classify--fit-prior: --p-no-classify--fit-prior [default: False]" name="pclassifyfitprior" selected="False" type="boolean"/>
|
|
266 <param label="--p-feat-ext--alternate-sign: --p-no-feat-ext--alternate-sign [default: False]" name="pfeatextalternatesign" selected="False" type="boolean"/>
|
4
|
267 <param label="--p-feat-ext--analyzer: TEXT [default: 'char_wb']" name="pfeatextanalyzer" optional="True" type="text" value="char_wb"/>
|
0
|
268 <param label="--p-feat-ext--binary: --p-no-feat-ext--binary [default: False]" name="pfeatextbinary" selected="False" type="boolean"/>
|
4
|
269 <param label="--p-feat-ext--decode-error: TEXT [default: 'strict']" name="pfeatextdecodeerror" optional="True" type="text" value="strict"/>
|
|
270 <param label="--p-feat-ext--encoding: TEXT [default: 'utf-8']" name="pfeatextencoding" optional="True" type="text" value="utf-8"/>
|
|
271 <param label="--p-feat-ext--input: TEXT [default: 'content']" name="pfeatextinput" optional="True" type="text" value="content"/>
|
0
|
272 <param label="--p-no-feat-ext--lowercase: [default: False]" name="pnofeatextlowercase" selected="False" type="boolean"/>
|
|
273 <param label="--p-feat-ext--n-features: INTEGER [default: 8192]" name="pfeatextnfeatures" optional="True" type="integer" value="8192"/>
|
4
|
274 <param label="--p-feat-ext--ngram-range: TEXT [default: '[7, 7]']" name="pfeatextngramrange" optional="True" type="text" value="[7, 7]"/>
|
0
|
275 <param label="--p-feat-ext--non-negative: --p-no-feat-ext--non-negative [default: False]" name="pfeatextnonnegative" selected="False" type="boolean"/>
|
4
|
276 <param label="--p-feat-ext--norm: TEXT [default: 'l2']" name="pfeatextnorm" optional="True" type="text" value="l2"/>
|
|
277 <param label="--p-feat-ext--preprocessor: TEXT [default: 'null']" name="pfeatextpreprocessor" optional="True" type="text" value="null"/>
|
|
278 <param label="--p-feat-ext--stop-words: TEXT [default: 'null']" name="pfeatextstopwords" optional="True" type="text" value="null"/>
|
|
279 <param label="--p-feat-ext--strip-accents: TEXT [default: 'null']" name="pfeatextstripaccents" optional="True" type="text" value="null"/>
|
|
280 <param label="--p-feat-ext--token-pattern: TEXT [default: '(?u)\\b\\w\\w+\\b']" name="pfeatexttokenpattern" optional="True" type="text" value="(?u)\\b\\w\\w+\\b"/>
|
|
281 <param label="--p-feat-ext--tokenizer: TEXT [default: 'null']" name="pfeatexttokenizer" optional="True" type="text" value="null"/>
|
0
|
282 </inputs>
|
|
283 <outputs>
|
|
284 <data format="qza" label="${tool.name} on ${on_string}: classifier.qza" name="oclassifier"/>
|
|
285 </outputs>
|
|
286 <help><![CDATA[
|
|
287 Train the naive_bayes classifier
|
|
288 ################################
|
|
289
|
|
290 Create a scikit-learn naive_bayes classifier for reads
|
|
291
|
|
292 Parameters
|
|
293 ----------
|
|
294 reference_reads : FeatureData[Sequence]
|
|
295 \
|
|
296
|
|
297 reference_taxonomy : FeatureData[Taxonomy]
|
|
298 \
|
|
299
|
|
300 class_weight : FeatureTable[RelativeFrequency], optional
|
|
301 \
|
|
302
|
|
303 classify__alpha : Float, optional
|
|
304 \
|
|
305
|
|
306 classify__chunk_size : Int, optional
|
|
307 \
|
|
308
|
|
309 classify__class_prior : Str, optional
|
|
310 \
|
|
311
|
|
312 classify__fit_prior : Bool, optional
|
|
313 \
|
|
314
|
|
315 feat_ext__alternate_sign : Bool, optional
|
|
316 \
|
|
317
|
|
318 feat_ext__analyzer : Str, optional
|
|
319 \
|
|
320
|
|
321 feat_ext__binary : Bool, optional
|
|
322 \
|
|
323
|
|
324 feat_ext__decode_error : Str, optional
|
|
325 \
|
|
326
|
|
327 feat_ext__encoding : Str, optional
|
|
328 \
|
|
329
|
|
330 feat_ext__input : Str, optional
|
|
331 \
|
|
332
|
|
333 feat_ext__lowercase : Bool, optional
|
|
334 \
|
|
335
|
|
336 feat_ext__n_features : Int, optional
|
|
337 \
|
|
338
|
|
339 feat_ext__ngram_range : Str, optional
|
|
340 \
|
|
341
|
|
342 feat_ext__non_negative : Bool, optional
|
|
343 \
|
|
344
|
|
345 feat_ext__norm : Str, optional
|
|
346 \
|
|
347
|
|
348 feat_ext__preprocessor : Str, optional
|
|
349 \
|
|
350
|
|
351 feat_ext__stop_words : Str, optional
|
|
352 \
|
|
353
|
|
354 feat_ext__strip_accents : Str, optional
|
|
355 \
|
|
356
|
|
357 feat_ext__token_pattern : Str, optional
|
|
358 \
|
|
359
|
|
360 feat_ext__tokenizer : Str, optional
|
|
361 \
|
|
362
|
|
363 Returns
|
|
364 -------
|
|
365 classifier : TaxonomicClassifier
|
|
366 \
|
|
367
|
|
368 ]]></help>
|
|
369 <macros>
|
|
370 <import>qiime_citation.xml</import>
|
|
371 </macros>
|
|
372 <expand macro="qiime_citation"/>
|
|
373 </tool>
|