Revert "Fixed batching bug."

This reverts commit 3e56c83d0eec7c374e5f187d1ef124d42ecc071e.
This commit is contained in:
sathibault 2013-07-11 11:30:37 -05:00
parent 7458b59bb3
commit 23fe3e449a
1 changed files with 7 additions and 19 deletions

View File

@ -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<HmmInput> 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;
}