Plugin error from feature-classifier: not enough values to unpack (expected 2, got 0)

Ok, so I've checked the forum and the closest thing I found to my issue was a conversation that was closed by the user before an answer was found. My error message is in the subject above.

--verbose reading is as follows:

(qiime2-2017.12) CNS-969348:ITSV1Manifest stinsonlab$ qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads ref-seqs.qza --i-reference-taxonomy ref-taxonomy.qza --o-classifier classifier.qza --verbose
/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_feature_classifier/classifier.py:101: UserWarning: The TaxonomicClassifier artifact that results from this method was trained using scikit-learn version 0.19.1. It cannot be used with other versions of scikit-learn. (While the classifier may complete successfully, the results will be unreliable.)
warnings.warn(warning, UserWarning)
Traceback (most recent call last):
File "/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2cli/commands.py", line 224, in call
results = action(**arguments)
File "", line 2, in fit_classifier_naive_bayes
File "/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py", line 228, in bound_callable
output_types, provenance)
File "/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py", line 363, in callable_executor
output_views = self._callable(**view_args)
File "/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_feature_classifier/classifier.py", line 310, in generic_fitter
pipeline)
File "/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_feature_classifier/_skl.py", line 31, in fit_pipeline
y, X = list(zip(*data))
ValueError: not enough values to unpack (expected 2, got 0)

Plugin error from feature-classifier:

not enough values to unpack (expected 2, got 0)

See above for debug info.

I have been on this issue for multiple days now and I figured I'd reach out into the ether.

I suspect that the problem is with my tsv. I also tried running the file as txt but this didn't seem to help.

ref-seqs.qza (8.9 KB)
ref-taxonomy.qza (2.2 MB)

You are my only hope,

Adam

1 Like

Hello,

Looking at your files, it seems like the headers in the sequence file do not match the names in the taxonomy, see:

(qiime2-2018.2) 12:05:31 Downloads$ head 90d0ab54-4c21-408c-979e-e3f7639f82e7/data/taxonomy.tsv 
Feature ID	Taxon
DQ068970	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Thelephora;s__Thelephora_terrestris
AY750163	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Thelephora;s__Thelephora_terrestris
AY456369	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Thelephora;s__Thelephora_terrestris
AY880934	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Thelephora;s__Thelephora_terrestris
AY880929	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Tomentella;s__Tomentella_sublilacina
AF104990	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Tomentella;s__Tomentella_testaceogilva
AF104989	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Thelephora;s__Thelephora_alnii
AF104988	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Tomentella;s__Tomentella_testaceogilva
AF104987	k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Thelephorales;f__Thelephoraceae;g__Thelephora;s__Thelephora_alnii
(qiime2-2018.2) 12:05:42 Downloads$ head 62ab68ae-be2f-4e23-a4ee-b1f9e4500124/data/dna-sequences.fasta 
>8283bc2ce35098bc3065e103dcc1aa9b
ACTATAACACACTTTATATTCTGACCTCAAATCAGGTAGGACTACCCGCTGAACTTAA
>3e7d4d1bcbef3f925aea91eb8aa4fc9d
TTCGTTACACGCGTTTAACAGAATGTGTCTGGCCTCATATATGGAAGGTTACCCGCTGGATTTAA
>9ead059f61c895d1c30dc03bf0d82267
ATCCAACAGCTAGTTGGGACGTGACCTGACTACCCGTAGTAGGTCTAAATGGATTGCAATCAAAATGTGGTAAAAGACGGATGTTCTTTCCCATTGACGATTTAAACTCTGAATTATGATCTCAAATTATATAAGAATACCCGCTGAACTTAA
>c1089ff5e0958c3c127ef1c8e61feaf6
TTATGATGAATATGTTCAAACATATTTTTTGCAATATGTCTGGCCTCATATGTGGAAGGTTACCCGCTGGATTTAA
>7e31a264c73578223a66fb862337e946
GTTCAAAATATATAAAACAAAACTGTGTGGTAATTATTACACAATTGTTCTATCTAACTTTGATCTCAAATCAGATAAGAATACCCGCTGAACTTAA

BTW there is another thread with a similar issue:

Hope this helps.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.

Unfortunately, I wasn't able to find an answer to my question before the topic expired.

Original post follows (Plugin error from feature-classifier: not enough values to unpack (expected 2, got 0))

Blockquote

Ok, so I’ve checked the forum and the closest thing I found to my issue was a conversation that was closed by the user before an answer was found. My error message is in the subject above.

–verbose reading is as follows:

(qiime2-2017.12) CNS-969348:ITSV1Manifest stinsonlab$ qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads ref-seqs.qza --i-reference-taxonomy ref-taxonomy.qza --o-classifier classifier.qza --verbose
/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_feature_classifier/classifier.py:101: UserWarning: The TaxonomicClassifier artifact that results from this method was trained using scikit-learn version 0.19.1. It cannot be used with other versions of scikit-learn. (While the classifier may complete successfully, the results will be unreliable.)
warnings.warn(warning, UserWarning)
Traceback (most recent call last):
File “/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2cli/commands.py”, line 224, in call
results = action(**arguments)
File “”, line 2, in fit_classifier_naive_bayes
File “/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 228, in bound_callable
output_types, provenance)
File “/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/qiime2/sdk/action.py”, line 363, in callable_executor
output_views = self._callable(**view_args)
File “/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_feature_classifier/classifier.py”, line 310, in generic_fitter
pipeline)
File “/Users/stinsonlab/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-packages/q2_feature_classifier/_skl.py”, line 31, in fit_pipeline
y, X = list(zip(*data))
ValueError: not enough values to unpack (expected 2, got 0)

Plugin error from feature-classifier:

not enough values to unpack (expected 2, got 0)

See above for debug info.

I have been on this issue for multiple days now and I figured I’d reach out into the ether.

I suspect that the problem is with my tsv. I also tried running the file as txt but this didn’t seem to help.

Blockquote

I got a solution to the above post that the headers of the attached files didn't match. It's my understanding however that this step is to create a classifier so while the taxonomy file was downloaded from the ITS repository from the Unite site (UNITE - Resources) the sequences file are my data, so they wouldn't match.

Any help is appreciatedref-seqs.qza (8.9 KB)
ref-taxonomy.qza (2.2 MB)

Hey there @atrout!

I think @antgonza provided a pretty solid explanation for why you are experiencing this issue, but I will restate it here.

The feature IDs in your reference taxonomy artifact don't match the feature IDs in your reference sequences artifact. If I had to guess, your reference sequences here are actually not from the UNITE database, but are instead your representative sequence (the features have hashed sequences as the IDs, which is a default parameter for dada2 and deblur based denoising in QIIME 2). The reference sequences need to come from the same source as the reference taxonomy (those two parts add up to make the entire database, effectively). After importing, trimming, and then training, you can then introduce your representative sequences (the features identified in your study). Make sense?

Let us know, thanks! :t_rex: :qiime2:

Have you had a chance to review the Training Feature Classifiers Tutorial?

1 Like

Yeah, that makes more sense. I was confused by the reference to using your own data to train the classifier.

1 Like