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
|
|
34 #if str($pclassifyclassprior):
|
|
35 --p-classify--class-prior="$pclassifyclassprior"
|
|
36 #end if
|
|
37
|
|
38 #if $pclassifyfitprior:
|
|
39 --p-classify--fit-prior
|
|
40 #end if
|
|
41
|
|
42 #if $pfeatextalternatesign:
|
|
43 --p-feat-ext--alternate-sign
|
|
44 #end if
|
|
45
|
|
46 #if str($pfeatextanalyzer):
|
|
47 --p-feat-ext--analyzer="$pfeatextanalyzer"
|
|
48 #end if
|
|
49
|
|
50 #if $pfeatextbinary:
|
|
51 --p-feat-ext--binary
|
|
52 #end if
|
|
53
|
|
54 #if str($pfeatextdecodeerror):
|
|
55 --p-feat-ext--decode-error="$pfeatextdecodeerror"
|
|
56 #end if
|
|
57
|
|
58 #if str($pfeatextencoding):
|
|
59 --p-feat-ext--encoding="$pfeatextencoding"
|
|
60 #end if
|
|
61
|
|
62 #if str($pfeatextinput):
|
|
63 --p-feat-ext--input="$pfeatextinput"
|
|
64 #end if
|
|
65
|
|
66 #if $pnofeatextlowercase:
|
|
67 --p-no-feat-ext--lowercase
|
|
68 #end if
|
|
69
|
|
70 #if $pfeatextnfeatures:
|
|
71 --p-feat-ext--n-features=$pfeatextnfeatures
|
|
72 #end if
|
|
73
|
|
74 #if '__ob__' in str($pfeatextngramrange):
|
|
75 #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('__ob__', '[')
|
|
76 #set $pfeatextngramrange = $pfeatextngramrange_temp
|
|
77 #end if
|
|
78 #if 'X' in str($pfeatextngramrange):
|
|
79 #set $pfeatextngramrange_temp = $pfeatextngramrange.replace('X', '\\')
|
|
80 #set $pfeatextngramrange = $pfeatextngramrange_temp
|
|
81 #end if
|
|
82
|
|
83 #if str($pfeatextngramrange):
|
|
84 --p-feat-ext--ngram-range="$pfeatextngramrange"
|
|
85 #end if
|
|
86
|
|
87
|
|
88 #if $pfeatextnonnegative:
|
|
89 --p-feat-ext--non-negative
|
|
90 #end if
|
|
91
|
|
92 #if str($pfeatextnorm):
|
|
93 --p-feat-ext--norm="$pfeatextnorm"
|
|
94 #end if
|
|
95
|
|
96 #if str($pfeatextpreprocessor):
|
|
97 --p-feat-ext--preprocessor="$pfeatextpreprocessor"
|
|
98 #end if
|
|
99
|
|
100 #if str($pfeatextstopwords):
|
|
101 --p-feat-ext--stop-words="$pfeatextstopwords"
|
|
102 #end if
|
|
103
|
|
104 #if str($pfeatextstripaccents):
|
|
105 --p-feat-ext--strip-accents="$pfeatextstripaccents"
|
|
106 #end if
|
|
107
|
|
108 #if '__ob__' in str($pfeatexttokenpattern):
|
|
109 #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('__ob__', '[')
|
|
110 #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
|
|
111 #end if
|
|
112 #if 'X' in str($pfeatexttokenpattern):
|
|
113 #set $pfeatexttokenpattern_temp = $pfeatexttokenpattern.replace('X', '\\')
|
|
114 #set $pfeatexttokenpattern = $pfeatexttokenpattern_temp
|
|
115 #end if
|
|
116
|
|
117 #if str($pfeatexttokenpattern):
|
|
118 --p-feat-ext--token-pattern="$pfeatexttokenpattern"
|
|
119 #end if
|
|
120
|
|
121
|
|
122 #if str($pfeatexttokenizer):
|
|
123 --p-feat-ext--tokenizer="$pfeatexttokenizer"
|
|
124 #end if
|
|
125
|
|
126 --o-classifier=oclassifier
|
|
127 ;
|
|
128 cp oclassifier.qza $oclassifier
|
|
129 ]]></command>
|
|
130 <inputs>
|
|
131 <param format="qza,no_unzip.zip" label="--i-reference-reads: ARTIFACT FeatureData[Sequence] [required]" name="ireferencereads" optional="False" type="data"/>
|
|
132 <param format="qza,no_unzip.zip" label="--i-class-weight: ARTIFACT FeatureTable[RelativeFrequency] [optional]" name="iclassweight" optional="True" type="data"/>
|
|
133
|
|
134 <conditional name="id_to_taxonomy_fp" optional="True">
|
|
135 <param name="selector" type="select" label="Reference taxonomy to query">
|
|
136 <option value="cached">Public databases</option>
|
|
137 <option value="history">Databases from your history</option>
|
|
138 </param>
|
|
139 <when value="cached">
|
|
140 <param argument="--taxonomy_fp" label="Reference taxonomy" type="select" optional="True">
|
|
141 <options from_data_table="qiime_taxonomy" />
|
|
142 </param>
|
|
143 </when>
|
|
144 <when value="history">
|
|
145 <param argument="--taxonomy_fp" type="data" format="qza,no_unzip.zip" label="Reference databases" optional="True" />
|
|
146 </when>
|
|
147 </conditional>
|
|
148
|
|
149 <param label="--p-classify--alpha: NUMBER [default: 0.001]" name="pclassifyalpha" optional="True" type="float" value="0.001"/>
|
|
150 <param label="--p-classify--chunk-size: INTEGER [default: 20000]" name="pclassifychunksize" optional="True" type="integer" value="20000"/>
|
|
151 <param label="--p-classify--class-prior: TEXT [default: 'null']" name="pclassifyclassprior" optional="True" type="text" value="'null'"/>
|
|
152 <param label="--p-classify--fit-prior: --p-no-classify--fit-prior [default: False]" name="pclassifyfitprior" selected="False" type="boolean"/>
|
|
153 <param label="--p-feat-ext--alternate-sign: --p-no-feat-ext--alternate-sign [default: False]" name="pfeatextalternatesign" selected="False" type="boolean"/>
|
|
154 <param label="--p-feat-ext--analyzer: TEXT [default: 'char_wb']" name="pfeatextanalyzer" optional="True" type="text" value="'char_wb'"/>
|
|
155 <param label="--p-feat-ext--binary: --p-no-feat-ext--binary [default: False]" name="pfeatextbinary" selected="False" type="boolean"/>
|
|
156 <param label="--p-feat-ext--decode-error: TEXT [default: 'strict']" name="pfeatextdecodeerror" optional="True" type="text" value="'strict'"/>
|
|
157 <param label="--p-feat-ext--encoding: TEXT [default: 'utf-8']" name="pfeatextencoding" optional="True" type="text" value="'utf-8'"/>
|
|
158 <param label="--p-feat-ext--input: TEXT [default: 'content']" name="pfeatextinput" optional="True" type="text" value="'content'"/>
|
|
159 <param label="--p-no-feat-ext--lowercase: [default: False]" name="pnofeatextlowercase" selected="False" type="boolean"/>
|
|
160 <param label="--p-feat-ext--n-features: INTEGER [default: 8192]" name="pfeatextnfeatures" optional="True" type="integer" value="8192"/>
|
|
161 <param label="--p-feat-ext--ngram-range: TEXT [default: '[7, 7]']" name="pfeatextngramrange" optional="True" type="text" value="'[7, 7]"/>
|
|
162 <param label="--p-feat-ext--non-negative: --p-no-feat-ext--non-negative [default: False]" name="pfeatextnonnegative" selected="False" type="boolean"/>
|
|
163 <param label="--p-feat-ext--norm: TEXT [default: 'l2']" name="pfeatextnorm" optional="True" type="text" value="'l2'"/>
|
|
164 <param label="--p-feat-ext--preprocessor: TEXT [default: 'null']" name="pfeatextpreprocessor" optional="True" type="text" value="'null'"/>
|
|
165 <param label="--p-feat-ext--stop-words: TEXT [default: 'null']" name="pfeatextstopwords" optional="True" type="text" value="'null'"/>
|
|
166 <param label="--p-feat-ext--strip-accents: TEXT [default: 'null']" name="pfeatextstripaccents" optional="True" type="text" value="'null'"/>
|
|
167 <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'"/>
|
|
168 <param label="--p-feat-ext--tokenizer: TEXT [default: 'null']" name="pfeatexttokenizer" optional="True" type="text" value="'null'"/>
|
|
169 </inputs>
|
|
170 <outputs>
|
|
171 <data format="qza" label="${tool.name} on ${on_string}: classifier.qza" name="oclassifier"/>
|
|
172 </outputs>
|
|
173 <help><![CDATA[
|
|
174 Train the naive_bayes classifier
|
|
175 ################################
|
|
176
|
|
177 Create a scikit-learn naive_bayes classifier for reads
|
|
178
|
|
179 Parameters
|
|
180 ----------
|
|
181 reference_reads : FeatureData[Sequence]
|
|
182 \
|
|
183
|
|
184 reference_taxonomy : FeatureData[Taxonomy]
|
|
185 \
|
|
186
|
|
187 class_weight : FeatureTable[RelativeFrequency], optional
|
|
188 \
|
|
189
|
|
190 classify__alpha : Float, optional
|
|
191 \
|
|
192
|
|
193 classify__chunk_size : Int, optional
|
|
194 \
|
|
195
|
|
196 classify__class_prior : Str, optional
|
|
197 \
|
|
198
|
|
199 classify__fit_prior : Bool, optional
|
|
200 \
|
|
201
|
|
202 feat_ext__alternate_sign : Bool, optional
|
|
203 \
|
|
204
|
|
205 feat_ext__analyzer : Str, optional
|
|
206 \
|
|
207
|
|
208 feat_ext__binary : Bool, optional
|
|
209 \
|
|
210
|
|
211 feat_ext__decode_error : Str, optional
|
|
212 \
|
|
213
|
|
214 feat_ext__encoding : Str, optional
|
|
215 \
|
|
216
|
|
217 feat_ext__input : Str, optional
|
|
218 \
|
|
219
|
|
220 feat_ext__lowercase : Bool, optional
|
|
221 \
|
|
222
|
|
223 feat_ext__n_features : Int, optional
|
|
224 \
|
|
225
|
|
226 feat_ext__ngram_range : Str, optional
|
|
227 \
|
|
228
|
|
229 feat_ext__non_negative : Bool, optional
|
|
230 \
|
|
231
|
|
232 feat_ext__norm : Str, optional
|
|
233 \
|
|
234
|
|
235 feat_ext__preprocessor : Str, optional
|
|
236 \
|
|
237
|
|
238 feat_ext__stop_words : Str, optional
|
|
239 \
|
|
240
|
|
241 feat_ext__strip_accents : Str, optional
|
|
242 \
|
|
243
|
|
244 feat_ext__token_pattern : Str, optional
|
|
245 \
|
|
246
|
|
247 feat_ext__tokenizer : Str, optional
|
|
248 \
|
|
249
|
|
250 Returns
|
|
251 -------
|
|
252 classifier : TaxonomicClassifier
|
|
253 \
|
|
254
|
|
255 ]]></help>
|
|
256 <macros>
|
|
257 <import>qiime_citation.xml</import>
|
|
258 </macros>
|
|
259 <expand macro="qiime_citation"/>
|
|
260 </tool>
|