Classifier does not support confidence values issue


I am runnin q2cli version 2018.11.0 on both a native installation and on a virtual box (the latter for when I do not have access to the native installation). I am using Qiime2 to clean, filter, and denoise a MiSeq run with a custom amplicon set (comprised of regions of the 5 following genes: CIRBP, HSPA8, Sox9, TRPV1, TRPM8). I have successfully used qiime2 to identify unique genetic variants for each gene in this dataset using a sklearn naive bayes classifier, trained on reference sequences from all 5 amplicons.

I am currently exploring alternative classifiers for specific amplicons, trained with a much more limited subset of the original reference sequences set. This is using the same post-dada2 dataset that has already been successfully used for the full classifier, so I won't detail the commands for that here.

I successfully created the classifier using the code below; in this case, I just manually supplied the --p-classify--alpha as a futile attempt to solve this issue:

qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads CIRBP_sequences_simphead.qza --i-reference-taxonomy CIRBP_taxonomy3.qza --p-classify--alpha 0.001 --o-classifier CIRBP_3.qza

Saved TaxonomicClassifier to: CIRBP_3.qza

However, when this classifier was applied to the post-dada2 list of representative sequences (EBClimLib-demultR1-Seq.qza) - even with --p-conidence -1 - the following error was produced:

qiime feature-classifier classify-sklearn --i-reads EBClimLib-demultR1-Seq.qza --i-classifier CIRBP_3.qza --p-confidence -1 --o-classification EBCIRBPTest.qza --verbose
Traceback (most recent call last):
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/q2cli/", line 274, in call
results = action(**arguments)
File "", line 2, in classify_sklearn
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/sdk/", line 231, in bound_callable
output_types, provenance)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/sdk/", line 362, in callable_executor
output_views = self._callable(**view_args)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_feature_classifier/", line 212, in classify_sklearn
reads, classifier, read_orientation=read_orientation)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_feature_classifier/", line 169, in _autodetect_orientation
result = list(zip(*predict(first_n_reads, classifier, confidence=0.)))
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_feature_classifier/", line 45, in predict
for chunk in _chunks(reads, chunk_size)) for m in c)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 779, in call
while self.dispatch_one_batch(iterator):
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 625, in dispatch_one_batch
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 588, in _dispatch
job = self._backend.apply_async(batch, callback=cb)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 111, in apply_async
result = ImmediateResult(func)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 332, in init
self.results = batch()
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 131, in call
return [func(*args, **kwargs) for func, args, kwargs in self.items]
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/", line 131, in
return [func(*args, **kwargs) for func, args, kwargs in self.items]
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_feature_classifier/", line 52, in _predict_chunk
return _predict_chunk_with_conf(pipeline, separator, confidence, chunk)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/q2_feature_classifier/", line 68, in _predict_chunk_with_conf
raise ValueError('this classifier does not support confidence values')
ValueError: this classifier does not support confidence values

Plugin error from feature-classifier:

this classifier does not support confidence values

See above for debug info.

(End code)

Any clue on why I keep getting this error? I have tried to search the forums for similar issues, and only found one, and I am unsure if it is an issue with the classifier itself, the input files for creation of the classifier, or the post-dada2 representative sequences; however, I doubt it is the latter, as I have used that dataset with other sklearn naive bayes classifiers before. Just in case, I have attached all relevant files below (hopefully the uploads work, let me know if not!)

Thank you,


CIRBP_sequences_simphead.qza (5.1 KB)

CIRBP_taxonomy3.qza (5.0 KB)

EBClimLib-demultR1-Seq.qza (121.1 KB)

CIRBP_3.qza (18.1 KB)


Just resolved this on my own (sorry!) - I was missing a semicolon between the g_ and s_ entries in my taxonomy file, and removing that solved the issue (apparently!). Very silly mistake, but glad I caught it!



Hey @nbyer,

Im glad you figured it out, and thanks for posting the update! It’s a seriously good reminder about semicolons and error messages.


Did all entries have the missing semicolon? Or only some? We have seen errors like this before with uneven taxonomic levels. Thank you for following up!