# vsearch clustering error

**URL:** https://forum.qiime2.org/t/vsearch-clustering-error/10527
**Category:** Technical Support
**Created:** [July 3, 2019, 7:08pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527 "2019-07-03T19:08:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Heather\_E](https://forum.qiime2.org/user_avatar/forum.qiime2.org/heather_e/32/4310_2.png) [@Heather\_E](https://forum.qiime2.org/u/Heather_E)
#### Post date: [July 3, 2019, 7:08pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/1 "2019-07-03T19:08:24Z")

</div>

I am having an issue with the command vsearch cluster-features-de-novo. Here's the workflow:

I have multiple runs for a project and want to merge the two runs together for diversity analysis. Both runs were independently run through DADA2 for denoising. A couple of samples were in both runs because they didn't work well the first time. After DADA2, I filtered the table to remove the duplicate samples and merged the tables. Now I want to cluster at 99% because I am getting multiple features for the same species when I assign taxonomy. The command works fine if I run on my original table and rep-seqs file. However, if I filter the table, the command returns an error when running on the resulting filtered table and sequence file. This error occurs even on the unmerged, but filtered tables and sequence files.  
Conversely, the command runs fine if I merge the two files together without filtering, so it's definitely something to do with the filtering step. Below is the command and error output:

qiime vsearch cluster-features-de-novo --i-table Run6/18S/qiime2/rem-neg-table.qza --i-sequences Run6/18S/qiime2/rem-neg-seqs.qza --p-perc-identity 0.99 --o-clustered-table test/Run6-neg-table.qza --o-clustered-sequences test/Run6-neg-table.qza --verbose  
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 --cluster\_size /var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpkcf1496q --id 0.99 --centroids /var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/q2-DNAFASTAFormat-07y20m6j --uc /var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpiyfmssxi --qmask none --xsize --threads 1

vsearch v2.7.0\_macos\_x86\_64, 16.0GB RAM, 8 cores

> **[GitHub - torognes/vsearch: Versatile open-source tool for microbiome analysis](https://github.com/torognes/vsearch)**
>
> Versatile open-source tool for microbiome analysis

Reading file /var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpkcf1496q 6%

Fatal error: Invalid (zero) abundance annotation in FASTA file header  
Traceback (most recent call last):  
File "/Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/q2cli/commands.py", line 311, in **call**  
results = action(\*\*arguments)  
File "\</Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/decorator.py:decorator-gen-121\>", line 2, in cluster\_features\_de\_novo  
File "/Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/action.py", line 231, in bound\_callable  
output\_types, provenance)  
File "/Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/qiime2/sdk/action.py", line 365, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/q2\_vsearch/\_cluster\_features.py", line 193, in cluster\_features\_de\_novo  
run\_command(cmd)  
File "/Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/site-packages/q2\_vsearch/\_cluster\_features.py", line 33, in run\_command  
subprocess.run(cmd, check=True)  
File "/Users/genlab/miniconda3/envs/qiime2-2019.4/lib/python3.6/subprocess.py", line 418, in run  
output=stdout, stderr=stderr)  
subprocess.CalledProcessError: Command '['vsearch', '--cluster\_size', '/var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpkcf1496q', '--id', '0.99', '--centroids', '/var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/q2-DNAFASTAFormat-07y20m6j', '--uc', '/var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpiyfmssxi', '--qmask', 'none', '--xsize', '--threads', '1']' returned non-zero exit status 1.

Plugin error from vsearch:

Command '['vsearch', '--cluster\_size', '/var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpkcf1496q', '--id', '0.99', '--centroids', '/var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/q2-DNAFASTAFormat-07y20m6j', '--uc', '/var/folders/m3/q8nmfgm910dg75w0k0my0t6m0000gr/T/tmpiyfmssxi', '--qmask', 'none', '--xsize', '--threads', '1']' returned non-zero exit status 1.

See above for debug info.

Concerning the error (Invalid (zero) abundance annotation in FASTA file header), I exported both the filtered and non-filtered FASTA files and they look the same to me. I have attached them both.

Also, I generated the filtered sequences using the command feature-table filter-seqs.  
[filtered-seqs.qza](https://forum.qiime2.org/uploads/short-url/t5HfthzNV3fSh1t1bROFVOwCA6y.qza) (147.1 KB) [rep-seqs.qza](https://forum.qiime2.org/uploads/short-url/62KHuOKyjNJgxT6C7TKtEluqpQo.qza) (137.8 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: [July 9, 2019, 12:49pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/2 "2019-07-09T12:49:56Z")

</div>

Hi there @Heather_E!

> [@Heather\_E](#):
>
> Now I want to cluster at 99% because I am getting multiple features for the same species when I assign taxonomy

I am not sure if I follow the rationale here.

> [@Heather\_E](#):
>
> However, if I filter the table

How did you filter the feature table? According the provenance plots you shared, it looks like that was done outside of QIIME 2 and imported in.

---

<div class="post-metadata">

### Author: ![Heather\_E](https://forum.qiime2.org/user_avatar/forum.qiime2.org/heather_e/32/4310_2.png) [@Heather\_E](https://forum.qiime2.org/u/Heather_E)
#### Post date: [July 11, 2019, 2:48pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/3 "2019-07-11T14:48:36Z")

</div>

I exported the original table as a biom, then converted to tsv. Removed duplicate samples and negative controls using an R script, then converted back to biom and imported as qza.

---

<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: [July 11, 2019, 2:56pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/4 "2019-07-11T14:56:51Z")

</div>

> [@Heather\_E](#):
>
> Fatal error: Invalid (zero) abundance annotation in FASTA file header

Well, I am not a vsearch developer, but, that error message sounds to me like you have features in your `FeatureData[Sequence]` that are either not present in your `FeatureTable[Frequency]`, or, if they are there, they have no associated counts with them (zero sum across all samples). Perhaps you should take your `FeatureTable[Frequency]` and, using QIIME 2, [filter out any zero-abundance](https://docs.qiime2.org/2019.4/tutorials/filtering/#total-frequency-based-filtering) reads. Once you have those removed, [filter your `FeatureData[Sequence]`](https://docs.qiime2.org/2019.4/plugins/available/feature-table/filter-seqs/) with the final feature table.

---

<div class="post-metadata">

### Author: ![Heather\_E](https://forum.qiime2.org/user_avatar/forum.qiime2.org/heather_e/32/4310_2.png) [@Heather\_E](https://forum.qiime2.org/u/Heather_E)
#### Post date: [July 16, 2019, 6:33pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/5 "2019-07-16T18:33:11Z")

</div>

That might be it. Especially because the negative samples were effectively brought down to 0 for features in that sample after running the R script. I will try filtering out the zero abundance reads and see what happens. Thank you!

---

<div class="post-metadata">

### Author: ![Heather\_E](https://forum.qiime2.org/user_avatar/forum.qiime2.org/heather_e/32/4310_2.png) [@Heather\_E](https://forum.qiime2.org/u/Heather_E)
#### Post date: [July 22, 2019, 6:13pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/6 "2019-07-22T18:13:15Z")

</div>

FYI, it worked! Thanks for your help.

---

<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: [September 12, 2019, 2:22pm UTC](https://forum.qiime2.org/t/vsearch-clustering-error/10527/7 "2019-09-12T14:22:55Z")

</div>

A post was split to a new topic: [is there a method for filtering out duplicate samples?](https://forum.qiime2.org/t/is-there-a-method-for-filtering-out-duplicate-samples/11483)
