Package phase

Class SwapRate

java.lang.Object
phase.SwapRate

public class SwapRate extends Object

Class SwapRate stores the proportion of unphased heterozygotes whose phase with respect to the previous heteroygote has been reversed.

Instances of class SwapRate are thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    Returns the proportion of unphased heterozygotes whose phase relative to the previous heterozygote has been reversed.
    static void
    increment(int nUnphHets, int nSwaps)
    Increments the number of unphased heterozygotes and the number of unphased heterozygotes whose phase with respect to the preceding heterozygote has been reversed.

    Methods inherited from class java.lang.Object

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

    • getAndResetSwapRate

      public static double getAndResetSwapRate()
      Returns the proportion of unphased heterozygotes whose phase relative to the previous heterozygote has been reversed. The counters for the number of heterozygotes whose phase has been reversed and for the total number of unphased heterozygotes are then set to 0.
      Returns:
      the proportion of unphased heterozygotes whose phase has been changed
    • increment

      public static void increment(int nUnphHets, int nSwaps)
      Increments the number of unphased heterozygotes and the number of unphased heterozygotes whose phase with respect to the preceding heterozygote has been reversed.
      Parameters:
      nUnphHets - the value that will be added to number of unphased heterozygotes
      nSwaps - the value that will be added to number of unphased heterozygotes whose phase has been reversed