Package org.snpsift

Class VcfLd


  • public class VcfLd
    extends java.lang.Object
    Calculate Linkage Disequilibrium Reference: "Principles of population genetics (4th edition)" Hartl & 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 debug  
    • Constructor Summary

      Constructors 
      Constructor Description
      VcfLd()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getD()  
      double getDmax()  
      double getDmin()  
      double getDprime()  
      double getpA()  
      double getpB()  
      double getQa()  
      double getQb()  
      double getrSquare()  
      double ld()
      Calculate linkage disequilibrium parameters
      double ld​(org.snpeff.vcf.VcfEntry vcfEntryA, org.snpeff.vcf.VcfEntry vcfEntryB)
      Calculate linkage disequilibrium parameter
      java.lang.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.
      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 Detail

      • debug

        public static boolean debug
    • Constructor Detail

      • VcfLd

        public VcfLd()
    • Method Detail

      • 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 java.lang.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 -