cutadapt doesnt trim all the primers from my sequences, because YDN letters in my primers

Hello everybody, this is my first post, but i have been following the forum for a couple of months.

When i use cutadapt to trim my primers, some of the sequences do not get the primer trimmed, because my primer in my metadata file is GATAYTGGGYDTAAAGNG and some of the sequences instead of having an Y that should mean a G or C, they have an A or T, so the plugin doesnt recognice it.
Does this means that the sequence is bad quality?
My question is about understanding what to do, is it ok if instead of using cutadapt I use dada2 trim-left and just cut the primer length from all my sequences?
Or should I think that those sequences are bad quality and I need to take them out from the analysis? (in that case, how can i do that).

The same happens with my reverse primer.

Thank you in advance.

I think Y actually means C or T (source)

You could try to increase error rate, to allow for 1 nt mismatch.

Not necessarily.

As long as the primer is the same length in all reads, this should work well.

Thanks for your time to help the newcommers!
I would like to ask another question.
If i want to trim the reverse primers, is there any program (i did not see in cutadapt, trimmomatic or dada2) that you can tell to cut for example 18 bases from the end of the reads so you can trim the reverse primers just with the length and not to add the specific bases?

The thing is that i have different length reads, and in cutadapt, trimmomatic, and dada2 I saw there are options that you can say at what length of the sequence you want to trim (eg.CROP in trimmomatic or --p-trunc-len in dada2), but to trim all my reverse primers i would need to trim more than needed in the case of the longer ones, so I dont miss the primers of the shorter ones…

For the moment what i did is to see the intercative graphic of demux sumary and use dada2 to trim the first 18 bases and the sequence length at 220 so I get all my forward and reverse primers trimmed, although I am trimming more than needed in half of the sequences… i dont know if it would change the results…

thank you again!

in q2-dada2 you can use the --p-trim-left-r parameter to trim a specified number of bases off the 5’ end of the reverse reads. Is that what you are after?

This will require that reads are paired-end and not yet joined (since dada2 does the joining for you)

using the trunc-len parameters would not be appropriate, since as you say the reads are different lengths. trim-left-r will trim the specified number of bases off the reverse read, and presumably your reverse primer is precisely at that site.

Thank you! Now i could do it!

1 Like

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