Class GBasicRulesCalculator

java.lang.Object
org.gorpipe.gor.haplotype.GBasicRulesCalculator

public class GBasicRulesCalculator
extends java.lang.Object
Checks the correctness of phase of haplotypes/genotypes using basic rules.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static byte INCOMPATIBLE_GENOTYPES
    Indicates that the genotypes of the trio are incompatible in some way.
    protected byte unknown  
  • Constructor Summary

    Constructors 
    Constructor Description
    GBasicRulesCalculator()  
  • Method Summary

    Modifier and Type Method Description
    byte checkBasicRules​(byte[] child, byte[] father, byte[] mother)
    Check basic rules (inhertance error and phase) at an single autosomal locus for a child in a triad.
    void setUnknownAllele​(byte unknown)
    Set the value for an unknown allele (default is Byte.MIN_VALUE) .

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • setUnknownAllele

      public void setUnknownAllele​(byte unknown)
      Set the value for an unknown allele (default is Byte.MIN_VALUE) .
      Parameters:
      unknown - the unknonw value
    • checkBasicRules

      public byte checkBasicRules​(byte[] child, byte[] father, byte[] mother)
      Check basic rules (inhertance error and phase) at an single autosomal locus for a child in a triad.
      Parameters:
      child - the child genotypes
      father - the father genotypes
      mother - the mother genotypes
      Returns:
      A byte value indicating the phase UNDETERMINED_PHASE, CORRECT_PHASE, INCORRECT_PHASE, DOUBLE_CONGRUENCY, TRIPLE_CONGRUENCY, INCOMPATIBLE_GENOTYPES.