-
Notifications
You must be signed in to change notification settings - Fork 594
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
Fix ReblockGVCF NPE on no-calls #5863
Conversation
54f4aa5
to
3988246
Compare
Codecov Report
@@ Coverage Diff @@
## master #5863 +/- ##
================================================
- Coverage 86.841% 13.378% -73.464%
+ Complexity 32327 6386 -25941
================================================
Files 1991 2011 +20
Lines 149347 151036 +1689
Branches 16482 16151 -331
================================================
- Hits 129695 20205 -109490
- Misses 13646 128567 +114921
+ Partials 6006 2264 -3742
|
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.
Back to @ldgauthier with some comments
return Collections.emptyMap(); | ||
} | ||
final Pair<Integer, Double> sampleCountCoeff = calculateIC(vc, genotypes); | ||
final int sampleCount = sampleCountCoeff.getLeft(); | ||
final double F = sampleCountCoeff.getRight(); | ||
if (sampleCount < MIN_SAMPLES) { | ||
logger.warn("Annotation will not be calculated, must provide at least " + MIN_SAMPLES + " samples"); | ||
logger.warn("InbreedingCoeff will not be calculated for at least one position; at least " + MIN_SAMPLES + " samples must have called genotypes"); |
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.
Did you want separate "one shot" loggers for these 2 warnings? (ie., would you ever want both warnings to be emitted?)
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.
The first one is like "hey, you don't have enough samples in your cohort" and the second one is like "oops, there are a lot of no-calls at this site, so I'm not going to output a value here", so they should be mutually exclusive.
final Genotype g2 = makeG("sample1", Allele.NO_CALL,Allele.NO_CALL); | ||
final VariantContext noData = makeDeletionVC("noData", Arrays.asList(LONG_REF, DELETION, Allele.NON_REF_ALLELE), LONG_REF.length(), g2); | ||
final VariantContext notCrashing = reblocker.lowQualVariantToGQ0HomRef(noData, noData); | ||
Assert.assertTrue(notCrashing.getGenotype(0).isNoCall()); |
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.
Add a comment explaining this test case (ie., explain what the "crash" being tested for was)
final Genotype g2 = makeG("sample1", Allele.NO_CALL,Allele.NO_CALL); | ||
final VariantContext noData = makeDeletionVC("noData", Arrays.asList(LONG_REF, DELETION, Allele.NON_REF_ALLELE), LONG_REF.length(), g2); | ||
final VariantContext notCrashing = reblocker.lowQualVariantToGQ0HomRef(noData, noData); | ||
Assert.assertTrue(notCrashing.getGenotype(0).isNoCall()); | ||
} | ||
|
||
@Test |
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.
Can you add a test case covering the change to shouldBeReblocked()
as well (and make that method @VisibleForTesting
?)
Copy AS annotations too Put RAW_MQandDP back to int tuple so GDB doesn't duck it up Fix MQ bug, upgrade from experimental to beta
651015c
to
e3dadcd
Compare
@droazen I addressed your comments, but I also added some more fixes (and tests!) |
MIN_DP, floor GQs for each block
Closing this one -- these changes to |
No description provided.