Package org.snpsift
Class VcfLd
java.lang.Object
org.snpsift.VcfLd
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getD()
double
getDmax()
double
getDmin()
double
double
getpA()
double
getpB()
double
getQa()
double
getQb()
double
double
ld()
Calculate linkage disequilibrium parametersdouble
ld
(org.snpeff.vcf.VcfEntry vcfEntryA, org.snpeff.vcf.VcfEntry vcfEntryB) Calculate linkage disequilibrium parametersanityCheck
(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
-
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
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
-
-