Error when using Vsearch dereplicate

Dear Colleagues
I have been working paired-end sequence data but I am somehow stuck. Well, here is what I did and where I am having a problem:
So, I followed the QIIME2 pipeline and I managed to unzip the files and imported the data and demultiplexed them. I successfully trimmed off the primers using “cutadapt” and joined the pairs using “vsearch”. According to the pipeline, I am supposed to quality-filter before I dereplicate and this I also did successfully. Now I am at the dereplicating stage with “vsearch” and I got the following error: “error: Plugin error from vsearch:
Command ‘[‘vsearch’, ‘–derep_fulllength’, ‘/tmp/q2-QIIME1DemuxDirFmt-f21k7p00/seqs.fna’, ‘–output’, ‘/tmp/q2-DNAFASTAFormat-bnkev469’, ‘–relabel_sha1’, ‘–relabel_keep’, ‘–uc’, ‘/tmp/tmpo2pyu2rl’, ‘–qmask’, ‘none’, ‘–xsize’]’ returned non-zero exit status 1.
Debug info has been saved to /tmp/qiime2-q2cli-err-afve0hsd.log”

Here is the command I used:
qiime vsearch dereplicate-sequences
–i-sequences filtered-joined.qza
–p-derep-prefix False
–o-dereplicated-table dereplicated-table.qza
–o-dereplicated-sequences dereplicated-sequences.qza

So, I checked on the QIIME2 forum ( Vsearch error when using dereplicate-sequences ) and someone there also ran into the same problem but they solved it by increasing the RAM memory allocated to the virtual machine from 2GB to 7GB and it worked for them. However, for me it did not work even when I followed the advice there. I then attempted to reduce the amount of data I was working with and it worked. Besides this weak solution, what else can I do?
Thank you for your help.

Hi @BlessingMhlanga, can you please re-run with the --verbose flag, or attach the debug info log produced? Thanks!

Hi @thermokarst, thank you for your response. I have run the command again with --verbose and here is the whole string:

qiime vsearch dereplicate-sequences \

--i-sequences filtered-realtrimmed-joined.qza
--p-derep-prefix False
--o-dereplicated-table joined-table.qza
--o-dereplicated-sequences joined-sequences.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 --derep_fulllength /tmp/q2-QIIME1DemuxDirFmt-76m1onv5/seqs.fna --output /tmp/q2-DNAFASTAFormat-zwo4njbk --relabel_sha1 --relabel_keep --uc /tmp/tmpuuyy3oyz --qmask none --xsize

vsearch v2.7.0_linux_x86_64, 4.8GB RAM, 2 cores

Reading file /tmp/q2-QIIME1DemuxDirFmt-76m1onv5/seqs.fna 100%
1478761122 nt in 4237759 seqs, min 35, max 589, avg 349
Dereplicating 100%
Sorting 100%
3485611 unique sequences, avg cluster 1.2, median 1, max 13884
Writing output file 100%
Writing uc file, first part 100%
Writing uc file, second part 100%
Saved FeatureTable[Frequency] to: joined-table.qza
Saved FeatureData[Sequence] to: joined-sequences.qza

Thank you for your unwavering assistance.

Thanks @BlessingMhlanga!

Well, looks like everything worked that time:

Time to celebrate! :champagne:

Are you still stuck?

Dear @thermokarst,
Thank you very much for the assistance. Well, after that worked, I decided to go ahead and cluster using the denovo and another problem came up, it seems like it is because of memory but how can I solve this? Please see below:

(qiime2-2020.2) qiime2@qiime2core2020-2:~$ qiime vsearch cluster-features-de-novo \

--i-table joined-table.qza
--i-sequences joined-sequences.qza
--p-perc-identity 0.99
--o-clustered-table table-denovo.qza
--o-clustered-sequences cluster-denovo.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 /tmp/tmph5113so9 --id 0.99 --centroids /tmp/q2-DNAFASTAFormat-yo74i2xz --uc /tmp/tmppsj7o4p3 --qmask none --xsize --threads 1

vsearch v2.7.0_linux_x86_64, 4.8GB RAM, 2 cores

Reading file /tmp/tmph5113so9 100%
1155274723 nt in 3485611 seqs, min 35, max 589, avg 331
Sorting by abundance 100%
Counting k-mers 100%

Fatal error: Unable to allocate enough memory.
Traceback (most recent call last):
File "/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 328, in call
results = action(**arguments)
File "</home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-121>", line 2, in cluster_features_de_novo
File "/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
output_types, provenance)
File "/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in callable_executor
output_views = self._callable(**view_args)
File "/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_vsearch/_cluster_features.py", line 193, in cluster_features_de_novo
run_command(cmd)
File "/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_vsearch/_cluster_features.py", line 33, in run_command
subprocess.run(cmd, check=True)
File "/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['vsearch', '--cluster_size', '/tmp/tmph5113so9', '--id', '0.99', '--centroids', '/tmp/q2-DNAFASTAFormat-yo74i2xz', '--uc', '/tmp/tmppsj7o4p3', '--qmask', 'none', '--xsize', '--threads', '1']' returned non-zero exit status 1.

Plugin error from vsearch:

Command '['vsearch', '--cluster_size', '/tmp/tmph5113so9', '--id', '0.99', '--centroids', '/tmp/q2-DNAFASTAFormat-yo74i2xz', '--uc', '/tmp/tmppsj7o4p3', '--qmask', 'none', '--xsize', '--threads', '1']' returned non-zero exit status 1.

See above for debug info.

Yes, you're right, it is a memory error. Unfortunately, the answer is usually "get more memory".

It looks like you're using a Virtualbox VM - you might be able to increase the amount of memory (RAM) available to your virtual machine. Good luck!

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