Package phase

Class AlleleImputer


  • public final class AlleleImputer
    extends java.lang.Object

    Class AlleleImputer imputes alleles from marker allele frequencies.

    Instances of class AlleleImputer are immutable.

    • Constructor Summary

      Constructors 
      Constructor Description
      AlleleImputer​(GT targ, GT ref, long seed)
      Constructs a new AlleleImputer instance from the specified data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int imputeAllele​(int marker, java.util.Random rand)
      Returns an imputed allele for the specified marker.
      int nMarkers()
      Returns the number of markers.
      • Methods inherited from class java.lang.Object

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

      • AlleleImputer

        public AlleleImputer​(GT targ,
                             GT ref,
                             long seed)
        Constructs a new AlleleImputer instance from the specified data.
        Parameters:
        ref - the reference genotypes, or null if there are none
        targ - the target genotypes
        seed - the seed for random number generation
        Throws:
        java.lang.IllegalArgumentException - if ref.markers().equals(targ.markers()) == false
        java.lang.NullPointerException - if targ == null
    • Method Detail

      • nMarkers

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

        public int imputeAllele​(int marker,
                                java.util.Random rand)
        Returns an imputed allele for the specified marker.
        Parameters:
        marker - a marker index
        rand - a random number generator
        Returns:
        an imputed allele for the specified marker
        Throws:
        java.lang.IndexOutOfBoundsException - if marker < 0 || marker >= this.nMarkers()
        java.lang.NullPointerException - if rand == null