Hello. I am consistently getting the following error when I run denoising with dada2:
====================================================
Plugin error from dada2:
An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.
Debug info has been saved to /tmp/qiime2-q2cli-err-4if6ev_9.log
====================================================
Here is the debug log:
====================================================
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/tmpirn9gach/forward --input_directory_reverse /tmp/tmpirn9gach/reverse --output_path /tmp/tmpirn9gach/output.tsv.biom --output_track /tmp/tmpirn9gach/track.tsv --filtered_directory /tmp/tmpirn9gach/filt_f --filtered_directory_reverse /tmp/tmpirn9gach/filt_r --truncation_length 180 --truncation_length_reverse 180 --trim_left 0 --trim_left_reverse 0 --max_expected_errors 4 --max_expected_errors_reverse 4 --truncation_quality_score 2 --min_overlap 20 --pooling_method pseudo --chimera_method pooled --min_parental_fold 1.0 --allow_one_off False --num_threads 0 --learn_min_reads 1000000
Warning message:
package ‘optparse’ was built under R version 4.2.3
R version 4.2.2 (2022-10-31)
Loading required package: Rcpp
DADA2: 1.26.0 / Rcpp: 1.0.12 / RcppParallel: 5.1.6
2) Filtering ........................................
3) Learning Error Rates
301163580 total bases in 1673131 reads from 2 samples will be used for learning the error rates.
301163580 total bases in 1673131 reads from 2 samples will be used for learning the error rates.
3) Denoise samples ........................................
Pseudo-pool step ........................................
........................................
5) Remove chimeras (method = pooled)
Error in mcfork() :
unable to fork, possible reason: Cannot allocate memory
Calls: removeBimeraDenovo ... isBimeraDenovo -> mclapply -> lapply -> FUN -> mcfork
6: mcfork()
5: FUN(X[[i]], ...)
4: lapply(seq_len(cores), inner.do)
3: mclapply(mc.indices, loopFun, unqs.loop = unqs.int, allowOneOff = allowOneOff,
minFoldParentOverAbundance = minFoldParentOverAbundance,
minParentAbundance = minParentAbundance, minOneOffParentDistance = minOneOffParentDistance,
maxShift = maxShift, mc.cores = mc.cores)
2: isBimeraDenovo(unqs[[i]], ..., verbose = verbose)
1: removeBimeraDenovo(seqtab, method = chimeraMethod, minFoldParentOverAbundance = minParentFold,
allowOneOff = allowOneOff, multithread = multithread)
Traceback (most recent call last):
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 350, in denoise_paired
run_commands([cmd])
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 37, in run_commands
subprocess.run(cmd, check=True)
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/tmpirn9gach/forward', '--input_directory_reverse', '/tmp/tmpirn9gach/reverse', '--output_path', '/tmp/tmpirn9gach/output.tsv.biom', '--output_track', '/tmp/tmpirn9gach/track.tsv', '--filtered_directory', '/tmp/tmpirn9gach/filt_f', '--filtered_directory_reverse', '/tmp/tmpirn9gach/filt_r', '--truncation_length', '180', '--truncation_length_reverse', '180', '--trim_left', '0', '--trim_left_reverse', '0', '--max_expected_errors', '4', '--max_expected_errors_reverse', '4', '--truncation_quality_score', '2', '--min_overlap', '20', '--pooling_method', 'pseudo', '--chimera_method', 'pooled', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '0', '--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/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2cli/commands.py", line 520, in call
results = self._execute_action(
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2cli/commands.py", line 581, in _execute_action
results = action(**arguments)
File "", line 2, in denoise_paired
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/home/aos2/miniconda3/envs/qiime2-amplicon-2024.2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 363, 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.
I am using qiime2-2024.2. I removed the primers with cutadapt prior to importing the reads. To import the reads I used:
qiime tools import
--type 'SampleData[PairedEndSequencesWithQuality]'
--input-path qiime2/Round4_manifest.tsv
--output-path qiime2/Round4_sequences.tsv
--input-format PairedEndFastqManifestPhred33V2
I've attached my manifest
Round4_manifest.tsv (7.3 KB)
The sequences were already demultiplexed prior to importing.
I've also attached my summary visualization
Round4_sequences.qzv (311.6 KB)
I would greatly appreciate any help with this! I've found several threads on similar topics to this already, but I don't think any apply to my exact case. But if I'm wrong I'd be grateful if you could point me towards an existing thread. Thank you!