Question about analyze paired-end data with Qiime2

Hi everyone,

I’m new to qiime2. I’m dealing with MiSeq data sets which are demultiplexed paired-end sequences.

I’m able to import the data into qiime2 using Casava 1.8 format for demultiplexed paired-end data. However, when I tried to denoise the data and generate feature table using dada2 plugin, I got the following error:

Error: no such option: --p-trim-left (Possible options: --p-trim-left-f, --p-trim-left-r)
(qiime2-2017.12) DEN-GADAMI-D2:qiime2-MiSeq212-paired-end gadami$ qiime dada2 denoise-paired \

–i-demultiplexed-seqs demux-paired-end.qza
–p-trim-left-f 0
–p-trim-left-r 0
–p-trunc-len-f 230
–p-trunc-len-r 150
–o-representative-sequences rep-seqs-paired-end.qza
–o-table table-paired-end.qza

I really appreciate if anyone could provide some suggestion about this kind of error. Thanks.

Hi @Yalu_Zhou! It looks like your command may be using an em dash character () instead of two hyphen characters (--). Can you try reformatting your command to use hyphens?

qiime dada2 denoise-paired \
  --i-demultiplexed-seqs demux-paired-end.qza \
  --p-trim-left-f 0 \
  --p-trim-left-r 0 \
  --p-trunc-len-f 230 \
  --p-trunc-len-r 150 \
  --o-representative-sequences rep-seqs-paired-end.qza \
  --o-table table-paired-end.qza

Another idea if that doesn’t work: it looks like you were using --p-trim-left, which is a valid option for qiime dada2 denoise-single, but is not an available option when using qiime dada2 denoise-paired (use --p-trim-left-f and --p-trim-left-r for paired-end data).

Let us know how it goes!

Hi @jairideout,

Thanks for your reply. I changed the commands according to your suggestion, the dada2 started to run. However, I got another error after 30 mins of running (I have 12 samples with forward and reverse seuqnces). The error message is as following:

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 /var/folders/tk/v1n7ybxs10g90pllfpz7t1hr0000gp/T/qiime2-q2cli-err-b0_pi4of.log

Do you have any idea of how to fix this?
Thanks a lot.

Yalu

@Yalu_Zhou

Can you post the contents of the qiime2-q2cli-err-b0_pi4of.log file?

You can run something like:
nano /var/folders/tk/v1n7ybxs10g90pllfpz7t1hr0000gp/T/qiime2-q2cli-err-b0_pi4of.log

1 Like

Hi @amorozov,

Thanks for the reply. I ran the command you suggest and got something as following:

Running external command line application(s). This may print messages to stdout$
The command(s) being run are below. These commands cannot be manually re-run as$

Command: run_dada_paired.R /var/folders/tk/v1n7ybxs10g90pllfpz7t1hr0000gp/T/tmp$

R version 3.4.1 (2017-06-30)
Loading required package: Rcpp
DADA2 R package version: 1.6.0

  1. Filtering …

  2. Learning Error Rates
    2a) Forward Reads
    Initializing error rates to maximum possible estimate.
    Sample 1 - 8464 reads in 4489 unique sequences.
    Sample 2 - 11570 reads in 6592 unique sequences.
    Sample 3 - 7525 reads in 3429 unique sequences.
    Sample 4 - 7765 reads in 2592 unique sequences.
    Sample 5 - 87219 reads in 35143 unique sequences.
    Sample 6 - 13755 reads in 6557 unique sequences.
    Sample 7 - 11148 reads in 5409 unique sequences.
    Sample 8 - 10428 reads in 5167 unique sequences.
    Sample 9 - 13507 reads in 7593 unique sequences.
    Sample 10 - 13595 reads in 6585 unique sequences.
    Sample 11 - 17317 reads in 9040 unique sequences.
    Sample 12 - 12834 reads in 7326 unique sequences.
    selfConsist step 2
    selfConsist step 3
    selfConsist step 4
    selfConsist step 5
    Convergence after 5 rounds.
    2b) Reverse Reads
    Initializing error rates to maximum possible estimate.
    Sample 1 - 8464 reads in 4154 unique sequences.
    Sample 2 - 11570 reads in 6182 unique sequences.
    Sample 3 - 7525 reads in 3469 unique sequences.
    Sample 4 - 7765 reads in 3563 unique sequences.
    Sample 5 - 87219 reads in 28541 unique sequences.
    Sample 6 - 13755 reads in 6201 unique sequences.Sample 7 - 11148 reads in 5198 unique sequences.
    Sample 8 - 10428 reads in 4454 unique sequences.
    Sample 9 - 13507 reads in 7023 unique sequences.
    Sample 10 - 13595 reads in 6866 unique sequences.
    Sample 11 - 17317 reads in 8491 unique sequences.
    Sample 12 - 12834 reads in 6927 unique sequences.
    selfConsist step 2
    selfConsist step 3
    selfConsist step 4
    selfConsist step 5
    Convergence after 5 rounds.

  3. Denoise remaining samples

  4. Remove chimeras (method = consensus)
    Error in isBimeraDenovoTable(unqs[[i]], …, verbose = verbose) :
    Input must be a valid sequence table.
    Calls: removeBimeraDenovo -> isBimeraDenovoTable
    In addition: Warning message:In is.na(colnames(unqs[[i]])) :
    is.na() applied to non-(list or vector) of type 'NULL’
    Execution halted
    Traceback (most recent call last):
    File "/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-package$
    run_commands([cmd])
    File "/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-package$
    subprocess.run(cmd, check=True)
    File "/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/subprocess.p$
    output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '[‘run_dada_paired.R’, '/var/folders/tk/$

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-package$
results = action(**arguments)
File “”, line 2, in denoise_pairedFile "/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-package$
output_types, provenance)
File “/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-package$
output_views = self._callable(**view_args)
File “/Users/gadami/miniconda3/envs/qiime2-2017.12/lib/python3.5/site-package$
” and stderr to learn more.” % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), p$

Do you have any clue of how this happened? Thanks.

Yalu

Thanks for the debug log @Yalu_Zhou! This is the important part of the error message:

Error in isBimeraDenovoTable(unqs[[i]], …, verbose = verbose) :
Input must be a valid sequence table.

This error occurs if none of the forward and reverse reads can be joined during the denoising process. You’ll need to check that your forward and reverse reads overlap enough to be joined after applying the read trimming specified with --p-trim-left-f, --p-trim-left-r, --p-trunc-len-f, and --p-trunc-len-r. After trimming, the reads must overlap by at least 20 nucleotides plus the biological length variation of overlap (see @benjjneb’s posts here, here, and here for details).

Additionally, you’ll need to ensure that all sequencing artifacts (e.g. primers, barcodes, adapters) have been removed from your reads prior to denoising. If the primers are contained at the start of your forward reads, you can alternatively use --p-trim-left-f to have DADA2 trim off the forward read primers during denoising.

The quality score plots generated by qiime demux summarize can be helpful with choosing appropriate trimming parameters based on your sequence data. Hope this helps!

Thanks @jairideout, we used higher quality data to put into dada2, and it worked.

1 Like

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