# For cutadapt option

**URL:** <https://forum.qiime2.org/t/for-cutadapt-option/17514>\
**Category:** User Support\
**Created:** [November 19, 2020, 9:19am UTC](https://forum.qiime2.org/t/for-cutadapt-option/17514 "2020-11-19T09:19:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogurt](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yogurt/32/9469_2.png) [@yogurt](https://forum.qiime2.org/u/yogurt)\
**Post date:** [November 19, 2020, 9:19am UTC](https://forum.qiime2.org/t/for-cutadapt-option/17514/1 "2020-11-19T09:19:28Z")

</div>

Hi, I am new here.

What I think about qiime2 is that I can do further analysis with asv or otu. So I will do both and choose one that gives best result for my project.

For asv, we do [cutadapt - dada2] and get [FeatureTable], [FeatureData] as an output.

For otu, we do [cutadapt - joinpairs(vsearch) - qualityfilter - dereplicate(vsearch)] and get [FeatureTable], [FeatureData].

_ **So questions I have is** _

1. For the asv, in the dada2, there are options like trim and trunc. So if I do dada2, do I need to run cutadapt? or should I just pass cutadapt?

2. For the otu clustering, I think I should get rid of adaptor sequences(right?). And those are the adaptor seqs I got.  
mlCOIintF: 5’-GGWACWGGWTGAACWGTWTAYCCYCC-3’, jgHCO2198: 5’-TAIACYTCIGGRTGICCRAARAAYCA-3’  
(W: A or T, R: A or G, Y: C or T)

**So I run cutadapt as below**  
$qiime cutadapt trim-paired --i-demultiplexed-sequences demux.qza --p-adapter-f 'GGWACWGGWTGAACWGTWTAYCCYCC' --p-adapter-r 'TAIACYTCIGGRTGICCRAARAAYCA' --p-error-rate 0.1 --o-trimmed-sequences cutadapt-demux.qza --verbose

**and got this error.**  
cutadapt: error: Character 'I' in adapter sequence 'TAIACYTCIGGRTGICCRAARAAYCA^' is not a valid IUPAC code. Use only characters XACGTURYSWKMBDHVN.  
Traceback (most recent call last):  
File "/home/creo9447/miniconda3/envs/qiime/lib/python3.6/site-packages/q2cli/commands.py", line 329, in **call**  
results = action(\*\*arguments)  
File "", line 2, in trim\_paired  
File "/home/creo9447/miniconda3/envs/qiime/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound\_callable  
output\_types, provenance)  
File "/home/creo9447/miniconda3/envs/qiime/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/home/creo9447/miniconda3/envs/qiime/lib/python3.6/site-packages/q2\_cutadapt/\_trim.py", line 189, in trim\_paired  
run\_commands(cmds)  
File "/home/creo9447/miniconda3/envs/qiime/lib/python3.6/site-packages/q2\_cutadapt/\_trim.py", line 30, in run\_commands  
subprocess.run(cmd, check=True)  
File "/home/creo9447/miniconda3/envs/qiime/lib/python3.6/subprocess.py", line 438, in run  
output=stdout, stderr=stderr)

I really need some help.  
Thank you.

---

<div class="post-metadata">

**Author:** ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)\
**Post date:** [November 19, 2020, 2:43pm UTC](https://forum.qiime2.org/t/for-cutadapt-option/17514/2 "2020-11-19T14:43:33Z")

</div>

Hi @yogurt,

1. If your sequencing protocol does not make use of primers with frameshifting nucleotides, e.g. [Lundberg _et al._ 2013](https://doi.org/10.1038/nmeth.2634), then you can simply use the trim and truncation options to remove the primers. I personally, like to use cutadapt (with the `--p-discard-untrimmed` and `--p-match-adapter-wild-cards`) regardless of how the sequencing was performed, as it serves as a form of quality control. That is, if you can not detect the primers in the sequences, chances are that the rest of the read is not very good, or is spurious. So, you discard them.

2. See this:

> [@Handling ambiguous nucleotides in database construction](https://forum.qiime2.org/t/handling-ambiguous-nucleotides-in-database-construction/8537/4):
>
> Hi @devonorourke & @Nicholas_Bokulich, I have had similar issues with I characters when using vsearch and other similar tools. Keep in mind that I stands for the chemical Inosine / deoxyInosine, which you can order as part of your oligos (e.g. from [IDT](https://www.idtdna.com/pages/support/faqs/does-idt-offer-inosine-(i)-how-do-i-order-oligos-containing-inosine-bases-)). That is, it functions literally as an ambiguous N base. So, wherever you find and I replace with N. For example, take a look at the CO1 blocking primer we made in [our swine diet paper](https://doi.org/10.1002/ece3.3638). As for the U --\> T bit... In the past, when I put that set…

-Cheers!  
-Mike

---

<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:** [December 20, 2020, 8:43pm UTC](https://forum.qiime2.org/t/for-cutadapt-option/17514/3 "2020-12-20T20:43:36Z")

</div>

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