Hello!
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/commands.py", 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/action.py", line 231, in bound_callable
output_types, provenance)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/qiime2/sdk/action.py", 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/classifier.py", 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/classifier.py", 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/_skl.py", 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/parallel.py", 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/parallel.py", line 625, in dispatch_one_batch
self._dispatch(tasks)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py", 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/_parallel_backends.py", line 111, in apply_async
result = ImmediateResult(func)
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 332, in init
self.results = batch()
File "/home/peerylab/miniconda2/envs/qiime2-2018.11/lib/python3.5/site-packages/sklearn/externals/joblib/parallel.py", 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/parallel.py", 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/_skl.py", 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/_skl.py", 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,
NB
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)