Closed yfarjoun closed 5 years ago
Several of these use-patterns fail (as you can see in the test results...) my question is..are they reasonable use-patterns and should we fix them?
Merging #1344 into master will increase coverage by
1.872%
. The diff coverage is83.74%
.
@@ Coverage Diff @@
## master #1344 +/- ##
==============================================
+ Coverage 67.86% 69.732% +1.872%
- Complexity 8284 9733 +1449
==============================================
Files 563 573 +10
Lines 33709 38324 +4615
Branches 5657 6997 +1340
==============================================
+ Hits 22875 26724 +3849
- Misses 8657 9212 +555
- Partials 2177 2388 +211
@d-cameron this fixes the issue you reported 4 years ago: #255
Care to take a look?
back to you @pshapiro4broad
@pshapiro4broad are you OK with this PR?
@pshapiro4broad 👀 please?
Thanks again @pshapiro4broad back to you.
Adds tests and fixes unsafe building patterns that were enabled by VariantContextBuilder.
This required a small change in the API around adding a genotype context. Now when .genotypes() is called with a GenotypeContext object the builder will call immutable() on that object, to make sure that the user doesn't change the GC prior to the creation of the VariantContext...If folks really need to reuse the GenotypeContext objects across multiple build calls, we could add a .genotypesKeepMutable() method with a scary javaDoc note.....
Another change in the API (somewhat) is that validation was added for the filters as per the hts-spec.
fixes #1365