Add some comments to AFCalculationResult
Add note that VC may be null (in this case because there are too many alts) Add todo for possible inefficient code
This commit is contained in:
parent
edbb7e7984
commit
d573fc4adf
|
|
@ -521,7 +521,7 @@ public abstract class GenotypingEngine<Config extends StandardCallerArgumentColl
|
|||
@Ensures("MathUtils.goodLog10Probability(result)")
|
||||
protected final double estimateLog10ReferenceConfidenceForOneSample(final int depth, final double log10OfTheta) {
|
||||
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.
|
||||
*
|
||||
* @param vc the GL-annotated variant context
|
||||
* @return the VariantCallContext object
|
||||
* @return the VariantCallContext object (can be null)
|
||||
*/
|
||||
public VariantCallContext calculateGenotypes(VariantContext vc) {
|
||||
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.
|
||||
*/
|
||||
public class AFCalculationResult {
|
||||
private final static int AF0 = 0;
|
||||
private final static int AF1p = 1;
|
||||
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; //index of the AC>0 entry in the log10 array
|
||||
private final static int LOG_10_ARRAY_SIZES = 2;
|
||||
|
||||
private final double[] log10LikelihoodsOfAC;
|
||||
|
|
|
|||
Loading…
Reference in New Issue