-
Notifications
You must be signed in to change notification settings - Fork 597
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
Consolidate code in PedigreeAnnotation #7277
Conversation
@cmnbroad The use case behind this PR is custom PedigreeAnnotations outside GATK. Many of my proposed changes are just fixing typos or code-consolidation. The only other changes are adding protected getters for pedigreeFile, pedigreeValidationType, and sampleDB. I add a setter for pedigreeValidationType. Overall these should be pretty contained changes. |
@cmnbroad Sorry to bug here, but I am wondering if it would be possible for someone to review. This is a limited change that basically consolidates some internal code in PedigreeAnnotation and exposes a couple protected getters. Tests are passing. Thanks in advance. |
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.
@bbimber The existing implementation of the Pedigree annotation hierarchy is pretty cumbersome, and the changes proposed here somewhat exacerbate that. We really want to go in the direction of separating out Founder annotations from base Pedigree annotaionts as started here, but nobody has had the the bandwidth to finish that. I suggested a simpler alternative for the interim that hopefully addresses the issue (assuming the issue is just being able to control the validation param).
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PedigreeAnnotation.java
Outdated
Show resolved
Hide resolved
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PedigreeAnnotation.java
Outdated
Show resolved
Hide resolved
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PedigreeAnnotation.java
Outdated
Show resolved
Hide resolved
OK - PedigreeValidationType is now set in the constructor and is final. This does not separate the two intertwined codepaths around PedigreeFile vs. FounderIds, but that was a pre-existing problem. It doesnt doesnt change the pre-existing weirdness around the timing of setting pedigreeFile and/or founderIds within GATKAnnotationPluginDescriptor, where PedigreeAnnotation gets special treatment. I dont think this makes that situation any worse. if you still have concerns on this proposal, I actually think I could make our code work if you simply exposed a protected getPedigreeFile() method on PedigreeAnnotation. I can make the SampleDB instance in my code without needed to share code here. It seemed useful to expose some of that code to avoid duplication, but if it's going to over-complicate we can remove it. Also: that one test failure seems potentially unrelated (https://travis-ci.com/github/broadinstitute/gatk/jobs/510624560)? A compile issue with javadoc? |
@bbimber I was hoping this could be reduced to a single new |
@cmnbroad OK - what about this proposal? I just added a protected getter and fixed the typo in 'annotation'? We could expose a constructor based way to set PedigreeValidationType, but if you dont really want to expose more of the guts of PedigreeAnnotation to subclasses prior to splitting apart founderIds and pedigree, what about keeping this as simple and minimal as possible? |
If that solves your issue, then thats even better. The one change I'd request then is that you add javadoc saying that the getter can return null, since its possible to construct a PedigreeAnnotation without a File. Then once tests pass it should be good. |
@cmnbroad OK, added. travisci doesnt seem to have been kicked off - is that b/c github thinks there are unresolved change requests? |
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.
LGTM once tests run and pass. @bbimber The issue with CI tests not running is being looked into. It may take a day or two to resolve.
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/PedigreeAnnotation.java
Show resolved
Hide resolved
@cmnbroad OK. so will you be able to squash/merge on github or do you want me to do it and push here? |
I can squash when I merge - thanks. |
@bbimber this should run on travis now, but you probably have to push the branch again to trigger it to start. |
…digreeValidationType to be set Consolidate constructors Add final Revert change to minimal needed getter Revert prior change Revert prior change Add single getter for pedigreeFile Add javadoc
3f41d71
to
2b7f0c9
Compare
@cmnbroad is seems there's a docker rate-limit issue again: https://travis-ci.com/github/broadinstitute/gatk/jobs/512098673 |
Consolidate code in PedigreeAnnotation, provide getters, and allow PedigreeValidationType to be set