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

SamReader.query() should handle when coordinates are given < 1 or > end of contig #943

Open
tfenne opened this issue Oct 18, 2023 · 0 comments

Comments

@tfenne
Copy link
Member

tfenne commented Oct 18, 2023

The underlying SAMFileReader throws exceptions back if you ask to query off the ends of contigs, rather than just gracefully capping the query at the ends of the contig. I think it would be nice to have SamReader min/max the query coordinates with 1/contig_length on the way through to prevent these kinds of exceptions.

This often comes up when running queries with position - flank to position + flank and forgetting to limit the positions.

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

No branches or pull requests

1 participant