# Question about consensus taxonomy assignment in classify-consensus-vsearch

**URL:** https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574
**Category:** User Support
**Tags:** feature-classifier
**Created:** [August 13, 2025, 10:15am UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574 "2025-08-13T10:15:33Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![lacerta](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@lacerta](https://forum.qiime2.org/u/lacerta)
#### Post date: [August 13, 2025, 10:15am UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/1 "2025-08-13T10:15:33Z")

</div>

# How does `classify-consensus-vsearch` compute consensus taxonomy?

Hi everyone,

I am running `qiime feature-classifier classify-consensus-vsearch` in qiime2-amplicon-2025.4 (installed via Conda), with the following parameters: `--p-perc-identity 0.97, --p-maxaccepts 5, --p-min-consensus 0.51 (default)`.

I have some questions about how the consensus taxonomy is calculated in certain cases. For example, for one ASV, the taxonomy of the top hits (all with identical identity values of 99.7%) is:

`k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades` `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Campylomma ` `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae k__ Metazoa;p __Arthropoda;c__ Insecta;o __Hemiptera;f__ Miridae;g__Creontiades `

According to my understanding, the consensus taxonomy should be: `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades`

However, the consensus taxonomy returned is: `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f__Miridae`

Could you clarify how the consensus is determined in this case? Is the truncation at the family level due to a missing genus-level annotation in one of the reference hits?

Thank you very much!

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [August 13, 2025, 4:20pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/2 "2025-08-13T16:20:42Z")

</div>

Hi @lacerta,

EDIT: 08-13-2025

Ignore what I wrote below... I somehow miscounted the number of `g__Creontiades` strings...

Give me a moment to reconsider ...

~~The correct consensus taxonomy would indeed be~~

~~`k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f__Miridae`~~

~~It would _not_ be~~

~~`k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades`~~

~~as it only appears in 2 of the 5 taxonomy strings (or 2 of the 4 at the genus level). Thus less than 51% minimum consensus. In fact, nothing at the genus level is greater than 51%, so, we back up one rank level and assess consensus again. At the family level all of the taxon strings contain~~

~~`k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f__Miridae`~~

~~thus this string is chosen as the consensus taxonomy.~~

~~You could play around with adjusting the `--p-min-consensus` and `--p-perc-identity` values. But note, although adjusting these to fix the current taxonomy example, has the potential make other assignments worse... or not...~~

~~_Note: Not all reference sequences have a fully annotated taxonomy. If you'd only like to make use of sequences with full taxonomy, then you can use many of the builtin QIIME 2 tools, and even RESCRIPt tools, to filter and curate your reference database prior to using it for classification._~~

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [August 13, 2025, 6:02pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/6 "2025-08-13T18:02:33Z")

</div>

Hi @lacerta,

Can you share the output files from your vsearch classification. I'd like to investigate further.

---

<div class="post-metadata">

### Author: ![lacerta](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@lacerta](https://forum.qiime2.org/u/lacerta)
#### Post date: [August 14, 2025, 1:42pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/7 "2025-08-14T13:42:17Z")

</div>

Hi @SoilRotifer ,

Thank you so much for the quick reply and for taking a closer look at this. Would it be okay if I sent you the files via DM?

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [August 14, 2025, 2:30pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/8 "2025-08-14T14:30:40Z")

</div>

@lacerta, yep that'd be perfect!

---

<div class="post-metadata">

### Author: ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)
#### Post date: [August 15, 2025, 10:14pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/9 "2025-08-15T22:14:11Z")

</div>



---

<div class="post-metadata">

### Author: ![lacerta](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@lacerta](https://forum.qiime2.org/u/lacerta)
#### Post date: [August 18, 2025, 10:20am UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/13 "2025-08-18T10:20:10Z")

</div>

Hi, it seems I can’t send you a DM — the ‘message’ button doesn’t appear when I click on your profile.

---

<div class="post-metadata">

### Author: ![lacerta](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@lacerta](https://forum.qiime2.org/u/lacerta)
#### Post date: [August 21, 2025, 1:26pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/27 "2025-08-21T13:26:48Z")

</div>

Hi everyone,

Following some investigation with @SoilRotifer, we were able to determine the cause of the unexpected truncation in the consensus taxonomy I reported earlier.

The issue is linked to **missing taxonomic annotations at lower levels in the reference files**. Returning to my previous example, the top hits for one ASV were:

> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Campylomma`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f__Miridae`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades`

Here, one hit lacked a genus annotation, so `classify-consensus-vsearch` returned:

> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f__Miridae`

On the other hand, when we kept the empty placeholders for missing ranks in the reference:

> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades;s_`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades;s_`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Campylomma;s_`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades;s_`  
> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f__Miridae;g_;s_`

the consensus matched the expected result:

> `k __Metazoa;p__ Arthropoda;c __Insecta;o__ Hemiptera;f __Miridae;g__ Creontiades;s_`

**Conclusion:** It is a good idea to always include all rank levels in the reference taxonomy, even if they are just empty placeholders (e.g., `f __`, `g__ `, `s_`). This should prevent unexpected truncation in consensus taxonomic assignments.

Some RESCRIPt actions, such as `get_silva_data` and `get-ncbi-data`, include a flag called `--p-rank-propagation`, to help mitigate this issue, as explained in [this part of the SILVA tutorial](https://forum.qiime2.org/t/processing-filtering-and-evaluating-the-silva-database-and-other-reference-sequence-data-with-rescript/15494#heading--second-header).

Additionally, RESCRIPt provides an `edit-taxonomy` action that allows batch modification of taxonomic labels, including inserting missing prefixes when needed.

Thanks so much to the QIIME 2 team for all your help and support!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [August 21, 2025, 1:58pm UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/28 "2025-08-21T13:58:37Z")

</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: [September 23, 2025, 3:56am UTC](https://forum.qiime2.org/t/question-about-consensus-taxonomy-assignment-in-classify-consensus-vsearch/33574/36 "2025-09-23T03:56:28Z")

</div>

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