# Feature Classifier - Not enough values to unpack

**URL:** <https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551>\
**Category:** User Support\
**Tags:** feature-classifier, pending-development\
**Created:** [March 26, 2018, 2:57pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551 "2018-03-26T14:57:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bentsch](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/46a35a/32.png) [@bentsch](https://forum.qiime2.org/u/bentsch)\
**Post date:** [March 26, 2018, 2:57pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/1 "2018-03-26T14:57:29Z")

</div>

Hi Everyone,

I am having a problem with training the feature-classifier for a specific database (phytoref). My issue is very similar to the one posted by another user [[Plugin error from feature-classifier: not enough values to unpack](https://forum.qiime2.org/t/plugin-error-from-feature-classifier-not-enough-values-to-unpack/1838)] but unfortunately that issue never got resolved.

Here is my command:  
qiime feature-classifier fit-classifier-naive-bayes --i-reference-reads phytoref\_16S\_ref-seqs.qza --i-reference-taxonomy phytoref\_taxonomy.qza --o-classifier phytoref\_409nt\_classifier.qza

And I get the following output message:  
Plugin error from feature-classifier:

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

Debug info has been saved to /var/tmp/pbs.566300.hpcnode1/qiime2-q2cli-err-09wthw34.log

Looking into the log file reveals the following:  
more /var/tmp/pbs.566300.hpcnode1/qiime2-q2cli-err-09wthw34.log  
/shared/c3/apps/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/q2\_feature\_classifier/classifier.py:101: UserWarning: The Taxonomic  
Classifier artifact that results from this method was trained using scikit-learn version 0.19.1. It cannot be used with other versions of sci  
kit-learn. (While the classifier may complete successfully, the results will be unreliable.)  
warnings.warn(warning, UserWarning)  
Traceback (most recent call last):  
File "/shared/c3/apps/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/q2cli/commands.py", line 246, in **call**  
results = action(\*\*arguments)  
File "", line 2, in fit\_classifier\_naive\_bayes  
File "/shared/c3/apps/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/qiime2/sdk/action.py", line 228, in bound\_callable  
output\_types, provenance)  
File "/shared/c3/apps/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/qiime2/sdk/action.py", line 363, in _callable\_executor_  
output\_views = self._callable(\*\*view\_args)  
File "/shared/c3/apps/miniconda2/envs/qiime2-2018.2/lib/python3.5/site-packages/q2\_feature\_classifier/classifier.py", line 310, in generic_  
fitter  
pipeline)  
File "/shared/c3/apps/miniconda2/envs/qiime2-2018.2/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)

I have attached the two artefact files used in the command. Any help on this issue would be very much appreciated.

Thanks a lot,

Benni

[phytoref\_taxonomy.qza](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/1/1da7ef366eaa2a07ba9631d68db3b377543f3d38.qza) (17.1 KB)  
[phytoref\_16S\_ref-seqs.qza](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/0/0a1d72f0270588ac4e1062fdd313d4f50c015252.qza) (129.7 KB)

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [March 26, 2018, 3:02pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/2 "2018-03-26T15:02:05Z")

</div>



---

<div class="post-metadata">

**Author:** ![bentsch](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/b/46a35a/32.png) [@bentsch](https://forum.qiime2.org/u/bentsch)\
**Post date:** [March 27, 2018, 2:32pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/3 "2018-03-27T14:32:52Z")

</div>

Hi again,

I figured out what the problem was. The imported taxonomy file is not correct and does not contain the taxonomy strings. I previously had issues importing the taxonomy using the following command:

qiime tools import --type 'FeatureData[Taxonomy]' --source-format HeaderlessTSVTaxonomyFormat --input-path /shared/c3/bio\_db/Phytoref/qiime2.tax.txt --output-path phytoref\_taxonomy.qza

I got an error saying that the file I am trying to import is not headerless, even though it clearly didn't have a header, see the first few lines of the qiime2.tax.txt file:

202#HE610155 Eukaryota;Archaeplastida;Chlorophyta;Ulvophyceae;Ulvophyceae\_X;Ulvophyceae\_XX;Ulvophyceae\_XXX;Ulvophyceae\_XXXX;Desmochloris;Desmochloris\_halophila;  
803#AF514849 Eukaryota;Stramenopiles;Ochrophyta;Bacillariophyta;Bacillariophyceae;Naviculales;Naviculales\_X;Naviculaceae;Haslea;Haslea\_crucigera;

My workaround of this problem was actually introducing a header line, after that the above command ran without error and produced an output file (which I now know is not correct).

A colleague of mine figured out that the error during importing the taxonomy file was related to the '#' character in the identifiers. We replaced the '#' with an "\_" underscore (also in the sequence file) and everything worked.

So it seems as if '#' characters should be avoided in the identifiers of taxonomy files. The '#' is part of all identifiers in the phytoref database ([http://phytoref.sb-roscoff.fr/static/downloads/PhytoRef\_with\_taxonomy.fasta](http://phytoref.sb-roscoff.fr/static/downloads/PhytoRef_with_taxonomy.fasta)) which can be used to assess eukaryotik species based on their chloroplast 16S.

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 27, 2018, 2:59pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/4 "2018-03-27T14:59:37Z")

</div>



---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 27, 2018, 2:59pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/5 "2018-03-27T14:59:40Z")

</div>



---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 27, 2018, 5:14pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/6 "2018-03-27T17:14:00Z")

</div>

Excellent debugging @bentsch!

It looks like we have a [related issue](https://github.com/qiime2/q2-types/issues/165) for this when working with SILVA.

> [@bentsch](#):
>
> A colleague of mine figured out that the error during importing the taxonomy file was related to the ‘#’ character in the identifiers. We replaced the ‘#’ with an “\_” underscore (also in the sequence file) and everything worked.

This also explains why the HeadlerlessTSVTaxononyFormat didn't work, as your first ID contains that "comment" character. The error maybe wasn't so helpful, but the computer was very confused at that point.

* * *

I think our future goal is to make it so that if `#` is treated as a comment (which is probably a debatable point in this context), it would only work if it was the first character on a line. So this might be a comment:

```plaintext
feature-id<tab>some;taxa;string
# this is a comment
fieature-id2<tab>some;other;string

```

while this would not be a comment:

```plaintext
feature#id<tab>some;taxa;string#1
feautre#id2<tab>some;taxa;string#2

```

We'll try and follow up here when we fix this issue!

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 27, 2018, 5:14pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/7 "2018-03-27T17:14:02Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [April 27, 2018, 11:14pm UTC](https://forum.qiime2.org/t/feature-classifier-not-enough-values-to-unpack/3551/8 "2018-04-27T23:14:04Z")

</div>

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