Package main

Class CompHapSegment

  • All Implemented Interfaces:
    java.lang.Comparable<CompHapSegment>

    public class CompHapSegment
    extends java.lang.Object
    implements java.lang.Comparable<CompHapSegment>

    Class CompHapSegment represents a copied haplotype segment in a composite reference haplotype.

    Instances of class CompHapSegment are not thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      CompHapSegment​(int hap, int step, int compHapIndex)
      Constructs a new CompHapSegment from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(CompHapSegment seg)
      Compares the specified segment to this for order.
      int compHapIndex()
      Returns the composite haplotype index.
      int hap()
      Returns the copied haplotype.
      int step()
      Returns the last recorded step for this.hap().
      void updateHap​(int hap)
      Update the copied haplotype to the specified haplotype
      void updateStep​(int step)
      Updates the step to the specified value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CompHapSegment

        public CompHapSegment​(int hap,
                              int step,
                              int compHapIndex)
        Constructs a new CompHapSegment from the specified data.
        Parameters:
        hap - the haplotype
        step - the step
        compHapIndex - the composite haplotype index
    • Method Detail

      • updateHap

        public void updateHap​(int hap)
        Update the copied haplotype to the specified haplotype
        Parameters:
        hap - the new haplotype
      • updateStep

        public void updateStep​(int step)
        Updates the step to the specified value
        Parameters:
        step - the new step value
      • hap

        public int hap()
        Returns the copied haplotype.
        Returns:
        the copied haplotype
      • step

        public int step()
        Returns the last recorded step for this.hap().
        Returns:
        the last recorded step for this.hap()
      • compHapIndex

        public int compHapIndex()
        Returns the composite haplotype index.
        Returns:
        the composite haplotype index
      • compareTo

        public int compareTo​(CompHapSegment seg)
        Compares the specified segment to this for order. Returns -1, 0, or 1 according to whether this.end() is less than, equal, or greater than seg.end().
        Specified by:
        compareTo in interface java.lang.Comparable<CompHapSegment>
        Parameters:
        seg - the object to be compared
        Returns:
        -1, 0, or 1 according to whether this.end() is less than, equal, or greater than seg.end()