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: Ignore bases outside the reference #113

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

Conversation

RenanWA
Copy link

@RenanWA RenanWA commented Jul 1, 2022

This PR fixes a bug we bumped into, where reads that map partially beyond the end of the reference cause artic minion to crash.

The problem arises because the size of the vector depths in make_depth_mask.py is equal to the length of the reference. When calling bamFile.pileup(...), however, pileupcolumn.pos might cause an Index out of range error if there is a read that goes beyond the end of the reference or before its start position.

Since these sections of the reads are irrelevant to calculate coverage, the solution implemented here is to set boundaries for the bamFile.pileup(...) function, so that it only considers bases within the reference.

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.

1 participant