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

Fix for PossibleDeNovo annotation to work without Genotype Likelihoods #7662

Merged
merged 3 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public Map<String, Object> annotate(final ReferenceContext ref,
final List<String> lowConfDeNovoChildren = new ArrayList<>();
for (final Trio trio : trioSet) {
if (vc.isBiallelic() &&
PossibleDeNovo.contextHasTrioLikelihoods(vc, trio) &&
PossibleDeNovo.contextHasTrioGQs(vc, trio) &&
mendelianViolation.isViolation(trio.getMother(), trio.getFather(), trio.getChild(), vc) &&
mendelianViolation.getParentsRefRefChildHet() > 0) {

Expand Down Expand Up @@ -135,14 +135,14 @@ public Map<String, Object> annotate(final ReferenceContext ref,
return attributeMap;
}

private static boolean contextHasTrioLikelihoods(final VariantContext vc, final Trio trio) {
private static boolean contextHasTrioGQs(final VariantContext vc, final Trio trio) {
final String mom = trio.getMaternalID();
final String dad = trio.getPaternalID();
final String kid = trio.getChildID();

return (!mom.isEmpty() && vc.hasGenotype(mom) && vc.getGenotype(mom).hasLikelihoods())
&& (!dad.isEmpty() && vc.hasGenotype(dad) && vc.getGenotype(dad).hasLikelihoods())
&& (!kid.isEmpty() && vc.hasGenotype(kid) && vc.getGenotype(kid).hasLikelihoods());
return (!mom.isEmpty() && vc.hasGenotype(mom) && vc.getGenotype(mom).hasGQ())
&& (!dad.isEmpty() && vc.hasGenotype(dad) && vc.getGenotype(dad).hasGQ())
&& (!kid.isEmpty() && vc.hasGenotype(kid) && vc.getGenotype(kid).hasGQ());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ public Object[][] deNovo() {
tests.add(new Object[]{gNo, gNo, g11, false});
tests.add(new Object[]{gNo, gNo, gNo, false});

final Genotype g00NoPl = new GenotypeBuilder("2", homRef).DP(10).GQ(GQ30).make();
final Genotype g01NoPl = new GenotypeBuilder("1", het).DP(10).GQ(GQ30).make();
final Genotype g11NoPl = new GenotypeBuilder("3", homVar).DP(10).GQ(GQ30).make();

tests.add(new Object[]{g00NoPl, g01NoPl, g11NoPl, false});
tests.add(new Object[]{g00NoPl, g00NoPl, g01NoPl, true});

return tests.toArray(new Object[][]{});
}

Expand Down