Plugin error from vsearch when performing cluster-features-closed-reference

Hey all,

I receive the following error when I use this command:

qiime vsearch cluster-features-closed-reference \

–i-table asvtab.qza
–i-sequences rep-seqs-combined.qza
–i-reference-sequences dynamic.qza
–p-perc-identity 0.85
–o-clustered-table table-85.qza
–o-clustered-sequences rep-seqs-85.qza
–o-unmatched-sequences unmatched.qza

Plugin error from vsearch:

Command ‘[‘vsearch’, ‘–usearch_global’, ‘/tmp/tmpuczm5u0_’, ‘–id’, ‘0.85’, ‘–db’, ‘/tmp/qiime2-archive-w4w_0a13/7eb8d9ad-42d8-409f-95ae-162bcc0f7167/data/dna-sequences.fasta’, ‘–uc’, ‘/tmp/tmpspkmnh3p’, ‘–strand’, ‘plus’, ‘–qmask’, ‘none’, ‘–notmatched’, ‘/tmp/tmpcjsll053’, ‘–threads’, ‘1’]’ returned non-zero exit status 1.

Debug info has been saved to /tmp/qiime2-q2cli-err-6q9_sf14.log



Hey Andrew,

Can you post the file /tmp/qiime2-q2cli-err-6q9_sf14.log? Let’s see if there are more clues inside. :female_detective:


1 Like


Here is the complete log:

(qiime2-2019.7) [email protected]:/home/17192451/ghost$ more /tmp/qiime2-q2cli-err-6q9_sf14.log
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 wil
l depend on temporary files that no longer exist.

Command: vsearch --usearch_global /tmp/tmpuczm5u0_ --id 0.85 --db /tmp/qiime2-ar
chive-w4w_0a13/7eb8d9ad-42d8-409f-95ae-162bcc0f7167/data/dna-sequences.fasta --u
c /tmp/tmpspkmnh3p --strand plus --qmask none --notmatched /tmp/tmpcjsll053 --th
reads 1

vsearch v2.7.0_linux_x86_64, 15.6GB RAM, 8 cores

Reading file /tmp/qiime2-archive-w4w_0a13/7eb8d9ad-42d8-409f-95ae-162bcc0f7167/d
ata/dna-sequences.fasta 100%
19748835 nt in 35667 seqs, min 205, max 3526, avg 554
Masking 100%
Counting k-mers 100%
Creating k-mer index 100%

Fatal error: Invalid (zero) abundance annotation in FASTA file header
Traceback (most recent call last):
File “/UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/”, line 327, in call
results = action(**arguments)
File “</UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/>”, line 2, in cluster_features_closed_reference
File “/UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/”, line 240, in bound_callable
output_types, provenance)
File “/UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_vsearch/”, line 256, in cluster_features_closed_reference
File "/UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_vsearch/", line 33, in run_command, check=True)
File “/UBC-O/17192451/miniconda3/envs/qiime2-2019.7/lib/python3.6/”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '[‘vsearch’, ‘–usearch_global’, '/tmp/tmpuczm5u0
’, ‘–id’, ‘0.85’, ‘–db’, ‘/tmp/qiime2-archive-w4w_0a13/7eb8d9ad-42d8-409f-95ae-162bcc0f7167/data/dna-sequences.fasta’, ’
–uc’, ‘/tmp/tmpspkmnh3p’, ‘–strand’, ‘plus’, ‘–qmask’, ‘none’, ‘–notmatched’, ‘/tmp/tmpcjsll053’, ‘–threads’, ‘1’]’ returned non-zero exit status 1.

I have noticed the fatal error and I have seen that in other posts for different reasons. Which file is this and how can I correct it? Thanks!

Ah ha! Here’s the error:

Usually cluster-features-closed-reference is run on the reads themselves, not on a clustered rep set reads.

I bet this is causing issues.

While you can combine asv denoising and close-ref clustering, these are often used as complementary methods to analyse the same input data. Try running this plugin on your reads before denoising, and see if that helps.



I did my filtering and denoising in R then exported to qiime. At what stage should I export? Just before dada2 after filtering and trimming?


Good morning Andrew,

Yep. That should work, and it’s the typical place to start the clustering or denoising process.

Ah, OK. Sounds like you are comfortable getting into the underlying code, so now’s a good time to explain what’s going with vsearch under the hood.

Your error Fatal error: Invalid (zero) abundance annotation in FASTA file header relates to a preprocessing step needed by vsearch. That size annotation in the header is made during dereplication, in which reads that exactly match each other are represented as a single read with a size annotation. So this single fna entry represents two reads:


As best as I can tell, you have a read with size=0;, which is causing this error. While this is not impossible, it’s a strong indicator that something went wrong during the read processing. (If the read appears zero times, you would simply leave it out of the output file!)

Seeing size=0; is like dividing by zero: the equation has valid syntax, but the biology it represents is fishy! :fish: :blowfish: :tropical_fish:


1 Like