Denoising my demultiplex-seqs.qza with joined sequences

I imported and demultiplexed a fastq file with joined sequences as if it was a single end sequence. I ended up with a demux-seqs.qza/qzvtha that looks like this demultiplexed-seqs.qzv (297.2 KB) It appears the forward and reverse sequences in a single plot. I am not sure how to denoise it as I wouldn't know how to chose the quality score to truncate the sequence. Thank you

1 Like

Hello Fernando,

If you are using dada2 to denoise, it would be best to import the reads before pairing them, because dada2 uses the differences between the unjoined reads.

If you only have the paired reads, you can simply run deblur. Dada2 denoise single is designed for truely single end data.


I denoised using DADA2 denoise-single without trimming and with --p-trunc-len 0.Is that correct?
thank you

Hello Fernando,

Dada2 can use paired end Illumina data to estimate error rate, control these errors, and improve quality for this sequencing run.

You can get the most value from dada2 by importing reads before they are joined. If you have access to those reads, I think that would give you the best results.

Sure! Dada2 is flexible!
EDIT: Dada2 denoise-single is made for single end data, not joined data.

And if you have the reads before joining, that's even better~


Yes please let me know what would be a good truncation value for the joined data. demultiplexed-seqs.qzv (297.2 KB)

Hello Fernando,

Based on the interactive quality plot, maybe
--p-trim-left 7 --p-trunc-len 471
in order to remove the dip in quality at the very start and very end.

Or maybe
--p-trim-left 7 --p-trunc-len 290
to avoid that dip in quality from read 2.

How long was the region you sequenced? Do you have access to the original data before joining?


The pirmers are 341F and 806R and I believe the reads are about 200 bp each. Actually I was able to get the two reads and I am importing them using EMPairedEndSequences.
Thank you

1 Like

Awesome! OK, let me know if you have any other questions.

what is the best way to get the barcodes.fastq.gz file out from the paired reads?
Since i didn’t have it, I imported the forward and reverse reads in qiime2 using the following:

qiime tools import --type MultiplexedPairedEndBarcodeInSequence --input-path MultiplexedPairedEndBarcodeInSequence --output-path paired-end-seq-withbarcodes.qza

I tried to demultiplex the pair-end-seq-withbarcodes.qza using the following:

qiime cutadapt demux-paired --i-seqs paired-end-seq-withbarcodes.qza --m-forward-barcodes-file SoilSP2015Metadata.txt --m-forward-barcodes-column BarcodeSequence --m-reverse-barcodes-file SoilSP2015Metadata.txt --m-reverse-barcodes-column BarcodeSequence --p-error-rate 0 --o-per-sample-sequences demultiplexed-seqs.qza --o-untrimmed-sequences untrimmed.qza --verbose

but I was unsuccessful.

Below is the error:

cutadapt: error: Character ‘.’ in adapter sequence ‘T.1.7 CATGGAAGT.2.5 CATGCGCAT.3.3 CATGTTGTT10.4.4 CATCAACAT11.4.2 CATCACCGT4.1.5 CAGTTCATT6.2.4 CAGTTGCAT7.3.2 CATAACAAT8.3.5 CATAATAGT9A.3.6 CATATTCTNAME: BARCODESEQTENCE, DTYPE: OBJECT’ is not a valid IUPAC code. Use only characters XACGTURYSWKMBDHVN.
Traceback (most recent call last):
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/”, line 328, in call
results = action(**arguments)
File “</Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/>”, line 2, in demux_paired
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 245, in bound_callable
output_types, provenance)
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/”, line 198, in demux_paired
mux_fmt, batch_size, minimum_length)
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/”, line 162, in _demux
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/”, line 36, in run_command, check=True)
File “/Users/user/anaconda3/envs/qiime2-2020.2/lib/python3.6/”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘cutadapt’, ‘–front’, ‘file:/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/tmpicj4dbjp’, ‘–error-rate’, ‘0.0’, ‘–minimum-length’, ‘1’, ‘-o’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-CasavaOneEightSingleLanePerSampleDirFmt-84vc9gz9/{name}.1.fastq.gz’, ‘–untrimmed-output’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-ql_gbztt/forward.fastq.gz’, ‘–pair-adapters’, ‘-G’, ‘file:/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/tmpck98a76a’, ‘-p’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-CasavaOneEightSingleLanePerSampleDirFmt-84vc9gz9/{name}.2.fastq.gz’, ‘–untrimmed-paired-output’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-ql_gbztt/reverse.fastq.gz’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/qiime2-archive-8ohfukys/2ea2df98-dfe3-49b5-81d4-32ec8354e564/data/forward.fastq.gz’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/qiime2-archive-8ohfukys/2ea2df98-dfe3-49b5-81d4-32ec8354e564/data/reverse.fastq.gz’]’ returned non-zero exit status 2.

Plugin error from cutadapt:

Command ‘[‘cutadapt’, ‘–front’, ‘file:/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/tmpicj4dbjp’, ‘–error-rate’, ‘0.0’, ‘–minimum-length’, ‘1’, ‘-o’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-CasavaOneEightSingleLanePerSampleDirFmt-84vc9gz9/{name}.1.fastq.gz’, ‘–untrimmed-output’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-ql_gbztt/forward.fastq.gz’, ‘–pair-adapters’, ‘-G’, ‘file:/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/tmpck98a76a’, ‘-p’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-CasavaOneEightSingleLanePerSampleDirFmt-84vc9gz9/{name}.2.fastq.gz’, ‘–untrimmed-paired-output’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-ql_gbztt/reverse.fastq.gz’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/qiime2-archive-8ohfukys/2ea2df98-dfe3-49b5-81d4-32ec8354e564/data/forward.fastq.gz’, ‘/var/folders/8s/1_k7c79906dglglh6_91yp9r0000gp/T/qiime2-archive-8ohfukys/2ea2df98-dfe3-49b5-81d4-32ec8354e564/data/reverse.fastq.gz’]’ returned non-zero exit status 2.

See above for debug info.

I do not understand it but it seems like it is not able to recognize where the barcode sequences are based on the metadata file?
Is it possible to demux the sample using demux emp-paired?
Any help would be greatly appreciated.

1 Like

Hey there @nietof,
I noticed this in the error message

This is a bit strange, not sure if its a bug or not (will put this on my todo list), however, I did notice one other weird thing:

Do you have DI barcodes? It sounds like the answer is "no" (especially since you just specified the same barcodes forward and reverse, I've never seen that before myself). In that case, don't include the --m-reverse-barcodes-* flags:

qiime cutadapt demux-paired \
  --i-seqs paired-end-seq-withbarcodes.qza \
  --m-forward-barcodes-file SoilSP2015Metadata.txt \
  --m-forward-barcodes-column BarcodeSequence \
  --p-error-rate 0 \
  --o-per-sample-sequences demultiplexed-seqs.qza \
  --o-untrimmed-sequences untrimmed.qza \

Please give that a try and let us know how it goes. Thanks!

1 Like

Yes that worked.
thanks a lot!!!
Have a great weekend

1 Like

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