Skip to content

Commit

Permalink
Docs clarification for some reblocking-related funkiness (#7846)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldgauthier authored May 11, 2022
1 parent 4271eb3 commit 72684d0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,18 @@ static List<Genotype> 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<Genotype> assignNoCallsAnnotationExcludedGenotypes(final GenotypesContext genotypes) {
final List<Genotype> returnList = new ArrayList<>();
for (final Genotype oldGT : genotypes) {
Expand All @@ -516,4 +522,4 @@ private static int parseInt(Object attribute){
throw new IllegalArgumentException("Expected a Number or a String but found something else.");
}
}
}
}

0 comments on commit 72684d0

Please sign in to comment.