error in R plugin in dada2

qiime dada2 denoise-paired
--i-demultiplexed-seqs demux.qza
--p-trim-left-f 10
--p-trim-left-r 10
--p-trunc-len-f 230
--p-trunc-len-r 230
--p-n-threads 8
--o-representative-sequences rep-seqs-dada2.qza
--o-table table-dada2.qza
--o-denoising-stats denoising-stats-dada2.qza
--verbose

run this command
got this error

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.R --input_directory /tmp/tmp30lrc22a/forward --input_directory_reverse /tmp/tmp30lrc22a/reverse --output_path /tmp/tmp30lrc22a/output.tsv.biom --output_track /tmp/tmp30lrc22a/track.tsv --filtered_directory /tmp/tmp30lrc22a/filt_f --filtered_directory_reverse /tmp/tmp30lrc22a/filt_r --truncation_length 230 --truncation_length_reverse 230 --trim_left 10 --trim_left_reverse 10 --max_expected_errors 2.0 --max_expected_errors_reverse 2.0 --truncation_quality_score 2 --min_overlap 12 --pooling_method independent --chimera_method consensus --min_parental_fold 1.0 --allow_one_off False --num_threads 8 --learn_min_reads 1000000

R version 4.2.2 (2022-10-31)
Loading required package: Rcpp
DADA2: 1.26.0 / Rcpp: 1.0.12 / RcppParallel: 5.1.7
2) Filtering Error in names(answer) <- names1 :
'names' attribute [36] must be the same length as the vector [15]
4: mcmapply(fastqPairedFilter, mapply(c, fwd, rev, SIMPLIFY = FALSE),
mapply(c, filt, filt.rev, SIMPLIFY = FALSE), MoreArgs = list(truncQ = truncQ,
truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight,
maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ,
maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex,
orient.fwd = orient.fwd, matchIDs = matchIDs, id.sep = id.sep,
id.field = id.field, n = n, OMP = OMP, qualityType = qualityType,
compress = compress, verbose = verbose), mc.cores = ncores,
mc.silent = TRUE)
3: filterAndTrim(unfilts, filts, unfiltsR, filtsR, truncLen = c(truncLen,
truncLenR), trimLeft = c(trimLeft, trimLeftR), maxEE = c(maxEE,
maxEER), truncQ = truncQ, rm.phix = TRUE, multithread = multithread)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(filterAndTrim(unfilts, filts, unfiltsR, filtsR,
truncLen = c(truncLen, truncLenR), trimLeft = c(trimLeft,
trimLeftR), maxEE = c(maxEE, maxEER), truncQ = truncQ,
rm.phix = TRUE, multithread = multithread))
Traceback (most recent call last):
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 326, in denoise_paired
run_commands([cmd])
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
subprocess.run(cmd, check=True)
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/tmp30lrc22a/forward', '--input_directory_reverse', '/tmp/tmp30lrc22a/reverse', '--output_path', '/tmp/tmp30lrc22a/output.tsv.biom', '--output_track', '/tmp/tmp30lrc22a/track.tsv', '--filtered_directory', '/tmp/tmp30lrc22a/filt_f', '--filtered_directory_reverse', '/tmp/tmp30lrc22a/filt_r', '--truncation_length', '230', '--truncation_length_reverse', '230', '--trim_left', '10', '--trim_left_reverse', '10', '--max_expected_errors', '2.0', '--max_expected_errors_reverse', '2.0', '--truncation_quality_score', '2', '--min_overlap', '12', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '8', '--learn_min_reads', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 520, in call
results = self._execute_action(
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 581, in _execute_action
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/home/siyam/anaconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 339, in denoise_paired
raise Exception("An error was encountered while running DADA2"
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.

how to fix it
please help

Hi @Tanvir_Seeam ,

This is a memory error. See this forum post for troubleshooting advice (or for more troubleshooting advice, search "'names' attribute must be the same length as the vector " in the search bar to find similar topics in the forum):

Good luck!

1 Like