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

Make bcf::IndexedReader::fetch functionality inline with htslib regions #309

Merged
merged 3 commits into from
Jul 5, 2021
Merged

Conversation

mbhall88
Copy link
Member

@mbhall88 mbhall88 commented Jul 5, 2021

Currently, an end position is required when fetching. This PR changes the fetch method so that end is now an Option<u64> and setting it to None will fetch from start until the last record of the contig.

I've also added

  • Some clarifying docs about the fact that the start and end positions are both 0-based inclusive
  • More test cases for fetch (including to test the changes)
  • Doc example of how to use bcf::Record::format

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1000005002

  • 25 of 25 (100.0%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 93.314%

Files with Coverage Reduction New Missed Lines %
src/bam/record.rs 7 74.3%
Totals Coverage Status
Change from base Build 837160575: -0.02%
Covered Lines: 11375
Relevant Lines: 12190

💛 - Coveralls

@brainstorm brainstorm self-requested a review July 5, 2021 05:42
Copy link
Member

@brainstorm brainstorm left a comment

Choose a reason for hiding this comment

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

Makes sense and good accompanying docs and test, thanks for this!

Copy link
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

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.

4 participants