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

Change to overlap-based method of amplicon resolution #73

Open
wants to merge 2 commits into
base: 1.3.0-dev
Choose a base branch
from

Conversation

cjw85
Copy link

@cjw85 cjw85 commented Feb 22, 2021

This PR changes how the amplicon (/primer pair) assigned to a read is determined in order to be:
a) a little more transparent
b) work more sensibly for fragmented amplicons
It also separates out the writing of the bam from the read selection to allow more sophisticated read selection post filtering.

Things proceed as follows,

First pass:

  1. Determine amplicon by maximal overlap: assign this as the amplicon
    1b) Allow some filtering options based on nature of overlap
  2. Determine if read overlaps primer sites for selected amplicon (and store a boolean for each)
  3. Store information required for filtering

The reads are the downsampled per (amplicon, orientation), selecting reads preferentially on their span of the amplicon.

Second pass:

  1. Trim reads according to primers
  2. Write out reads and summary

@cjw85 cjw85 changed the title WIP: Change to overlap-based method of amplicon resolution Change to overlap-based method of amplicon resolution Feb 23, 2021
trim(segment, trim_end, True, args.verbose)
if args.verbose:
print("ref end %s > primer_position %s" %
(segment.reference_start, p2_position), file=sys.stderr)
Copy link
Collaborator

@BioWilko BioWilko Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2_position is undefined, shouldn't this be:

print("ref end %s > primer_position %s" %(segment.reference_end, trim_end), file=sys.stderr)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, probably.

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