Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discarding reads based on primer mismatch on just one read #242

Closed
Mariaroviscomonteiro opened this issue May 3, 2017 · 4 comments

Comments

@Mariaroviscomonteiro
Copy link

commented May 3, 2017

Hello!

I am using cutadapt to trim the primers from my sequences from Illumina (very handy thank you for developing it!). The data was given to me in a way that reads 1 and 2 are interleaved. I was looking for the presence of primers and I found that the reverse primer is not present in read one, but the forward primer is present at the beginning of read two. So what I want to do now is to trim the forward primer from read 2 and discard both reads if it's not present in the read. What is happening is that everything is discarded because nothing is found in read 1 (I think that is what is happening). Is there any way to eliminate the reads just based on the presence/absence of the forward primer in read 2 ?

Thank you !

Maria

@marcelm

This comment has been minimized.

Copy link
Owner

commented May 3, 2017

Can you please let me know which command you are currently using?

@Mariaroviscomonteiro

This comment has been minimized.

Copy link
Author

commented May 3, 2017

@marcelm

This comment has been minimized.

Copy link
Owner

commented May 5, 2017

Thanks, this is possibly a bug. See also the discussion at issue #243. Unfortunately, the workaround I suggest there, which is to swap the R1 and R2 input and output files, does not apply in your case since you have interleaved data. However, you can instead add the option --pair-filter=both to the commandline until this is fixed in a future version.

As an explanation: The bug is that R1 reads are counted as "untrimmed" since no adapter was removed from them - even though no adapters to be removed were provided. By default, each read pair is considered to be "untrimmed" if any of the two reads are untrimmed. Here, this will always be the case and all reads are discarded.

Please do not close this issue even if the workaround helps.

@marcelm

This comment has been minimized.

Copy link
Owner

commented Feb 26, 2019

This has been fixed recently, see my explanation in issue #257.

@marcelm marcelm closed this Feb 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.