Package imp

Class ImpIbs


  • public final class ImpIbs
    extends java.lang.Object

    Class ImpIbs identifies haplotypes that share a long IBS segment with a specified haplotype.

    Instances of ImpIbs are immutable.

    • Constructor Summary

      Constructors 
      Constructor Description
      ImpIbs​(ImpData impData)
      Constructs a new ImpIbs object from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CodedSteps codedSteps()
      Returns the coded steps.
      int[] ibsHaps​(int hap, int step)
      Returns an array containing reference haplotype indices that that are IBS with the specified target haplotype in an interval beginning with the specified step.
      ImpData impData()
      Return the data for genotype imputation in the marker window.
      • Methods inherited from class java.lang.Object

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

      • ImpIbs

        public ImpIbs​(ImpData impData)
        Constructs a new ImpIbs object from the specified data.
        Parameters:
        impData - the input data for genotype imputation
        Throws:
        java.lang.NullPointerException - if impData == null
    • Method Detail

      • ibsHaps

        public int[] ibsHaps​(int hap,
                             int step)
        Returns an array containing reference haplotype indices that that are IBS with the specified target haplotype in an interval beginning with the specified step. The returned array will contain fewer than this.nHapsPerStep() haplotypes if the number of reference haplotypes that are IBS with specified target haplotype in the specified step is less than this.nHapsPerStep().
        Parameters:
        hap - a haplotype index
        step - a step index
        Returns:
        an array containing reference haplotype indices that that are IBS with the specified target haplotype
        Throws:
        java.lang.IndexOutOfBoundsException - if hap < 0 || hap >= this.hapPairs().nHaps()
        java.lang.IndexOutOfBoundsException - if step < 0 || step >= this.nSteps()
      • impData

        public ImpData impData()
        Return the data for genotype imputation in the marker window.
        Returns:
        the data for genotype imputation in the marker window
      • codedSteps

        public CodedSteps codedSteps()
        Returns the coded steps. The coded steps stores the starting marker for each step along with the index of the allele sequence carried by each haplotype in each step.
        Returns:
        the coded steps