# Plugin error from dada2 using 18S Amplicon data

**URL:** https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921
**Category:** Technical Support
**Tags:** dada2
**Created:** [November 18, 2024, 3:16pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921 "2024-11-18T15:16:58Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Adyasha\_Panda](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adyasha_panda/32/19345_2.png) [@Adyasha\_Panda](https://forum.qiime2.org/u/Adyasha_Panda)
#### Post date: [November 18, 2024, 3:16pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/1 "2024-11-18T15:16:58Z")

</div>

Hello,  
I am running qiime2 2024.10 version.  
I am running this command for DADA2 de-noising, every time I am getting this error.  
qiime dada2 denoise-paired --i-demultiplexed-seqs demux-paired-end.qza --p-trunc-len-f 230 --p-trunc-len-r 230 --p-n-threads 4 --p-n-reads-learn 1000 --o-table table.qza --o-representative-sequences rep-seqs.qza --o-denoising-stats denoising-stats.qza  
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-ft74jgtp.log

When i ran this to check the log file, I got this :  
cat /tmp/qiime2-q2cli-err-ft74jgtp.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/tmp7hkkeldb/forward --input\_directory\_reverse /tmp/tmp7hkkeldb/reverse --output\_path /tmp/tmp7hkkeldb/output.tsv.biom --output\_track /tmp/tmp7hkkeldb/track.tsv --filtered\_directory /tmp/tmp7hkkeldb/filt\_f --filtered\_directory\_reverse /tmp/tmp7hkkeldb/filt\_r --truncation\_length 230 --truncation\_length\_reverse 230 --trim\_left 0 --trim\_left\_reverse 0 --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 4 --learn\_min\_reads 1000

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  
375360 total bases in 1632 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(filts, nreads = nreads.learn, multithread = multithread)  
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,  
classes)) tryInvokeRestart("muffleWarning"))  
1: suppressWarnings(learnErrors(filts, nreads = nreads.learn, multithread = multithread))  
Traceback (most recent call last):  
File "/home/adyasha/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2\_dada2/\_denoise.py", line 353, in denoise\_paired  
run\_commands([cmd])  
File "/home/adyasha/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 "/home/adyasha/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', '/tmp/tmp7hkkeldb/forward', '--input\_directory\_reverse', '/tmp/tmp7hkkeldb/reverse', '--output\_path', '/tmp/tmp7hkkeldb/output.tsv.biom', '--output\_track', '/tmp/tmp7hkkeldb/track.tsv', '--filtered\_directory', '/tmp/tmp7hkkeldb/filt\_f', '--filtered\_directory\_reverse', '/tmp/tmp7hkkeldb/filt\_r', '--truncation\_length', '230', '--truncation\_length\_reverse', '230', '--trim\_left', '0', '--trim\_left\_reverse', '0', '--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', '4', '--learn\_min\_reads', '1000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File "/home/adyasha/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 530, in **call**  
results = self.\_execute\_action(  
File "/home/adyasha/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 602, in \_execute\_action  
results = action(\*\*arguments)  
File "", line 2, in denoise\_paired  
File "/home/adyasha/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 "/home/adyasha/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 "/home/adyasha/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.

I am unable to understand this. Please help me in fixing this .  
Thank you.

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 18, 2024, 3:23pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/2 "2024-11-18T15:23:25Z")

</div>

Hello Adyasha,

Here are the docs for the plugin you are running:  
[https://docs.qiime2.org/2024.10/plugins/available/dada2/denoise-paired/](https://docs.qiime2.org/2024.10/plugins/available/dada2/denoise-paired/)

Here is the core of the error:

> [@Adyasha\_Panda](#):
>
> 375360 total bases in 1632 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).

This plugin is designed for paired-end Illumina data. Are you still working with Oxford nanopore MinIon data, as you mentioned in your previous thread?

---

<div class="post-metadata">

### Author: ![Adyasha\_Panda](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adyasha_panda/32/19345_2.png) [@Adyasha\_Panda](https://forum.qiime2.org/u/Adyasha_Panda)
#### Post date: [November 18, 2024, 3:54pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/3 "2024-11-18T15:54:22Z")

</div>

Hello ,  
No for this I'm using illumina 18S amplicon data .  
It's a public dataset.  
Project ID : PRJNA936461  
I am trying to replicate the study using qiime2 pipeline.  
Thank you.

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 18, 2024, 4:05pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/4 "2024-11-18T16:05:26Z")

</div>

Okay!

Then the issue is likely due to the number of reads for training:

> [@Adyasha\_Panda](#):
>
> --p-n-reads-learn 1000

Try rerunning this with more reads for the learning step. I think 1 million is the default, so 1k is pretty low.

Let us know how it goes!

---

<div class="post-metadata">

### Author: ![Adyasha\_Panda](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adyasha_panda/32/19345_2.png) [@Adyasha\_Panda](https://forum.qiime2.org/u/Adyasha_Panda)
#### Post date: [November 19, 2024, 5:11am UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/5 "2024-11-19T05:11:31Z")

</div>

> [@Adyasha\_Panda](#):
>
> -p-n-reads-learn

Hi, I Have tried running with more reads, but its throwing errors.

 ![Screenshot from 2024-11-19 11-01-30](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/6/c/6c191d34b240e522904d71937bffe3f1ab3f0905.png)

This is the summary of my demux-paired-end.qzv file

 ![Screenshot from 2024-11-19 11-00-36](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/b/a/bafb1defde3c5b2fb2a9d3c421edb2c6ebf98beb.png)

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 19, 2024, 11:59pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/6 "2024-11-19T23:59:25Z")

</div>

Can you post the full error file here? I can see a few lines, but I think there will be more clues in the full file. 📜

Thanks!

---

<div class="post-metadata">

### Author: ![Adyasha\_Panda](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adyasha_panda/32/19345_2.png) [@Adyasha\_Panda](https://forum.qiime2.org/u/Adyasha_Panda)
#### Post date: [November 20, 2024, 11:02am UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/7 "2024-11-20T11:02:04Z")

</div>

Hi,  
These are the fastq files that I am using  
-rw-r--r-- 1 adyasha adyasha 897241 Nov 19 15:05 SRR23517960\_1.fastq.gz  
-rw-r--r-- 1 adyasha adyasha 1027907 Nov 19 15:05 SRR23517960\_2.fastq.gz  
-rw-r--r-- 1 adyasha adyasha 666420 Nov 19 15:05 SRR23517961\_1.fastq.gz  
-rw-r--r-- 1 adyasha adyasha 746378 Nov 19 15:05 SRR23517961\_2.fastq.gz  
SRR23517962\_1.fastq.gz  
SRR23517962\_2.fastq.gz  
SRR23517963\_1.fastq.gz  
SRR23517963\_2.fastq.gz  
SRR23517964\_1.fastq.gz  
SRR23517964\_2.fastq.gz  
SRR23517965\_1.fastq.gz  
SRR23517965\_2.fastq.gz  
SRR23517966\_1.fastq.gz  
SRR23517966\_2.fastq.gz  
SRR23517967\_1.fastq.gz  
SRR23517967\_2.fastq.gz

First I have used this command  
qiime tools import   
--type 'SampleData[PairedEndSequencesWithQuality]'   
--input-path manifest.tsv   
--output-path demux.qza   
--input-format PairedEndFastqManifestPhred33V2

Then I have ran this command  
qiime dada2 denoise-paired --i-demultiplexed-seqs demux.qza --p-trunc-len-f 250 --p-trunc-len-r 200 --o-table table.qza --o-representative-sequences rep-seqs.qza --o-denoising-stats denoising-stats.qza

this gave me this error :  
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-x2m5r9j9.log

Here is the log file to the error -  
cat /tmp/qiime2-q2cli-err-x2m5r9j9.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/tmp65t4hu0n/forward --input\_directory\_reverse /tmp/tmp65t4hu0n/reverse --output\_path /tmp/tmp65t4hu0n/output.tsv.biom --output\_track /tmp/tmp65t4hu0n/track.tsv --filtered\_directory /tmp/tmp65t4hu0n/filt\_f --filtered\_directory\_reverse /tmp/tmp65t4hu0n/filt\_r --truncation\_length 250 --truncation\_length\_reverse 200 --trim\_left 0 --trim\_left\_reverse 0 --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 1 --learn\_min\_reads 1000000

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  
4191000 total bases in 16764 reads from 8 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(filts, nreads = nreads.learn, multithread = multithread)  
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,  
classes)) tryInvokeRestart("muffleWarning"))  
1: suppressWarnings(learnErrors(filts, nreads = nreads.learn, multithread = multithread))  
Traceback (most recent call last):  
File "/home/adyasha/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2\_dada2/\_denoise.py", line 353, in denoise\_paired  
run\_commands([cmd])  
File "/home/adyasha/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 "/home/adyasha/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', '/tmp/tmp65t4hu0n/forward', '--input\_directory\_reverse', '/tmp/tmp65t4hu0n/reverse', '--output\_path', '/tmp/tmp65t4hu0n/output.tsv.biom', '--output\_track', '/tmp/tmp65t4hu0n/track.tsv', '--filtered\_directory', '/tmp/tmp65t4hu0n/filt\_f', '--filtered\_directory\_reverse', '/tmp/tmp65t4hu0n/filt\_r', '--truncation\_length', '250', '--truncation\_length\_reverse', '200', '--trim\_left', '0', '--trim\_left\_reverse', '0', '--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', '1', '--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/adyasha/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 530, in **call**  
results = self.\_execute\_action(  
File "/home/adyasha/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 602, in \_execute\_action  
results = action(\*\*arguments)  
File "", line 2, in denoise\_paired  
File "/home/adyasha/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 "/home/adyasha/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 "/home/adyasha/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.

Please help me where I am going wrong.

Thank you

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 20, 2024, 5:18pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/8 "2024-11-20T17:18:03Z")

</div>

> [@Adyasha\_Panda](#):
>
> 1. Learning Error Rates  
> 4191000 total bases in 16764 reads from 8 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.")

Here is the core of the error.

That's frustrating because the number of reads look good!

Can you post the plot of quality scores? I wonder if these are Illumina's new binned q-scores...

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/d/0/d00a975c2814bc5a8ed1a23fbd8c662d3ac59975.png)

---

<div class="post-metadata">

### Author: ![Adyasha\_Panda](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adyasha_panda/32/19345_2.png) [@Adyasha\_Panda](https://forum.qiime2.org/u/Adyasha_Panda)
#### Post date: [November 21, 2024, 4:15am UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/9 "2024-11-21T04:15:36Z")

</div>

Hi,

This is the plot

 ![Screenshot from 2024-11-21 09-44-34](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/c/2c7c0d136ba8b58086aa436ac22463b359369e62.jpeg)

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 21, 2024, 3:49pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/10 "2024-11-21T15:49:43Z")

</div>

That's the problem! Those quality scores are not typical.

For comparison, check out the quality scores from the Atacama-soils tutorial  
[https://view.qiime2.org/visualization/?src=https://docs.qiime2.org/2024.10/data/tutorials/atacama-soils/demux-subsample.qzv](https://view.qiime2.org/visualization/?src=https://docs.qiime2.org/2024.10/data/tutorials/atacama-soils/demux-subsample.qzv)

Has this data been preprocessed in some way?

Ideally, we want to import raw data directly from the Illumina sequencer and then perform all quality filtering and trimming within Qiime2 so we can automatically keep a record of our work!

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [November 27, 2024, 4:23pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/11 "2024-11-27T16:23:42Z")

</div>

4 off-topic replies have been split into a new topic: [DADA2 error for 18S paired end reads](https://forum.qiime2.org/t/dada2-error-for-18s-paired-end-reads/31992)

Please keep replies on-topic in the future.

---

<div class="post-metadata">

### Author: ![Adyasha\_Panda](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adyasha_panda/32/19345_2.png) [@Adyasha\_Panda](https://forum.qiime2.org/u/Adyasha_Panda)
#### Post date: [November 27, 2024, 7:02am UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/14 "2024-11-27T07:02:07Z")

</div>

Hi,  
I am not sure if this data has been preprocessed.  
I am using this publicly available dataset : PRJNA936461

If this data has been preprocessed then how can I run it using qiime2, is there any other way to do so ?

Thank you

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [December 2, 2024, 2:30pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/15 "2024-12-02T14:30:51Z")

</div>

For my own notes, here's a paper that uses [Bioproject PRJNA936461](https://www.ncbi.nlm.nih.gov/bioproject/?term=PRJNA936461):  
[https://www.nature.com/articles/s41598-023-43306-4](https://www.nature.com/articles/s41598-023-43306-4)

If reads are changed in some way, you could try a reference-based method like Deblur:  
[https://docs.qiime2.org/2024.10/plugins/available/deblur/index.html](https://docs.qiime2.org/2024.10/plugins/available/deblur/index.html)

Thank you for your patience while I was out over the long holiday weekend.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [January 2, 2025, 8:31pm UTC](https://forum.qiime2.org/t/plugin-error-from-dada2-using-18s-amplicon-data/31921/16 "2025-01-02T20:31:46Z")

</div>

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