# qiime feature-classifier classify-consensus-vsearch error

**URL:** <https://forum.qiime2.org/t/qiime-feature-classifier-classify-consensus-vsearch-error/12261>\
**Category:** Technical Support\
**Created:** [October 31, 2019, 11:02am UTC](https://forum.qiime2.org/t/qiime-feature-classifier-classify-consensus-vsearch-error/12261 "2019-10-31T11:02:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mica.tosi](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mica.tosi/32/6460_2.png) [@mica.tosi](https://forum.qiime2.org/u/mica.tosi)\
**Post date:** [November 4, 2019, 11:35pm UTC](https://forum.qiime2.org/t/qiime-feature-classifier-classify-consensus-vsearch-error/12261/2 "2019-11-04T23:35:54Z")

</div>

Hello!  
I'm new to the forum, so I hope to be following the rules. I was about to post a new topic about a similar error, but since this was recently posted, I figured it's easy to ask here.

I get the same error as @Asha1 when trying to use classify-consensus-vsearch with MaarjAM as a reference taxonomy (see full command below), suggesting the ids in my reference reads and reference taxonomy don't match (see error detail below). However, after checking both files for mismatches I found none. Moreover, my error message says 'identifier 517', even though my sequences are all named with the full GenBank ID (e.g., AB749517). I also checked for spaces that could be interfering with the code, but again, nothing.

Someone reported a similar problem [here](https://forum.qiime2.org/t/keyerror-identifier-reported-in-taxonomic-search-results-but-not-reference-taxonomy/2593), but that user did find a mismatch. I also tried everything else suggested in that topic, but I still get the error.

One last detail: To prepare my MaarjAM files for qiime, I followed the instructions of a generous github soul. Interestingly, when I tested vsearch with his files (unfortunately out-of-date now), it worked perfectly. And since I followed his R code to prepare and check both my fasta and id-to-taxo, I'm suspecting the error comes from one of the new sequences.

I'm wondering what should I check next if there are no evident mismatches. Could something else be causing this error?

Thanks in advance for your time,

mica

##########  
This is the command I ran (QIIME 2 v. 2019.1):

classifier classify-consensus-vsearch   
--i-query rep-seqs.qza   
--i-reference-reads maarjam\_fasta.qza   
--i-reference-taxonomy maarjam\_id-to-taxo.qza   
--p-perc-identity 0.99   
--p-threads 15   
--verbose   
--o-classification taxonomy.qza

This is the output and error message:

_Running external command line application. This may print messages to stdout and/or stderr._  
_The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist._

_Command: vsearch --usearch\_global /tmp/qiime2-archive-lkyw234k/e38c5264-5fc6-45f7-b4e3-e97eaa0eb252/data/dna-sequences.fasta --id 0.99 --query\_cov 0.8 --strand both --maxaccepts 10 --maxrejects 0 --output\_no\_hits --db /tmp/qiime2-archive-3\_zrsm3r/cf5cb7a2-b54e-41be-aa02-612ec3103edf/data/dna-sequences.fasta --threads 15 --blast6out /tmp/tmpv2i488v1_

_vsearch v2.7.0\_linux\_x86\_64, 127.6GB RAM, 24 cores_  
_[GitHub - torognes/vsearch: Versatile open-source tool for microbiome analysis](https://github.com/torognes/vsearch)_

_Reading file /tmp/qiime2-archive-3\_zrsm3r/cf5cb7a2-b54e-41be-aa02-612ec3103edf/data/dna-sequences.fasta 100%_  
_19463763 nt in 37596 seqs, min 134, max 1823, avg 518_  
_Masking 100%_  
_Counting k-mers 100%_  
_Creating k-mer index 100%_  
_Searching 100%_  
_Matching query sequences: 1349 of 3020 (44.67%)_  
_Traceback (most recent call last):_

- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 3124, in get\_value\*
- return libindex.get\_value\_box(s, key)\*
- File "pandas/\_libs/index.pyx", line 55, in pandas.\_libs.index.get\_value\_box\*
- File "pandas/\_libs/index.pyx", line 63, in pandas.\_libs.index.get\_value\_box\*  
_TypeError: 'str' object cannot be interpreted as an integer_

_During handling of the above exception, another exception occurred:_

_Traceback (most recent call last):_

- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2\_feature\_classifier/\_consensus\_assignment.py", line 104, in \_import\_blast\_format\_assignments\*
- t = ref\_taxa[id\_]\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/pandas/core/series.py", line 767, in **getitem** \*
- result = self.index.get\_value(self, key)\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 3132, in get\_value\*
- raise e1\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 3118, in get\_value\*
- tz=getattr(series.dtype, 'tz', None))\*
- File "pandas/\_libs/index.pyx", line 106, in pandas.\_libs.index.IndexEngine.get\_value\*
- File "pandas/\_libs/index.pyx", line 114, in pandas.\_libs.index.IndexEngine.get\_value\*
- File "pandas/\_libs/index.pyx", line 162, in pandas.\_libs.index.IndexEngine.get\_loc\*
- File "pandas/\_libs/hashtable\_class\_helper.pxi", line 1492, in pandas.\_libs.hashtable.PyObjectHashTable.get\_item\*
- File "pandas/\_libs/hashtable\_class\_helper.pxi", line 1500, in pandas.\_libs.hashtable.PyObjectHashTable.get\_item\*  
_KeyError: '517'_

_During handling of the above exception, another exception occurred:_

_Traceback (most recent call last):_

- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py", line 274, in **call** \*
- results = action(\*_arguments)_
- File "\</home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-352\>", line 2, in classify\_consensus\_vsearch\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 231, in bound\_callable\*
- output\_types, provenance)\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 365, in _callable\_executor_\*
- output\_views = self.\_callable(\*_view\_args)_
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2\_feature\_classifier/\_vsearch.py", line 37, in classify\_consensus\_vsearch\*
- unassignable\_label=unassignable\_label)\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2\_feature\_classifier/\_consensus\_assignment.py", line 29, in \_consensus\_assignments\*
- output.name, ref\_taxa, unassignable\_label=unassignable\_label)\*
- File "/home/karidunfield/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2\_feature\_classifier/\_consensus\_assignment.py", line 109, in \_import\_blast\_format\_assignments\*
- 'taxonomy.').format(str(id\_)))\*  
_ **KeyError: 'Identifier 517 was reported in taxonomic search results, but was not present in the reference taxonomy.'** _

_Plugin error from feature-classifier:_

\*\*\* 'Identifier 517 was reported in taxonomic search results, but was not present in the reference taxonomy.'\*\*\*

_See above for debug info._

---

_[View the full topic](https://forum.qiime2.org/t/qiime-feature-classifier-classify-consensus-vsearch-error/12261)._
