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