# Vsearch search parameter

**URL:** https://forum.qiime2.org/t/vsearch-search-parameter/7150
**Category:** Technical Support
**Created:** [November 25, 2018, 12:39pm UTC](https://forum.qiime2.org/t/vsearch-search-parameter/7150 "2018-11-25T12:39:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![devonorourke](https://forum.qiime2.org/user_avatar/forum.qiime2.org/devonorourke/32/3110_2.png) [@devonorourke](https://forum.qiime2.org/u/devonorourke)
#### Post date: [November 25, 2018, 12:39pm UTC](https://forum.qiime2.org/t/vsearch-search-parameter/7150/1 "2018-11-25T12:39:48Z")

</div>

Happy Sunday,  
I'm hoping to get a better understanding of the [vsearch classifier](https://docs.qiime2.org/2018.11/plugins/available/feature-classifier/classify-consensus-vsearch/?highlight=vsearch). When I perform a search with default parameters, it's my understanding that:

- for a given query sequence, it is _considered_ a match if it aligns with \>= 97% identity to some reference sequence;
- the search process for that same query sequence continues across all other reference sequences;

What I'm wondering about next is two other default parameters: `--p-maxaccepts` and `--p-min-consensus`. With the default `--p-maxaccepts` set to 10, I'm wondering how the program determines what those 10 values should be? Are they ranked in terms of highest percent identity match? Are they the first 10 entries in the list (I wouldn't think you'd bother searching the entire reference db if you're just collecting the first 10)?

Can someone also please articulate how the `--p-min-consensus` is considered? Is this value considering the consensus across all possible query matches (above %id threshold), or is is just among the 10 selected?

As I've been playing around with these settings it's seemed like there is a tradeoff with certainty and consensus - as I increase any of the parameters listed here (`--p-perc-identity`, `--p-maxaccepts`, or `--p-min-consensus`) I think I'm more confident that the subsequent match is most accurate, but it seems that I often lose taxonomic information. For example, for any one particular sequence, if I search using defaults I might generate taxonomic info to the _Species_ level, but then if I broaden my number of `--p-maxaccepts` to 1000 (instead of default 10) I get the same sequence matching with taxa info to just the _Genus_ level.

It would seem to me that if I'm after the strongest consensus parameters possible, I'd require a percent match of 100% and retain all possible matches before building consensus. Perhaps that's a mistake.  
I'd appreciate understanding how the default parameters influence the subsequent analyses microbiome folks generally consider. For instance, if I was going to collapse taxa at some level, I think it would be important to know how much you trust your taxa assignments! So you probably don't trust _species_ assignments across all cases, but perhaps you are quite confident in your _Genus_ or _Family_ level assignments?

Thanks!

---

<div class="post-metadata">

### Author: ![Mehrbod\_Estaki](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mehrbod_estaki/32/4001_2.png) [@Mehrbod\_Estaki](https://forum.qiime2.org/u/Mehrbod_Estaki)
#### Post date: [November 25, 2018, 7:42pm UTC](https://forum.qiime2.org/t/vsearch-search-parameter/7150/3 "2018-11-25T19:42:25Z")

</div>

Hi @devonorourke,  
I know the vsearch classifier workflow has been described a few times in the forum before, but by now are a bit hidden under the piles. The first one I was able to find is [here](https://forum.qiime2.org/t/finding-incorrectly-formatted-needle-in-apparently-mostly-formatted-properly-haystack/6493/5) which I believe should answer your questions. If it's missing some aspects of what you requested, please highlight that again and we'll have a go at it.

---

<div class="post-metadata">

### Author: ![devonorourke](https://forum.qiime2.org/user_avatar/forum.qiime2.org/devonorourke/32/3110_2.png) [@devonorourke](https://forum.qiime2.org/u/devonorourke)
#### Post date: [November 25, 2018, 8:06pm UTC](https://forum.qiime2.org/t/vsearch-search-parameter/7150/4 "2018-11-25T20:06:07Z")

</div>

Of course! I completely forgot about that post (which I started!) where @Nicholas_Bokulich laid out the `vsearch` process. I either need more coffee or am having too much already... I can't remember conversations that took place less than a month ago.

Thanks @Mehrbod_Estaki.
