DADA2 error: unused argument (method = "consensus")

Hi Thermokarst,

I got a similar error. I am trying qiime2 with a small set of 9 samples. The files are .bz2, I converted to .gz, renamed to cassava 1.8 standard format (I haven’t change the set number ‘’_001" in any of them, I hope that is fine), examples of the conversion below:

NG-12583_4A03_lib191453_5405_1_1.fastq.gz -> L4A03_1_L001_R1_001.fastq.gz
NG-12583_4A03_lib191453_5405_1_2.fastq.gz -> L4A03_1_L001_R2_001.fastq.gz
NG-12583_4A04_lib191453_5405_1_1.fastq.gz -> L4A04_1_L001_R1_001.fastq.gz
NG-12583_4A04_lib191453_5405_1_2.fastq.gz -> L4A04_1_L001_R2_001.fastq.gz
NG-12583_4A05_lib191453_5405_1_1.fastq.gz -> L4A05_1_L001_R1_001.fastq.gz
NG-12583_4A05_lib191453_5405_1_2.fastq.gz -> L4A05_1_L001_R2_001.fastq.gz
(name of the samples: 4A03, 4A04, 4A05)

Then I imported the data with:

qiime tools import   
--type 'SampleData[PairedEndSequencesWithQuality]'   
--input-path /mnt/fastqfiles/GATC-04/test  
--source-format CasavaOneEightSingleLanePerSampleDirFmt   
--output-path demux-paired-end.qza

then:

qiime demux summarize \
  --i-data demux-paired-end.qza \
  --o-visualization demux-summary.qzv

and finally this, where I got the error:

qiime dada2 denoise-paired \
  --p-trim-left-f 10 \
  --p-trim-left-r 10 \
  --p-trunc-len-f 260 \
  --p-trunc-len-r 210 \
  --p-max-ee 3 \
  --p-trunc-q 2 \
  --p-n-threads 0 \
  --i-demultiplexed-seqs demux-paired-end.qza \
  --o-representative-sequences rep-seqs.qza \
  --o-table table.qza \
  --verbose;

The error I got is:

Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /tmp/tmp1nuehqcl/forward /tmp/tmp1nuehqcl/reverse /tmp/tmp1nuehqcl/output.tsv.biom /tmp/tmp1nuehqcl/filt_f /tmp/tmp1nuehqcl/filt_r                                                                                                 260 210 10 10 3.0 2 consensus 1.0 0 1000000

R version 3.3.2 (2016-10-31)
Loading required package: Rcpp
DADA2 R package version: 1.2.1
1) Filtering ...................
2) Learning Error Rates
2a) Forward Reads
Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
Initializing error rates to maximum possible estimate.
Sample 1 - 922654 reads in 125731 unique sequences.
Sample 2 - 883708 reads in 116308 unique sequences.
   selfConsist step 2
   selfConsist step 3
   selfConsist step 4
   selfConsist step 5
   selfConsist step 6


Convergence after  6  rounds.
2b) Reverse Reads
Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
Initializing error rates to maximum possible estimate.
Sample 1 - 922654 reads in 156636 unique sequences.
Sample 2 - 883708 reads in 151915 unique sequences.
   selfConsist step 2
   selfConsist step 3
   selfConsist step 4
   selfConsist step 5
   selfConsist step 6
   selfConsist step 7


Convergence after  7  rounds.

3) Denoise remaining samples .................
The sequences being tabled vary in length.
4) Remove chimeras (method = consensus)
Error in isBimeraDenovo(unqs[[i]], ..., verbose = verbose) :
  unused argument (method = "consensus")
Calls: removeBimeraDenovo -> isBimeraDenovo
Execution halted
Traceback (most recent call last):
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 179, in denoise_paired
    run_commands([cmd])
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 35, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmp1nuehqcl/forward', '/tmp/tmp1nuehqcl/reverse', '/tmp/tmp1nuehqcl/output.tsv.biom', '/t                                                                                                mp/tmp1nuehqcl/filt_f', '/tmp/tmp1nuehqcl/filt_r', '260', '210', '10', '10', '3.0', '2', 'consensus', '1.0', '0', '1000000']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/q2cli/commands.py", line 218, in __call__
    results = action(**arguments)
  File "<decorator-gen-338>", line 2, in denoise_paired
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/qiime2/sdk/action.py", line 220, in bound_callable
    output_types, provenance)
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/qiime2/sdk/action.py", line 355, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/mothur/anaconda3/envs/qiime2-2017.10/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 194, in denoise_paired
    " and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

Plugin error from dada2:

  An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

See above for debug info."

I haven’t remove the primers (10 bp), but I thought with the comand --p-trim-left-f 10
–p-trim-left-r 10 I am doing this already, please correct me if that is absolutely wrong. I am also using conda not miniconda, could be this also the problem? Many thanks in advance for your help! :slight_smile:

Ana.

The error code and consensus argument look similar to a thread I stumbled upon trying to debug my own DADA2 issue, which can be found here: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more

Not sure if this is exactly the issue you’re encountering or a possible fix, but it’s worth checking out.

Thanks @Brightbeard! That is actually a different error (Input must be a valid sequence table. vs unused argument(method = "consensus"), so that thread isn't really applicable to @ana_RODILES issue. Thanks!


@ana_RODILES, it looks like you have a different version of R and dada2 that is overriding the versions that we provide with QIIME 2! This happens sometimes, please take a look at this hack to see if it fixes the issue for you.

Thanks! :t_rex:

Hİ Matthew,
Thank you for your reply. I have increased the mem to 500 gb and I change the TEMP directory to somewhere else with the following command.

export TMPDIR="/home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary"

Then it started to analyse however, I got the following error afterwards.


Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/forward /home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/reverse /home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/output.tsv.biom /home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/filt_f /home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/filt_r 225 218 22 18 2.0 2 consensus 1.0 0 1000000

R version 3.3.2 (2016-10-31) 
Loading required package: Rcpp
There were 50 or more warnings (use warnings() to see the first 50)
DADA2 R package version: 1.2.2 
1) Filtering ..............................
2) Learning Error Rates
2a) Forward Reads
Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
Initializing error rates to maximum possible estimate.
Sample 1 - 406330 reads in 136553 unique sequences.
Sample 2 - 349337 reads in 134597 unique sequences.
Sample 3 - 276323 reads in 102283 unique sequences.
   selfConsist step 2 
   selfConsist step 3 
   selfConsist step 4 
   selfConsist step 5 


Convergence after  5  rounds.
2b) Reverse Reads
Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
Initializing error rates to maximum possible estimate.
Sample 1 - 406330 reads in 170848 unique sequences.
Sample 2 - 349337 reads in 160545 unique sequences.
Sample 3 - 276323 reads in 125927 unique sequences.
   selfConsist step 2 
   selfConsist step 3 
   selfConsist step 4 
   selfConsist step 5 


Convergence after  5  rounds.

3) Denoise remaining samples ...........................
The sequences being tabled vary in length.
4) Remove chimeras (method = consensus)
Error in isBimeraDenovo(unqs[[i]], ..., verbose = verbose) : 
  unused argument (method = "consensus")
Calls: removeBimeraDenovo -> isBimeraDenovo
Execution halted
Traceback (most recent call last):
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 179, in denoise_paired
    run_commands([cmd])
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 35, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/forward', '/home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/reverse', '/home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/output.tsv.biom', '/home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/filt_f', '/home/projects/pr_46704/people/argl/Projects/BioCat/Functional_guilds/Enrichments/ftp.cbs.dtu.dk/Arda/RawData/ftp.cbs.dtu.dk/Raw_Seqs/Temporary/tmpdx70hxgr/filt_r', '225', '218', '22', '18', '2.0', '2', 'consensus', '1.0', '0', '1000000']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2cli/commands.py", line 218, in __call__
    results = action(**arguments)
  File "<decorator-gen-338>", line 2, in denoise_paired
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/site-packages/qiime2/sdk/action.py", line 220, in bound_callable
    output_types, provenance)
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/site-packages/qiime2/sdk/action.py", line 355, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/people/argl/.conda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 194, in denoise_paired
    " and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

How can I solve the issue any advices?

Hi @parachrosis, can you take a look at this post - specifically the part about package versions? Thanks! :t_rex:

Hi @thermokarst, many thanks for your reply. I have tried echo ".libPaths(.libPaths()[2])" > ~/.Rprofile but unfortunately haven't work. After other advises I have also tried to download the last version of R 3.4.3 (outside of the qiime enviromment) and dada2 1.2.2 (inside of the qiime environment). However I got 'the same' error. Then I uninstall R outside of the qiime2 environment and I got the same error (below). Not very sure what else I can do. Any suggestions please? Many thanks!

(qiime2-2017.11) mothur@Microbiome:/mnt/fastqfiles/GATC-04/test$ qiime dada2 denoise-paired \

--p-trim-left-f 10
--p-trim-left-r 10
--p-trunc-len-f 260
--p-trunc-len-r 210
--p-max-ee 3
--p-trunc-q 2
--p-n-threads 0
--p-chimera-method consensus
--i-demultiplexed-seqs demux-paired-end.qza
--o-representative-sequences rep-seqs.qza
--o-table table.qza
--verbose;
Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /tmp/tmpjw1lrtkf/forward /tmp/tmpjw1lrtkf/reverse /tmp/tmpjw1lrtkf/output.tsv.biom /tmp/tmpjw1lrtkf/filt_f /tmp/tmpjw1lrtkf/filt_r 260 210 10 10 3.0 2 consensus 1.0 0 1000000

R version 3.3.2 (2016-10-31)
Loading required package: Rcpp
There were 50 or more warnings (use warnings() to see the first 50)
DADA2 R package version: 1.2.2

  1. Filtering ...................
  2. Learning Error Rates
    2a) Forward Reads
    Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
    Initializing error rates to maximum possible estimate.
    Sample 1 - 922654 reads in 125731 unique sequences.
    Sample 2 - 883708 reads in 116308 unique sequences.
    selfConsist step 2
    selfConsist step 3
    selfConsist step 4
    selfConsist step 5
    selfConsist step 6

Convergence after 6 rounds.
2b) Reverse Reads
Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
Initializing error rates to maximum possible estimate.
Sample 1 - 922654 reads in 156636 unique sequences.
Sample 2 - 883708 reads in 151915 unique sequences.
selfConsist step 2
selfConsist step 3
selfConsist step 4
selfConsist step 5
selfConsist step 6
selfConsist step 7

Convergence after 7 rounds.

  1. Denoise remaining samples .................
    The sequences being tabled vary in length.
  2. Remove chimeras (method = consensus)
    Error in isBimeraDenovo(unqs[[i]], ..., verbose = verbose) :
    unused argument (method = "consensus")
    Calls: removeBimeraDenovo -> isBimeraDenovo
    Execution halted
    Traceback (most recent call last):
    File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 179, in denoise_paired
    run_commands([cmd])
    File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 35, in run_commands
    subprocess.run(cmd, check=True)
    File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmpjw1lrtkf/forward', '/tmp/tmpjw1lrtkf/reverse', '/tmp/tmpjw1lrtkf/output.tsv.biom', '/tmp/tmpjw1lrtkf/filt_f', '/tmp/tmpjw1lrtkf/filt_r', '260', '210', '10', '10', '3.0', '2', 'consensus', '1.0', '0', '1000000']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2cli/commands.py", line 218, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/qiime2/sdk/action.py", line 220, in bound_callable
output_types, provenance)
File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/qiime2/sdk/action.py", line 355, in callable_executor
output_views = self._callable(**view_args)
File "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/python3.5/site-packages/q2_dada2/_denoise.py", line 194, in denoise_paired
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

Plugin error from dada2:

An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

See above for debug info.

What do you get when you run the following command?

$ cat ~/.Rprofile

Hmm, I don't think that will help here, but good try!

I got this:
/home/mothur/.Rprofile

which is weird because we also tried to delete R, and apparently is still there... The previous person working on the server installed R and dada2... this why "/home/mothur". However my knowledge about virtual machines is scarce... but I'm suspecting some interactions of R dependencies.

I also tried yesterday with Atacama tutorial, in case the problem were because of the sample nature, but same error as usual, in DADA2 with R. Anyway there is something good, I tried today Atacama with Deblur following Analyzing paired end reads in QIIME 2 and it worked (got table, sequences data and stats.qza!). So there is something working :smiley:

Thanks @thermokarst

Ps. QIIME2 have been also upgraded to qiime2-2017.11

Oops! I made a mistake here, I meant to ask you to run this command:

$ cat ~/.Rprofile

This makes sense --- deblur doesn't use R, so it isn't implicated in all of this!

Thanks @thermokarst. I got this:

.libPaths(.libPaths()[2])

Aha, so 2 libraries in here. Any suggestions about how to get free of them? Many thanks!

I don't think we want to get rid of anything in this file, it looks like exactly what it should be!

Can you report the results when running this command?

$ R -e ".libPaths()"

Ahhhh... that's my knowledge about (=0) Sorry!

-> Outside of the environment I got this:

The program 'R' is currently not installed. You can install it by typing:
sudo apt install r-base-core

-> Inside of the environment I got this:

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

.libPaths()
[1] "/home/mothur/miniconda3/envs/qiime2-2017.11/lib/R/library"

Many thanks!

Hi @ana_RODILES, how about we remove your environment and try again? Specifically, can you run the following:

$ source deactivate
$ conda env remove -n qiime2-2017.11

Don’t do anything to the ~/.Rprofile file, we want that to stay right where it is, with the content it has right now.

Then, follow the official install guide to re-install. Let us know how it goes! :t_rex:

1 Like

Hi @thermokarst, when I applied those commands I got this:
Proceed ([y]/n)? y

WARNING conda.core.link:run_script(516): pre-unlink script failed for package conda-forge::widgetsnbextension-3.0.8-py35_0
consider notifying the package maintainer
mothur@Microbiome:~$ source activate qiime2-2017.11

CondaEnvironmentNotFoundError: Could not find environment: qiime2-2017.11 .
You can list all discoverable environments with conda info --envs.

So I proceed (Y) and I installed qiime 2 following the website again. And magic, dada2 works finally! I think the key was to uninstall qiime2 properly with the last commands you provided. Many thanks for your great help, @thermokarst!!!

1 Like

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