I am back with partial success- tldr: increasing max-ee for reverse reads did not work with paired end reads. Running only forward reads worked (finally!), but a large portion of reads dropped at the chimera removal step 
For increasing the max-ee for reverse reads, here's what I ran:
qiime dada2 denoise-paired --i-demultiplexed-seqs /Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/04_qiime_import/kw1_v6v8bac_paired_end_demux.qza --o-table /Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/KW1_feature_table.qza --o-denoising-stats /Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/KW1_denoise_stats.qza --o-representative-sequences /Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/KW1_rep_seqs.qza --p-trim-left-f 0 --p-trim-left-r 0 --p-trunc-len-f 250 --p-trunc-len-r 250 --p-max-ee-r 5 --p-n-threads 8 --output-dir /Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2 –verbose
And here's the output and error (same as before- "very few reads"):
R version 4.3.3 (2024-02-29)
Loading required package: Rcpp
DADA2: 1.30.0 / Rcpp: 1.0.13 / RcppParallel: 5.1.9
2) Filtering ......................................
3) Learning Error Rates
513567500 total bases in 2054270 reads from 1 samples will be used for learning the error rates.
513567500 total bases in 2054270 reads from 1 samples will be used for learning the error rates.
Error rates could not be estimated (this is usually because of very few reads).
Error in getErrors(err, enforce = TRUE) : Error matrix is NULL.
6: stop("Error matrix is NULL.")
5: getErrors(err, enforce = TRUE)
4: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction,
selfConsist = TRUE, multithread = multithread, verbose = verbose,
MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, ...)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
Traceback (most recent call last):
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 353, in denoise_paired
run_commands([cmd])
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 38, in run_commands
subprocess.run(cmd, check=True)
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpm2nyd8ho/forward', '--input_directory_reverse', '/Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpm2nyd8ho/reverse', '--output_path', '/Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpm2nyd8ho/output.tsv.biom', '--output_track', '/Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpm2nyd8ho/track.tsv', '--filtered_directory', '/Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpm2nyd8ho/filt_f', '--filtered_directory_reverse', '/Users/rmugge/Documents/QIIME2/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpm2nyd8ho/filt_r', '--truncation_length', '250', '--truncation_length_reverse', '250', '--trim_left', '0', '--trim_left_reverse', '0', '--max_expected_errors', '2.0', '--max_expected_errors_reverse', '5', '--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 "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 530, in __call__
results = self._execute_action(
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 602, in _execute_action
results = action(**arguments)
File "<decorator-gen-49>", line 2, in denoise_paired
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 299, in bound_callable
outputs = self._callable_executor_(
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 570, in _callable_executor_
output_views = self._callable(**view_args)
File "/Users/rmugge/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 366, 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.
For forward reads only, I did 2 runs using different parameters. Here is "run 2":
Input:
qiime dada2 denoise-single --i-demultiplexed-seqs /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/04_qiime_import/kw1_v6v8bac_paired_end_demux.qza --o-table /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/feature_table.qza --o-denoising-stats /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/denoise_stats.qza --o-representative-sequences /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/rep_seqs.qza --p-trim-left 0 --p-trunc-len 280 --p-n-threads 12 --output-dir /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2 –verbose
Output:
R version 4.3.3 (2024-02-29)
Loading required package: Rcpp
DADA2: 1.30.0 / Rcpp: 1.0.13.1 / RcppParallel: 5.1.9
2) Filtering ......................................
3) Learning Error Rates
697275600 total bases in 2490270 reads from 1 samples will be used for learning the error rates.
4) Denoise samples
......................................
5) Remove chimeras (method = consensus)
6) Report read numbers through the pipeline
7) Write output
Saved FeatureTable[Frequency] to: /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/feature_table.qza
Saved FeatureData[Sequence] to: /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/rep_seqs.qza
Saved SampleData[DADA2Stats] to: /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run2/denoise_stats.qza
Here's the denoising stats:
denoise_stats_run2.qzv (1.2 MB)
As you can see, a good portion of reads pass the filtering and denoising steps, and then quite a bit are lost at the chimera removal step. Based on this output, I tried to improve the reads retained by changing --p-chimera-method
to pooled instead of consensus ("run 3"). This somehow resulted in worse output:
denoise_stats_run3.qzv (1.2 MB)
Going back to paired end reads, I also tried increasing the --p-n-reads-learn
to 2M, and that also bombed, with the same error:
Input:
qiime dada2 denoise-paired --i-demultiplexed-seqs /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/04_qiime_import/kw1_v6v8bac_paired_end_demux.qza --o-table /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run4/feature_table.qza --o-denoising-stats /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run4/denoise_stats.qza --o-representative-sequences /Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/05_dada2_run4/rep_seqs.qza --p-trim-left-f 0 --p-trim-left-r 0 --p-trunc-len-f 250 --p-trunc-len-r 200 --p-n-reads-learn 2000000 --p-max-ee-f 4 --p-max-ee-r 5 --p-n-threads 20 --verbose
Output and error:
R version 4.3.3 (2024-02-29)
Loading required package: Rcpp
DADA2: 1.30.0 / Rcpp: 1.0.13.1 / RcppParallel: 5.1.9
2) Filtering ......................................
3) Learning Error Rates
547219750 total bases in 2188879 reads from 1 samples will be used for learning the error rates.
437775800 total bases in 2188879 reads from 1 samples will be used for learning the error rates.
Error rates could not be estimated (this is usually because of very few reads).
Error in getErrors(err, enforce = TRUE) : Error matrix is NULL.
6: stop("Error matrix is NULL.")
5: getErrors(err, enforce = TRUE)
4: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction,
selfConsist = TRUE, multithread = multithread, verbose = verbose,
MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, ...)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
Traceback (most recent call last):
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 353, in denoise_paired
run_commands([cmd])
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 38, in run_commands
subprocess.run(cmd, check=True)
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpi6rsjwr7/forward', '--input_directory_reverse', '/Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpi6rsjwr7/reverse', '--output_path', '/Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpi6rsjwr7/output.tsv.biom', '--output_track', '/Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpi6rsjwr7/track.tsv', '--filtered_directory', '/Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpi6rsjwr7/filt_f', '--filtered_directory_reverse', '/Volumes/Pegasus32_R8/QIIME2_KW1_022025/pipeline_V6V8_bac/tmpi6rsjwr7/filt_r', '--truncation_length', '250', '--truncation_length_reverse', '200', '--trim_left', '0', '--trim_left_reverse', '0', '--max_expected_errors', '4', '--max_expected_errors_reverse', '5', '--truncation_quality_score', '2', '--min_overlap', '12', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '20', '--learn_min_reads', '2000000']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 530, in __call__
results = self._execute_action(
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 602, in _execute_action
results = action(**arguments)
File "<decorator-gen-49>", line 2, in denoise_paired
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 299, in bound_callable
outputs = self._callable_executor_(
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 570, in _callable_executor_
output_views = self._callable(**view_args)
File "/Users/rmugge/.conda/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 366, 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.
I have asked our sequencing facility to run DADA2 so we can compare output- I am hoping nothing is wrong with the sequences, but I'm not sure. At this point, it looks like I either need to learn to run DADA2 in R so I can enforce monotonicity, as others have suggested, or try running Deblur instead. I am open to other suggestions if you have any!