Merge pull request #1339 from broadinstitute/ldg_documentGenotypingCode
Add some comments to AFCalculationResult
This commit is contained in:
commit
2baa7a0b9e
|
|
@ -521,7 +521,7 @@ public abstract class GenotypingEngine<Config extends StandardCallerArgumentColl
|
||||||
@Ensures("MathUtils.goodLog10Probability(result)")
|
@Ensures("MathUtils.goodLog10Probability(result)")
|
||||||
protected final double estimateLog10ReferenceConfidenceForOneSample(final int depth, final double log10OfTheta) {
|
protected final double estimateLog10ReferenceConfidenceForOneSample(final int depth, final double log10OfTheta) {
|
||||||
final double log10PofNonRef = log10OfTheta + getRefBinomialProbLog10(depth);
|
final double log10PofNonRef = log10OfTheta + getRefBinomialProbLog10(depth);
|
||||||
return MathUtils.log10OneMinusX(Math.pow(10.0, log10PofNonRef));
|
return MathUtils.log10OneMinusX(Math.pow(10.0, log10PofNonRef)); //TODO: this 10^log(PofNonRef) seems inefficient
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -312,7 +312,7 @@ public class UnifiedGenotypingEngine extends GenotypingEngine<UnifiedArgumentCol
|
||||||
* Compute genotypes at a given locus.
|
* Compute genotypes at a given locus.
|
||||||
*
|
*
|
||||||
* @param vc the GL-annotated variant context
|
* @param vc the GL-annotated variant context
|
||||||
* @return the VariantCallContext object
|
* @return the VariantCallContext object (can be null)
|
||||||
*/
|
*/
|
||||||
public VariantCallContext calculateGenotypes(VariantContext vc) {
|
public VariantCallContext calculateGenotypes(VariantContext vc) {
|
||||||
final VariantContext.Type type = vc.getType();
|
final VariantContext.Type type = vc.getType();
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,8 @@ import java.util.*;
|
||||||
* that users of this code can rely on the values coming out of these functions.
|
* that users of this code can rely on the values coming out of these functions.
|
||||||
*/
|
*/
|
||||||
public class AFCalculationResult {
|
public class AFCalculationResult {
|
||||||
private final static int AF0 = 0;
|
private final static int AF0 = 0; //index of the AC=0 entry in the log10 array (of priors, likelihoods, or posteriors listed below)
|
||||||
private final static int AF1p = 1;
|
private final static int AF1p = 1; //index of the AC>0 entry in the log10 array
|
||||||
private final static int LOG_10_ARRAY_SIZES = 2;
|
private final static int LOG_10_ARRAY_SIZES = 2;
|
||||||
|
|
||||||
private final double[] log10LikelihoodsOfAC;
|
private final double[] log10LikelihoodsOfAC;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue