From 348f2db7fdf2e5a1d52dc6476c1c116e4064a8d4 Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Wed, 9 Nov 2011 22:00:52 -0500 Subject: [PATCH] Fix for HMM optimization. If the two penalty arrays match exactly the function should return the end of the array instead of 0. --- .../sting/gatk/walkers/indels/PairHMMIndelErrorModel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java index ef1c14576..319f41d53 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/PairHMMIndelErrorModel.java @@ -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[][]) {