Fix for HMM optimization. If the two penalty arrays match exactly the function should return the end of the array instead of 0.

This commit is contained in:
Ryan Poplin 2011-11-09 22:00:52 -05:00
parent d828eba7f4
commit 348f2db7fd
1 changed files with 2 additions and 2 deletions

View File

@ -622,7 +622,7 @@ public class PairHMMIndelErrorModel {
if ( b1[i]!= b2[i])
return i;
}
return 0; // sanity check
return b1.length;
}
private int computeFirstDifferingPosition(double[] b1, double[] b2) {
@ -633,7 +633,7 @@ public class PairHMMIndelErrorModel {
if ( b1[i]!= b2[i])
return i;
}
return 0; // sanity check
return b1.length;
}
private final static double[] getHaplotypeLikelihoods(final int numHaplotypes, final int readCounts[], final double readLikelihoods[][]) {