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

Refactor GVCFWriter to allow push/pull iteration. #5311

Merged
merged 3 commits into from
Dec 3, 2018

Conversation

tomwhite
Copy link
Contributor

import static htsjdk.variant.vcf.VCFConstants.MAX_GENOTYPE_QUAL;
import static org.broadinstitute.hellbender.utils.variant.writers.GVCFWriter.GVCF_BLOCK;

public final class GVCFBlockCombiner implements PushPullTransformer<VariantContext> {
Copy link
Member

Choose a reason for hiding this comment

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

Laura made changes to the gvcf writer which I think we'll have to update here.. since I wrote this way before then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rebased to take care of these changes (from #4940) - there were quite a few manual changes needed.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, that makes sense since otherwise the tests should be exploding. I just wanted to be sure about it...

@codecov-io
Copy link

codecov-io commented Oct 16, 2018

Codecov Report

Merging #5311 into master will increase coverage by 0.004%.
The diff coverage is 92.486%.

@@               Coverage Diff               @@
##              master     #5311       +/-   ##
===============================================
+ Coverage     86.984%   86.988%   +0.004%     
- Complexity     31208     31224       +16     
===============================================
  Files           1909      1914        +5     
  Lines         144202    144264       +62     
  Branches       15954     15956        +2     
===============================================
+ Hits          125433    125492       +59     
- Misses         12999     13003        +4     
+ Partials        5770      5769        -1
Impacted Files Coverage Δ Complexity Δ
...ellbender/utils/iterators/PushPullTransformer.java 0% <0%> (ø) 0 <0> (?)
...ls/variant/writers/GVCFBlockCombiningIterator.java 0% <0%> (ø) 0 <0> (?)
...ute/hellbender/utils/downsampling/Downsampler.java 100% <100%> (ø) 6 <1> (ø) ⬇️
...hellbender/utils/iterators/PushToPullIterator.java 100% <100%> (ø) 17 <17> (?)
.../utils/downsampling/ReadsDownsamplingIterator.java 100% <100%> (ø) 1 <1> (-16) ⬇️
...e/hellbender/utils/variant/writers/GVCFWriter.java 100% <100%> (+6.667%) 8 <6> (-26) ⬇️
...nder/utils/variant/writers/GVCFWriterUnitTest.java 96.796% <80%> (+0.007%) 48 <1> (ø) ⬇️
...ender/utils/variant/writers/GVCFBlockCombiner.java 93.182% <93.182%> (ø) 35 <35> (?)
...er/utils/iterators/PushToPullIteratorUnitTest.java 97.059% <97.059%> (ø) 6 <6> (?)
... and 5 more

@tomwhite tomwhite force-pushed the tw_push_pull_gvcf_writer branch from c17ea51 to 3b40d8e Compare October 17, 2018 09:40
@droazen droazen self-assigned this Oct 17, 2018
@tomwhite tomwhite force-pushed the tw_push_pull_gvcf_writer branch from 3b40d8e to 1489950 Compare November 2, 2018 12:42
@droazen
Copy link
Contributor

droazen commented Nov 16, 2018

@tomwhite Apologies for not getting around to this one before leaving, but rather than keep it blocked while I'm away I'm re-assigning to @cmnbroad, who I'm sure can give you a speedy review.
My main comment from glancing at the code is that the new PushPullTransformer and PushToPullIterator classes lack direct unit tests.

@droazen droazen assigned cmnbroad and unassigned droazen Nov 16, 2018
@droazen droazen requested review from cmnbroad and removed request for droazen November 16, 2018 02:26
@tomwhite tomwhite force-pushed the tw_push_pull_gvcf_writer branch from 1489950 to 9ba41d9 Compare November 20, 2018 15:13
@tomwhite
Copy link
Contributor Author

@droazen @cmnbroad thanks for taking a look. I've added some direct unit tests for PushPullTransformer and PushToPullIterator.

Copy link
Collaborator

@cmnbroad cmnbroad left a comment

Choose a reason for hiding this comment

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

A few comments and questions. Also, although ideally GVCFBlockCombiner would have separate unit tests, it appears to have 100% coverage through GVCFWriterUnitTest. Finally, @ldgauthier FWIW note this is going to create conflicts with your changes in #5312.

@tomwhite tomwhite force-pushed the tw_push_pull_gvcf_writer branch from 9ba41d9 to 49fcc40 Compare December 3, 2018 10:34
@tomwhite
Copy link
Contributor Author

tomwhite commented Dec 3, 2018

Thanks for your review @cmnbroad. I've addressed all your points. Please approve so this can be merged.

Copy link
Collaborator

@cmnbroad cmnbroad left a comment

Choose a reason for hiding this comment

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

Looks good now thx @tomwhite.

@cmnbroad cmnbroad merged commit 7654c0b into master Dec 3, 2018
@cmnbroad cmnbroad deleted the tw_push_pull_gvcf_writer branch December 3, 2018 14:12
@tomwhite
Copy link
Contributor Author

tomwhite commented Dec 3, 2018

Thank you @cmnbroad!

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.

5 participants