-
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
Makes IntervalKeepPairFilter filter out single ended reads #1252
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1252 +/- ##
===============================================
+ Coverage 69.366% 69.384% +0.018%
- Complexity 8155 8158 +3
===============================================
Files 548 548
Lines 32702 32702
Branches 5522 5522
===============================================
+ Hits 22684 22690 +6
+ Misses 7798 7794 -4
+ Partials 2220 2218 -2
|
@lbergelson could you please take a look at this? |
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.
@meganshand One comment about the test. Looks good otherwise. If you can address that then 👍
|
||
final IntervalKeepPairFilter filter = new IntervalKeepPairFilter(intervalList); | ||
|
||
boolean singleEnded = StreamSupport.stream(builder.spliterator(), false) |
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.
It looks like this might be cleaner if you use builder.getRecords().stream()
instead of this spliterator path.
Also, instead of assertingFalse it might be cleaner to use noneMatch
and have one less inversion.
On further inspection you're just copying the pattern around it... maybe we can fix them all in a separate PR. |
@meganshand Thank you for this! |
Description
When a BAM contains both single ended and paired ended reads this filter throws an exception (
java.lang.IllegalStateException: Inappropriate call if not paired read
). Since the filter is only meant to keep paired reads it now also filters out single ended reads and doesn't throw an exception.Checklist