From 835f1067d874d1d282f98d537268f16dbddca0bb Mon Sep 17 00:00:00 2001 From: asivache Date: Thu, 16 Apr 2009 18:41:39 +0000 Subject: [PATCH] added isHom() and isHet() queries to the Genotype interface (with the obvious meaning) git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@452 348d0f76-0448-11de-a6fe-93d51630548a --- .../broadinstitute/sting/gatk/refdata/Genotype.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/Genotype.java b/java/src/org/broadinstitute/sting/gatk/refdata/Genotype.java index aa4f30798..43780a1b2 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/Genotype.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/Genotype.java @@ -106,6 +106,18 @@ public interface Genotype extends Comparable { * @return */ boolean isBiallelic() ; + + /** Returns true if both observed alleles are the same (regardless of whether they are ref or alt) + * + * @return + */ + boolean isHom() ; + + /** Returns true if observed alleles differ (regardless of whether they are ref or alt) + * + * @return + */ + boolean isHet() ; /** Returns reference (major) allele base for a SNP variant as a character; should throw IllegalStateException * if variant is not a SNP.