# On two methods of dealing with read-through sequences in q2-cutadapt

**URL:** https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072
**Category:** User Support
**Tags:** primers, cutadapt
**Created:** [October 14, 2020, 10:19am UTC](https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072 "2020-10-14T10:19:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![AdrianS85](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adrians85/32/9383_2.png) [@AdrianS85](https://forum.qiime2.org/u/AdrianS85)
#### Post date: [October 14, 2020, 10:19am UTC](https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072/1 "2020-10-14T10:19:54Z")

</div>

Hello all!

Firstly, Qiime team: thank You for this lovely tool, kind forum and helpful Youtube tutorial. I've learned much thanks to You!

Nevertheless, I come seeking Your help. Here is my problem:

I used q2-cutadapt (qiime2- 2020.8) to remove primer sequences form my reads (sequencing: 2x300 bases, primers: 341f-785r, ~466 - total amplicon length) ) in preparation for Deblurring. I decided to remove read-through primer sequences, just in case. Hence, I've run:

```
qiime cutadapt trim-paired \
	--i-demultiplexed-sequences qiime_analysis/primary_input.qza \
	--p-cores 3 \
	--p-front-f CCTACGGGNGGCWGCAG \
	--p-front-r GACTACHVGGGTATCTAATCC \
	--p-adapter-f GGATTAGATACCCBDGTAGTC \
	--p-adapter-r CTGCWGCCNCCCGTAGG \
	--p-match-adapter-wildcards True \
	--p-discard-untrimmed True \
	--o-trimmed-sequences qiime_analysis/I_noadapter_for_deblur_SampleData[PairedEndSequencesWithQuality].qza \
	--verbose > qiime_analysis/I_report_noadapter_for_deblur_SampleData[PairedEndSequencesWithQuality]

```

BUT! I've read on Your forum that there is an alternative way of giving the same command, namely:

```
qiime cutadapt trim-paired \
	--i-demultiplexed-sequences qiime_analysis/primary_input.qza \
	--p-cores 3 \
	--p-adapter-f 'CCTACGGGNGGCWGCAG...GGATTAGATACCCBDGTAGTC' \
	--p-adapter-r 'GACTACHVGGGTATCTAATCC...CTGCWGCCNCCCGTAGG' \
	--p-match-adapter-wildcards True \
	--p-discard-untrimmed True \
	--o-trimmed-sequences qiime_analysis/II_noadapter_for_deblur_SampleData[PairedEndSequencesWithQuality].qza \
	--verbose > qiime_analysis/II_report_noadapter_for_deblur_SampleData[PairedEndSequencesWithQuality]

```

I've tried both methods (see visualizations below):  
First method: [[I\_noadapter\_for\_deblur\_SampleData[PairedEndSequencesWithQuality].qzv](https://forum.qiime2.org/uploads/short-url/tOxnvNl163RRwuvPyPMXzUIaHdb.qzv) (318.5 KB) ](http://)  
Second method: [II\_noadapter\_for\_deblur\_SampleData[PairedEndSequencesWithQuality].qzv](https://forum.qiime2.org/uploads/short-url/fSedWQv9txoaVldvvOHPLYRNveO.qzv) (318.3 KB)

As You can see, although results are very similar they do somewhat differ in lengths and quality scores of sequences produced.

Turns out that the second method produces this warning:

> WARNING: You specified a linked adapter as '-a ADAPTER1...ADAPTER2'. The interpretation of what this means has changed in Cutadapt 2.0. (The 5' adapter is now no longer anchored by default.) To get results consist with the old behavior, you need to anchor the 5' adapter explicitly as in '-a ^ADAPTER1...ADAPTER2'.

Thus, I would assume that the second method is obsolete and may produce unintended results. Am I correct in my conclusion?

Best  
Adrian

---

<div class="post-metadata">

### Author: ![andrewsanchez](https://forum.qiime2.org/user_avatar/forum.qiime2.org/andrewsanchez/32/20160_2.png) [@andrewsanchez](https://forum.qiime2.org/u/andrewsanchez)
#### Post date: [October 16, 2020, 1:36am UTC](https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072/2 "2020-10-16T01:36:09Z")

</div>

Hi Adrian! 👋 Welcome to the forum!

> [@AdrianS85](#):
>
> Thus, I would assume that the second method is obsolete and may produce unintended results. Am I correct in my conclusion?

I don't think the warning suggests anything obsolete; it's just a warning to make sure users are clear about what the command is doing. Please see [this section of the cutadapt docs regarding linked adapters](https://cutadapt.readthedocs.io/en/stable/guide.html#linked-adapters).

That being said, I'm not sure your commands are identical. Perhaps you need to prepend adapter 1 with `^` as the error message suggests. I am not sure about that though. Take my thoughts with a grain of salt as I am also a beginner with :qiime2: ! 🤖

---

<div class="post-metadata">

### Author: ![AdrianS85](https://forum.qiime2.org/user_avatar/forum.qiime2.org/adrians85/32/9383_2.png) [@AdrianS85](https://forum.qiime2.org/u/AdrianS85)
#### Post date: [October 16, 2020, 8:36am UTC](https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072/3 "2020-10-16T08:36:26Z")

</div>

Hey Andrew, thanks for Your comment!

I figured out what happened. Seems like I was not meticulous enough while reading .qzv visualization. It clearly states below 'Interactive Quality Plot' of (my) `demux summarize` visualization:

> " These plots were generated using a random sampling of 10000 out of 3738297 sequences without replacement. "

Hence, the plot will be different each time the visualization file is generated.

Perhaps someone will take a lesson from me being a dumbo : ]

---

<div class="post-metadata">

### Author: ![ChrisKeefe](https://forum.qiime2.org/user_avatar/forum.qiime2.org/chriskeefe/32/1907_2.png) [@ChrisKeefe](https://forum.qiime2.org/u/ChrisKeefe)
#### Post date: [October 23, 2020, 11:59pm UTC](https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072/4 "2020-10-23T23:59:43Z")

</div>

Thanks for sharing, @AdrianS85! I'm sure plenty of people miss that nuance!  
CK 🐘

---

<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: [November 24, 2020, 5:59am UTC](https://forum.qiime2.org/t/on-two-methods-of-dealing-with-read-through-sequences-in-q2-cutadapt/17072/5 "2020-11-24T05:59:43Z")

</div>

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