Package org.snpsift

Class VcfLd

java.lang.Object
org.snpsift.VcfLd

public class VcfLd extends Object
Calculate Linkage Disequilibrium Reference: "Principles of population genetics (4th edition)" Hartl invalid input: '&' Clark, pages 73 to 81 Note: I try to follow the same notation as the book. WARNING: I assume that the organism is diploid (i.e. it has two chromosomes)
Author:
pablocingolani
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
    ld()
    Calculate linkage disequilibrium parameters
    double
    ld(org.snpeff.vcf.VcfEntry vcfEntryA, org.snpeff.vcf.VcfEntry vcfEntryB)
    Calculate linkage disequilibrium parameter
    sanityCheck(org.snpeff.vcf.VcfEntry vcfEntryA, org.snpeff.vcf.VcfEntry vcfEntryB)
    Return an error message if any problem is found or empty string if it is OK.
    void
    setCount(int countAB, int countAb, int countaB, int countab, int countA, int counta, int countB, int countb)
    Set counters in order to calculate LD parameters

    Methods inherited from class java.lang.Object

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

    • debug

      public static boolean debug
  • Constructor Details

    • VcfLd

      public VcfLd()
  • Method Details

    • getD

      public double getD()
    • getDmax

      public double getDmax()
    • getDmin

      public double getDmin()
    • getDprime

      public double getDprime()
    • getpA

      public double getpA()
    • getpB

      public double getpB()
    • getQa

      public double getQa()
    • getQb

      public double getQb()
    • getrSquare

      public double getrSquare()
    • ld

      public double ld()
      Calculate linkage disequilibrium parameters
      Returns:
      linkage disequilibrium between 'A' and 'B'
    • ld

      public double ld(org.snpeff.vcf.VcfEntry vcfEntryA, org.snpeff.vcf.VcfEntry vcfEntryB)
      Calculate linkage disequilibrium parameter
      Parameters:
      vcfEntryA - : Vcf entry at locus 'A'
      vcfEntryB - : Vcf entry at locus 'B'
      Returns:
      linkage disequilibrium between 'A' and 'B'
    • sanityCheck

      public String sanityCheck(org.snpeff.vcf.VcfEntry vcfEntryA, org.snpeff.vcf.VcfEntry vcfEntryB)
      Return an error message if any problem is found or empty string if it is OK.
      Returns:
    • setCount

      public void setCount(int countAB, int countAb, int countaB, int countab, int countA, int counta, int countB, int countb)
      Set counters in order to calculate LD parameters
      Parameters:
      countAB -
      countAb -
      countaB -
      countab -
      countA -
      counta -
      countB -
      countb -