From 72684d0fae3326398c80e2f47d78eeff1fcc14fe Mon Sep 17 00:00:00 2001 From: ldgauthier Date: Wed, 11 May 2022 09:05:56 -0400 Subject: [PATCH] Docs clarification for some reblocking-related funkiness (#7846) --- .../hellbender/tools/walkers/GenotypeGVCFsEngine.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/GenotypeGVCFsEngine.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/GenotypeGVCFsEngine.java index fe599aa7da1..ad280bce6f3 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/GenotypeGVCFsEngine.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/GenotypeGVCFsEngine.java @@ -484,12 +484,18 @@ static List cleanupGenotypeAnnotations(final VariantContext vc, final return recoveredGs; } + /** + * Does this genotype look like it has no reads and should be excluded from annotations? + */ static boolean excludeFromAnnotations(Genotype oldGT) { return oldGT.isHomRef() && !oldGT.hasPL() && ((oldGT.hasDP() && oldGT.getDP() == 0) || !oldGT.hasDP()) && oldGT.hasGQ() && oldGT.getGQ() == 0; } + /** + * for GQ0 hom-refs that have no data, turn them back into no-calls so they don't affect the INFO annotations + */ private List assignNoCallsAnnotationExcludedGenotypes(final GenotypesContext genotypes) { final List returnList = new ArrayList<>(); for (final Genotype oldGT : genotypes) { @@ -516,4 +522,4 @@ private static int parseInt(Object attribute){ throw new IllegalArgumentException("Expected a Number or a String but found something else."); } } -} \ No newline at end of file +}