DADA2 denoise-paired problem

Hi,
I have the demux.qzv file looks like this. I do not know how to set the trim.


I set as below. but got this error.

"Plugin error from dada2:  trim_left_r (150) must be smaller than trunc_len_r (150)"
qiime dada2 denoise-paired --i-demultiplexed-seqs demux.qza \
  --o-table table \
  --o-representative-sequences rep-seqs \
  --p-trim-left-f 0 --p-trim-left-r 150 --p-trunc-len-f 0 --p-trunc-len-r 150

Thanks in advance.

Hi @Lu_Yang! The trim parameters handle the “left” side of the sequence, and the trunc parameters handle the “right” side. From the docs:

trim:
Position at which forward read sequences should be trimmed due to low quality. This trims the 5’ end of the input sequences, which will be the bases that were sequenced in the first cycles.

trunc:
Position at which forward read sequences should be truncated due to decrease in quality. This truncates the 3’ end of the of the input sequences, which will be the bases that were sequenced in the last cycles. Reads that are shorter than this value will be discarded. …

To summarize what is happening in your command right now:

  • forward:
    Don’t trim any from the left side of the sequence, then skip truncating the length of the sequence (this is controlled by using the value 0 here)

  • reverse:
    Trim the first 150nts off of the sequence (this will leave the final sequence ~5nts long). Then, truncate the post-trimmed sequences to 150nts (anything less than that length is discarded)

I suspect what you are trying to do here is:

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

This will not trim anything from the left side, will truncate all seqs to 150nts long, and will discard any reads shorter than that. Let us know how it goes!
Thanks! :t_rex:

2 Likes

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