Merged bug fix from Stable into Unstable

This commit is contained in:
Guillermo del Angel 2011-08-12 13:26:41 -04:00
commit 31dc831531
1 changed files with 13 additions and 13 deletions

View File

@ -531,14 +531,14 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
// qual contains now max(likelihoods[k]) for all k != bestGTguess // qual contains now max(likelihoods[k]) for all k != bestGTguess
qual = likelihoods[bestGTguess] - qual; qual = likelihoods[bestGTguess] - qual;
// likelihoods are stored row-wise in upper triangular matrix. IE // likelihoods are stored row-wise in lower triangular matrix. IE
// for 2 alleles they have ordering AA,AB,BB // for 2 alleles they have ordering AA,AB,BB
// for 3 alleles they are ordered AA,AB,AC,BB,BC,CC // for 3 alleles they are ordered AA,AB,BB,AC,BC,CC
// Get now alleles corresponding to best index // Get now alleles corresponding to best index
int kk=0; int kk=0;
boolean done = false; boolean done = false;
for (int i=0; i < vc.getNAlleles(); i++) { for (int j=0; j < vc.getNAlleles(); j++) {
for (int j=i; j < vc.getNAlleles(); j++){ for (int i=0; i <= j; i++){
if (kk++ == bestGTguess) { if (kk++ == bestGTguess) {
if (i==0) if (i==0)
myAlleles.add(vc.getReference()); myAlleles.add(vc.getReference());