Primer not being removed with cutadapt

I have demultiplexed data that I imported into Qiime with "qiime tools import" for single end reads that were prepared with Illumina Miseq. I need to cut the 3' primer of the forward read as well as the 5' adapter of the forward read. I am able to successfully remove the adapter sequence but not the 3' primer. In one data set the primer has a wild card ("R") but I have another dataset with no wildcards and am having the same problem with both data sets. Here is the code I am using. Thanks for any help!

!qiime cutadapt trim-single
--i-demultiplexed-sequences demux.qza
--p-adapter SEQEUNCE-OF-5'-ADAPTER
--p-front SEQUENCE-OF-3'-PRIMER
--o-trimmed-sequences cutadapt-trim

Bill

@wlandesman,

Cutadapt can be a bit picky when it comes to how you specify various adapters/primers.

I think the first step here is to switch where you are telling it to look for each of your adapter sequences. Since sequences are read from 5' -> 3', it is making the assumption that the sequence given to --p-front is attached to the beginning(5' end) of your sequences and --p-adapter is attached to the 3' end.

If you know your 5' adapter should be at the very beginning of the sequence with nothing coming before it, it is often helpful to anchor it with the use of a carat: --p-front ^SEQUENCE-OF-5'-ADAPTER. This seems to help Cutadapt remove both the this sequence and adapter sequences on the tail of the read sequence.

q2-cutadapt is just a wrapper for Cutadapt and so the QIIME2 devs are somewhat limited in being able to deal with some of Cutadapts eccentricities :woozy_face:. That being said, it is probably helpful to look at both our docs and the Cutadapt docs.

You also have the option of running q2-cutadapt twice, once to remove the 5' adapter, then feed the output of this step into another run that removes the 3' adapter!

3 Likes

Breaking them up into two separate commands worked. Why didn't I think of that?! It also occurred to me that I probably could have simply proceeded to denoise and use the "trim left" command. Thank you very much for the reply!

2 Likes

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