Package phase

Class Ibs2Markers


  • public final class Ibs2Markers
    extends java.lang.Object

    Class Ibs2Markers stores the markers and intervals that are used to detect IBS2 segments.

    Instances of Ibs2Markers are immutable.

    • Constructor Summary

      Constructors 
      Constructor Description
      Ibs2Markers​(GT targGT, MarkerMap map, FloatArray maf)
      Constructs a new Ibs2Markers instance from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[] markers​(int start, int end)
      Returns an increasing list of marker indices that are used to detect IBS2 segments in the specified interval
      int nMarkers()
      Returns the number of markers.
      IntArray stepStarts()
      Returns the first marker index in each step in increasing order.
      • Methods inherited from class java.lang.Object

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

      • Ibs2Markers

        public Ibs2Markers​(GT targGT,
                           MarkerMap map,
                           FloatArray maf)
        Constructs a new Ibs2Markers instance from the specified data.
        Parameters:
        targGT - target genotype data
        map - a list whose j-th element is the genetic map position of the j-th the marker
        maf - a list whose j-th element is the estimated minor allele frequency of the j-th the marker
        Throws:
        java.lang.IllegalArgumentException - if targGT.nMarkers() != map.genPos().size()
        java.lang.IllegalArgumentException - if targGT.nMarkers() != maf.size()
        java.lang.NullPointerException - if (targGT == null || map == null || maf == null)
    • Method Detail

      • nMarkers

        public int nMarkers()
        Returns the number of markers.
        Returns:
        the number of markers
      • markers

        public int[] markers​(int start,
                             int end)
        Returns an increasing list of marker indices that are used to detect IBS2 segments in the specified interval
        Parameters:
        start - the first marker in the interval (inclusive)
        end - the last marker in the interval (exclusive)
        Returns:
        an increasing list of marker indices that are used to detect IBS2 segments in the specified interval
        Throws:
        java.lang.IllegalArgumentException - if start < 0 || end < start || end > this.nMarkers
      • stepStarts

        public IntArray stepStarts()
        Returns the first marker index in each step in increasing order.
        Returns:
        the first marker index in each step