-
Notifications
You must be signed in to change notification settings - Fork 244
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
Bugfix for BAM index bins #1024
Conversation
…elNumber is too big. 2. Fixes a bug: the level size for the last level was miscalculated. It should be 32768 (2^15). 3. Removes the unused method regionToBins, whose code was already implemented in the class GenomicIndexUtil.
Codecov Report
@@ Coverage Diff @@
## master #1024 +/- ##
===============================================
+ Coverage 66.072% 66.118% +0.046%
- Complexity 7554 7562 +8
===============================================
Files 532 532
Lines 32227 32241 +14
Branches 5491 5489 -2
===============================================
+ Hits 21293 21317 +24
+ Misses 8778 8768 -10
Partials 2156 2156
|
@droazen Could you take a look at this? |
Hi! Can I get a review on this PR? |
@Test | ||
public static void testGetLevelSizeOK() { | ||
|
||
final AbstractBAMFileIndex afi = new DiskBasedBAMFileIndex(new File(BAM_FILE.getPath() + ".bai"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary getPath()
here and below, you can just write new File(BAM_FILE + ".bai")
. Although BAM_FILE
is otherwise unused here so you could just define BAI_FILE
instead.
ArrayIndexOutOfBoundsException
would be thrown iflevelNumber
is too big.regionToBins
, whose code was already implemented in the classGenomicIndexUtil
.Description
Please explain the changes you made here.
Explain the motivation for making this change. What existing problem does the pull request solve?
Checklist