dada2 error message: incorrect number of subscripts on matrix

Hello, I am using qiime2-2019.7 running dada2, encountered an error. However, aftering check the topics posted all, I have no idea about solving this. My command and error info are as follows:
qiime dada2 denoise-paired --i-demultiplexed-seqs paired-end-demux.qza --p-trunc-len-f 0 --p-trunc-len-r 0 --p-n-threads 4 --o-table table-dada2.qza --o-representative-sequences rep-seqs-dada2.qza --o-denoising-stats stats-dada2.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/tmpui69c8hs/forward /tmp/tmpui69c8hs/reverse /tmp/tmpui69c8hs/output.tsv.biom /tmp/tmpui69c8hs/track.tsv /tmp/tmpui69c8hs/filt_f /tmp/tmpui69c8hs/filt_r 0 0 0 0 2.0 2.0 2 consensus 1.0 1 1000000

R version 3.5.1 (2018-07-02)
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: 1.0.2 / RcppParallel: 4.4.3

  1. Filtering …
  2. Learning Error Rates
    70907162 total bases in 291823 reads from 3 samples will be used for learning the error rates.
    73233596 total bases in 291823 reads from 3 samples will be used for learning the error rates.
    Error in err[c(1, 6, 11, 16), ] ← 1 :
    incorrect number of subscripts on matrix
    Execution halted
    Traceback (most recent call last):
    File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 234, in denoise_paired
    run_commands([cmd])
    File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
    subprocess.run(cmd, check=True)
    File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/subprocess.py”, line 418, in run
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpui69c8hs/forward’, ‘/tmp/tmpui69c8hs/reverse’, ‘/tmp/tmpui69c8hs/output.tsv.biom’, ‘/tmp/tmpui69c8hs/track.tsv’, ‘/tmp/tmpui69c8hs/filt_f’, ‘/tmp/tmpui69c8hs/filt_r’, ‘0’, ‘0’, ‘0’, ‘0’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘1’, ‘1000000’]’ returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py”, line 327, in call
results = action(**arguments)
File “</home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-459>”, line 2, in denoise_paired
File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/home/yjk/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 249, 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.

Thanks for any help.

Hello @yjiakang,
Welcome to the QIIME 2 forum :qiime2:
I am not 100% sure what your error is. however, I have found this forum post that has the same error occur.

The problem there was that they were using shotgun metagenomic data instead of amplicon data (dada2 is designed for amplicon data). What kind of data are you working with?

I hope that helps!
Chloe :turtle:

Hi,thanks for you reply. I am working with the amplicon data. The quality is as follows:
image|690x238

Hello @yjiakang,
I am sorry for my late response. I am still trying to figure out what is causing your issue
By any chance are you using Novaseq data?
Chloe :turtle:

1 Like