Fix for SB calculation: the best overall AF might not have any mass when just looking at reads from a single strand. We need to compute the best AF for each stratification.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4505 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-10-15 17:51:18 +00:00
parent 7157cb9090
commit 471c18054f
1 changed files with 2 additions and 0 deletions

View File

@ -236,6 +236,7 @@ public class UnifiedGenotyperEngine {
clearAFarray(log10AlleleFrequencyPosteriors.get());
afcm.get().getLog10PNonRef(tracker, refContext, GLs, log10AlleleFrequencyPriors, log10AlleleFrequencyPosteriors.get());
double forwardLog10PofNull = log10AlleleFrequencyPosteriors.get()[0];
bestAFguess = MathUtils.maxElementIndex(log10AlleleFrequencyPosteriors.get());
double forwardLog10PofF = log10AlleleFrequencyPosteriors.get()[bestAFguess];
//System.out.println("forwardLog10PofNull=" + forwardLog10PofNull + ", forwardLog10PofF=" + forwardLog10PofF);
@ -245,6 +246,7 @@ public class UnifiedGenotyperEngine {
clearAFarray(log10AlleleFrequencyPosteriors.get());
afcm.get().getLog10PNonRef(tracker, refContext, GLs, log10AlleleFrequencyPriors, log10AlleleFrequencyPosteriors.get());
double reverseLog10PofNull = log10AlleleFrequencyPosteriors.get()[0];
bestAFguess = MathUtils.maxElementIndex(log10AlleleFrequencyPosteriors.get());
double reverseLog10PofF = log10AlleleFrequencyPosteriors.get()[bestAFguess];
//System.out.println("reverseLog10PofNull=" + reverseLog10PofNull + ", reverseLog10PofF=" + reverseLog10PofF);