Package org.gorpipe.gor.gava
Class GavaLogLikelihood
java.lang.Object
org.gorpipe.gor.gava.GavaLogLikelihood
- Direct Known Subclasses:
DominantLogLikelihood,RecessiveLogLikelihood,RegularLogLikelihood
Log-likelihood ratio calculator for variant association.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intCase penetrance (0 for no locus hetreogeneity, -1 for no constraint).protected intControl penetrance (0 for complete penetrance, -1 for no constraint).protected booleanInclude protective variants in calculations.protected booleanNo max allele count for each case in dominant/recessive models.protected intprotected intprotected doubleUpper threshold for the control allele frequency. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalcVariantLogLikelihood(VariantCounts counts, int[] perm) Calculate the log-likelihood for a single variant (using the regular inheritance model).abstract doublecomputeLogLikelihood(List<org.gorpipe.gor.gava.CollapsedCounts> collapsedCounts, int[] perm, boolean debug) Compute the log-likelihood ratio for a feature.voidsetIncludeProtective(boolean includeProtective) Set if protective variants should be included (default is false).voidsetPenetrance(int controlPenetrance, int casePenetrance, boolean noMaxAlleleCounts) voidsetSubjectCounts(int numCases, int numControls) voidsetUpperFreqThreshold(double upperFreqThreshold)
-
Field Details
-
upperFreqThreshold
protected double upperFreqThresholdUpper threshold for the control allele frequency. -
controlPenetrance
protected int controlPenetranceControl penetrance (0 for complete penetrance, -1 for no constraint). -
casePenetrance
protected int casePenetranceCase penetrance (0 for no locus hetreogeneity, -1 for no constraint). -
noMaxAlleleCounts
protected boolean noMaxAlleleCountsNo max allele count for each case in dominant/recessive models. -
includeProtective
protected boolean includeProtectiveInclude protective variants in calculations. -
numCases
protected int numCases -
numControls
protected int numControls
-
-
Constructor Details
-
GavaLogLikelihood
public GavaLogLikelihood()
-
-
Method Details
-
setSubjectCounts
public void setSubjectCounts(int numCases, int numControls) - Parameters:
numCases-numControls-
-
setPenetrance
public void setPenetrance(int controlPenetrance, int casePenetrance, boolean noMaxAlleleCounts) - Parameters:
controlPenetrance- maximum count among controls, -1 for no constraintcasePenetrance- true if recessive/dominant with no locus heterogeneitynoMaxAlleleCounts- true if no max allele count for each case in dominant/recessive models
-
setUpperFreqThreshold
public void setUpperFreqThreshold(double upperFreqThreshold) - Parameters:
upperFreqThreshold- upper threshold for the allele frequency
-
setIncludeProtective
public void setIncludeProtective(boolean includeProtective) Set if protective variants should be included (default is false).- Parameters:
includeProtective- true to include protective variants, false to exclude
-
computeLogLikelihood
public abstract double computeLogLikelihood(List<org.gorpipe.gor.gava.CollapsedCounts> collapsedCounts, int[] perm, boolean debug) Compute the log-likelihood ratio for a feature. The first numControls subjects in the given permutation are used as controls, and the remaining perm.length-numControls are used as cases.- Parameters:
collapsedCounts- the call counts for the subjects (with very rare variants collapsed)perm- permutation of the subjectsdebug- if true, print out debug information- Returns:
- the log-likelihood
-
calcVariantLogLikelihood
Calculate the log-likelihood for a single variant (using the regular inheritance model).- Parameters:
counts- the call counts for the variantperm- permutation of the subjects- Returns:
- the log-likelihood
-