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

Relax Beta Encoding requirement to allow 0 bits #1233

Merged
merged 1 commit into from
Dec 3, 2018
Merged

Conversation

jmthibault79
Copy link
Contributor

@jmthibault79 jmthibault79 commented Nov 30, 2018

Description

I recently added a check to protect against creating Beta Encodings with bitLength 0. This was mistaken, and causes problems reading CRAMs with this parameter - such as those created by htslib for zero-length or constant data series.

This PR reverts that check.

Checklist

  • Code compiles correctly
  • New tests covering changes and new functionality
  • All tests passing
  • Extended the README / documentation, if necessary
  • Is not backward compatible (breaks binary or source compatibility)

@codecov-io
Copy link

codecov-io commented Nov 30, 2018

Codecov Report

Merging #1233 into master will increase coverage by 0.006%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##              master     #1233       +/-   ##
===============================================
+ Coverage     69.331%   69.337%   +0.006%     
- Complexity      8097      8099        +2     
===============================================
  Files            543       543               
  Lines          32472     32472               
  Branches        5498      5498               
===============================================
+ Hits           22513     22515        +2     
  Misses          7751      7751               
+ Partials        2208      2206        -2
Impacted Files Coverage Δ Complexity Δ
...mtools/cram/encoding/core/BetaIntegerEncoding.java 100% <100%> (ø) 6 <0> (ø) ⬇️
...dk/samtools/seekablestream/SeekableHTTPStream.java 58.824% <0%> (+1.471%) 14% <0%> (+1%) ⬆️
...va/htsjdk/samtools/sra/SRAIndexedSequenceFile.java 64.865% <0%> (+2.703%) 7% <0%> (+1%) ⬆️

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

This change looks good to me although I don't actually understand why we have files that produce encoders like this.

@lbergelson lbergelson merged commit 4ff5190 into master Dec 3, 2018
@lbergelson lbergelson deleted the jt_beta_zero branch December 3, 2018 17:48
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