Package phase

Class LowFreqPbwtPhaseIbs


  • public final class LowFreqPbwtPhaseIbs
    extends java.lang.Object

    Class AltPbwtPhaseIBS uses the Positional Burrows-Wheeler Transform (PBWT) and rare variants to select IBS haplotypes for each sample for each specified genomic interval.

    Instances of class LowFreqPbwtPhaseIbs are thread-safe.

    Reference: Durbin, R. 2014. Bioinformatics 30(9):1266–1272. doi:10.1093/bioinformatics/btu014

    • Constructor Summary

      Constructors 
      Constructor Description
      LowFreqPbwtPhaseIbs​(PhaseData phaseData, CodedSteps codedSteps, boolean useBwd)
      Constructs a new PbwtPhaseIBS instance from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      XRefGT allHaps()
      Returns the estimated phased genotypes for the target and reference samples.
      int ibsHap​(int hap, int step)
      Returns the index of a haplotype that is identical by state with the specified target haplotype in the specified genomic interval, or -1 if there is no identical-by-state haplotype.
      PhaseData phaseData()
      Returns the current genotype phase estimates and parameter values.
      • Methods inherited from class java.lang.Object

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

      • LowFreqPbwtPhaseIbs

        public LowFreqPbwtPhaseIbs​(PhaseData phaseData,
                                   CodedSteps codedSteps,
                                   boolean useBwd)
        Constructs a new PbwtPhaseIBS instance from the specified data.
        Parameters:
        phaseData - the current genotype phase estimates and parameter values
        codedSteps - the coded steps
        useBwd - true if last-to-first PBWT should be used
        Throws:
        java.lang.IllegalArgumentException - if phaseData.fpd().stage1Steps() != codedSteps.steps()
        java.lang.IllegalArgumentException - if phaseData.fpd().stage1XRefGT()!=codedSteps.refHaps()
        java.lang.IllegalArgumentException - if phaseData.fpd().targGT().samples()!=codedSteps.targSamples()
        java.lang.NullPointerException - if phaseData == null || codedSteps == null
    • Method Detail

      • phaseData

        public PhaseData phaseData()
        Returns the current genotype phase estimates and parameter values.
        Returns:
        the current genotype phase estimates and parameter values
      • allHaps

        public XRefGT allHaps()
        Returns the estimated phased genotypes for the target and reference samples.
        Returns:
        the estimated phased genotypes for the target and reference samples
      • ibsHap

        public int ibsHap​(int hap,
                          int step)
        Returns the index of a haplotype that is identical by state with the specified target haplotype in the specified genomic interval, or -1 if there is no identical-by-state haplotype.
        Parameters:
        hap - a target haplotype index
        step - an index of a genomic interval
        Returns:
        the index of a haplotype that is identical by state with the specified haplotype int the specified genomic interval
        Throws:
        java.lang.IndexOutOfBoundsException - if hap < 0 || hap >= this.phaseData().targGT().nHaps()
        java.lang.IndexOutOfBoundsException - if step < 0 || step >= this.phaseData().fpd().stage1Steps().size()