Package sample

Class InitTargHapPairs


  • public final class InitTargHapPairs
    extends java.lang.Object

    Class InitTargHapPairs has a static method for returning initial target haplotype pairs.

    Instances of class InitTargHapPairs are immutable.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<LongArray> run​(GT targ, GT ref, double minFreq, long seed)
      Returns initial target haplotype pairs.
      • Methods inherited from class java.lang.Object

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

      • run

        public static java.util.List<LongArray> run​(GT targ,
                                                    GT ref,
                                                    double minFreq,
                                                    long seed)
        Returns initial target haplotype pairs. Missing alleles are sampled according from the empirical allele frequency distribution, and input genotypes with unknown phase will have their alleles randomly ordered in the returned haplotype pairs.
        Parameters:
        targ - the target genotype data
        ref - the reference haplotype pairs
        minFreq - a minimum allele frequency to be enforced
        seed - the seed for random number generation
        Returns:
        initial target haplotype pairs
        Throws:
        java.lang.IllegalArgumentException - if minFreq <= 0.0 || minFreq >= 0.5 || Double.isNaN(minFreq) == true
        java.lang.NullPointerException - if gl == null || refHapPairs == null