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

Fix align_trim:find_primer #118

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boospooky
Copy link

This PR fixes find_primers to search in the appropriate direction for left or right primers. In particular, this fix helps when using the Rapid Barcoding Kit. More reads are assigned the correct primer pair and group number, leading to more reads being used in consensus sequence generation.

The function find_primer searches, in both 5' and 3' directions, for the nearest primer to a position on a given strand. This causes issues with using the Nanopore Rapid Barcoding Kit, which makes reads that begin in the middle of amplicons. These reads are assigned the wrong primer pairs and are filtered out.

The correction is to add a condition to the list comprehension and (p['start'] - pos <= 0).

@boospooky boospooky marked this pull request as draft September 3, 2022 20:56
hkunerth added a commit to hkunerth/fieldbioinformatics that referenced this pull request Aug 8, 2023
Modified align_trim:find_primer following u/boospooky but with updated 1.2.3 artic branch

artic-network#118
@BioWilko
Copy link
Collaborator

We currently expressly don't support rapid barcoding, this fix would indeed force align_trim to assign fragmented reads to the correct amplicons. What it would also do is break normalisation in the case of fragmented data meaning that it is an incomplete fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants