Package phase

Class Ibs2Sets

java.lang.Object
phase.Ibs2Sets

public final class Ibs2Sets extends Object

Class Ibs2Sets partitions markers into steps, and stores the sets of samples whose genotypes are consistent with IBS2 in each step.

Instances of Ibs2Sets are immutable.

  • Constructor Details

    • Ibs2Sets

      public Ibs2Sets(GT targGT, Ibs2Markers ibs2Markers)
      Constructs a new Ibs2Sets instance from the specified data.
      Parameters:
      targGT - the target genotype data
      ibs2Markers - the markers and intervals that are used to detect IBS2 segments
      Throws:
      IllegalArgumentException - if targGT.nMarkers() != ibs2Markers.nMarkers()
      NullPointerException - if (targGT == null || ibs2Markers == null)
  • Method Details

    • nTargSamples

      public int nTargSamples()
      Returns the number of target samples.
      Returns:
      the number of target samples
    • segList

      public SampleSeg[] segList(int sample)
      Returns the detected IBS2 sample segments.
      Parameters:
      sample - a sample index
      Returns:
      the detected IBS2 sample segments
      Throws:
      IndexOutOfBoundsException - if sample < 0 || sample >= this.nTargSamples()