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

feat: Add to_vcf_string method for bcf::Record #443

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

ctsa
Copy link
Contributor

@ctsa ctsa commented Oct 19, 2024

We have a use case (PacificBiosciences/HiFiCNV#31) where some element of an input vcf/bcf record is surprising, and the program needs to error out. To make the error message as informative as possible for this case we'd like to print the problematic vcf record in the error message.

I'm proposing to add a new to_vcf_string method to bcf::Record as a solution to this issue.

@ctsa ctsa changed the title Add Display trait for bcf::record feat: Add Display trait for bcf::record Oct 19, 2024
@ctsa ctsa changed the title feat: Add Display trait for bcf::record feat: Add Display trait for bcf::Record Oct 20, 2024
Added return value checking on vcf_format, which also suggests that the
methods should return a Result and shound't be implemented directly as
a Display trait.
@ctsa ctsa changed the title feat: Add Display trait for bcf::Record feat: Add to_vcf_string method for bcf::Record Oct 21, 2024
@johanneskoester johanneskoester self-assigned this Nov 12, 2024
@johanneskoester johanneskoester merged commit 489c0d7 into rust-bio:master Nov 12, 2024
9 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11799729563

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 10 of 11 (90.91%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 79.757%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/bcf/record.rs 10 11 90.91%
Totals Coverage Status
Change from base Build 11799687230: 0.04%
Covered Lines: 2498
Relevant Lines: 3132

💛 - Coveralls

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.

3 participants