Fixing up apparent source control/merge snafu: fix to correctly output PL ordering in multi-allelic sites by UG was only half-committed and hence not working. This completes fix

This commit is contained in:
Guillermo del Angel 2011-08-10 15:31:49 -04:00
parent 8072bd9831
commit 8325cb8c26
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());