Package phase

Class Ibs2Markers

java.lang.Object
phase.Ibs2Markers

public final class Ibs2Markers extends Object

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

Instances of Ibs2Markers are immutable.

  • Constructor Details

    • 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:
      IllegalArgumentException - if targGT.nMarkers() != map.genPos().size()
      IllegalArgumentException - if targGT.nMarkers() != maf.size()
      NullPointerException - if (targGT == null || map == null || maf == null)
  • Method Details

    • 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:
      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