Package haplotype

Class WrappedHapPair

  • All Implemented Interfaces:
    HapPair

    public final class WrappedHapPair
    extends java.lang.Object
    implements HapPair
    Class WrappedHapPair is a HapPair instance that wraps a RefGTWindow object.
    • Constructor Summary

      Constructors 
      Constructor Description
      WrappedHapPair​(GT phasedGT, int hapPair)
      Creates a WrappedHapPair instance representing the specified haplotype pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int allele1​(int marker)
      Returns the first allele for the specified marker.
      int allele2​(int marker)
      Returns the second allele for the specified marker.
      int idIndex()
      Returns the sample identifier index.
      Marker marker​(int marker)
      Returns the specified marker.
      Markers markers()
      Returns the markers.
      int nMarkers()
      Returns the number of markers.
      • Methods inherited from class java.lang.Object

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

      • WrappedHapPair

        public WrappedHapPair​(GT phasedGT,
                              int hapPair)
        Creates a WrappedHapPair instance representing the specified haplotype pair.
        Parameters:
        phasedGT - the RefGTWindow object that will be "wrapped" by this
        hapPair - a haplotype pair index
        Throws:
        java.lang.IllegalArgumentException - if phasedGT.isPhased() == false
        java.lang.IllegalArgumentException - if hapPair < 0 || hapPair >= sampleHapPairs.nHapPairs()
        java.lang.NullPointerException - if sampleHapPairs == null
    • Method Detail

      • allele1

        public int allele1​(int marker)
        Description copied from interface: HapPair
        Returns the first allele for the specified marker.
        Specified by:
        allele1 in interface HapPair
        Parameters:
        marker - a marker index
        Returns:
        the first allele for the specified marker
      • allele2

        public int allele2​(int marker)
        Description copied from interface: HapPair
        Returns the second allele for the specified marker.
        Specified by:
        allele2 in interface HapPair
        Parameters:
        marker - a marker index
        Returns:
        the second allele for the specified marker
      • markers

        public Markers markers()
        Description copied from interface: HapPair
        Returns the markers.
        Specified by:
        markers in interface HapPair
        Returns:
        the markers
      • marker

        public Marker marker​(int marker)
        Description copied from interface: HapPair
        Returns the specified marker.
        Specified by:
        marker in interface HapPair
        Parameters:
        marker - a marker index
        Returns:
        the specified marker
      • nMarkers

        public int nMarkers()
        Description copied from interface: HapPair
        Returns the number of markers.
        Specified by:
        nMarkers in interface HapPair
        Returns:
        the number of markers
      • idIndex

        public int idIndex()
        Description copied from interface: HapPair
        Returns the sample identifier index.
        Specified by:
        idIndex in interface HapPair
        Returns:
        the sample identifier index