From 23fe3e449a82a8b82094b1175a339f94a7ac0dc3 Mon Sep 17 00:00:00 2001 From: sathibault Date: Thu, 11 Jul 2013 11:30:37 -0500 Subject: [PATCH] Revert "Fixed batching bug." This reverts commit 3e56c83d0eec7c374e5f187d1ef124d42ecc071e. --- .../sting/utils/pairhmm/CnyPairHMM.java | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/protected/java/src/org/broadinstitute/sting/utils/pairhmm/CnyPairHMM.java b/protected/java/src/org/broadinstitute/sting/utils/pairhmm/CnyPairHMM.java index 8de29dc16..746c0add1 100644 --- a/protected/java/src/org/broadinstitute/sting/utils/pairhmm/CnyPairHMM.java +++ b/protected/java/src/org/broadinstitute/sting/utils/pairhmm/CnyPairHMM.java @@ -113,7 +113,6 @@ public final class CnyPairHMM extends PairHMM implements BatchPairHMM { } public double[] batchGetResult() { - int iii, numHaplotypes; double[] results; int n = flushQueue(); @@ -124,27 +123,16 @@ public final class CnyPairHMM extends PairHMM implements BatchPairHMM { resultQueue.push(results); } - numHaplotypes = 0; - for (Iterator it=batchRequests.listIterator(); it.hasNext(); ) { - HmmInput h = it.next(); - numHaplotypes += h.haplotypes.size(); - } - + final HmmInput test = batchRequests.remove(0); + final int numHaplotypes = test.haplotypes.size(); results = new double[numHaplotypes]; - iii = 0; - while (!batchRequests.isEmpty()) { - HmmInput test = batchRequests.remove(0); - int testSize = test.haplotypes.size(); - for (int jjj = 0; jjj < testSize; jjj++) { - results[iii] = resultQueue.pop(); - if (results[iii]<-60.0) { - final Haplotype haplotype = test.haplotypes.get(jjj); - results[iii] = softHmm(haplotype.getBases(), test.readBases, test.readQuals, test.insertionGOP, test.deletionGOP, test.overallGCP, 0, true); - } - iii++; + for (int jjj = 0; jjj < numHaplotypes; jjj++) { + results[jjj] = resultQueue.pop(); + if (results[jjj]<-60.0) { + final Haplotype haplotype = test.haplotypes.get(jjj); + results[jjj]=softHmm(haplotype.getBases(), test.readBases, test.readQuals, test.insertionGOP, test.deletionGOP, test.overallGCP, 0, true); } } - return results; }