Fixed batching bug.
This commit is contained in:
parent
82dcdc01c0
commit
7458b59bb3
|
|
@ -113,6 +113,7 @@ public final class CnyPairHMM extends PairHMM implements BatchPairHMM {
|
||||||
}
|
}
|
||||||
|
|
||||||
public double[] batchGetResult() {
|
public double[] batchGetResult() {
|
||||||
|
int iii, numHaplotypes;
|
||||||
double[] results;
|
double[] results;
|
||||||
|
|
||||||
int n = flushQueue();
|
int n = flushQueue();
|
||||||
|
|
@ -123,16 +124,27 @@ public final class CnyPairHMM extends PairHMM implements BatchPairHMM {
|
||||||
resultQueue.push(results);
|
resultQueue.push(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
final HmmInput test = batchRequests.remove(0);
|
numHaplotypes = 0;
|
||||||
final int numHaplotypes = test.haplotypes.size();
|
for (Iterator<HmmInput> it=batchRequests.listIterator(); it.hasNext(); ) {
|
||||||
|
HmmInput h = it.next();
|
||||||
|
numHaplotypes += h.haplotypes.size();
|
||||||
|
}
|
||||||
|
|
||||||
results = new double[numHaplotypes];
|
results = new double[numHaplotypes];
|
||||||
for (int jjj = 0; jjj < numHaplotypes; jjj++) {
|
iii = 0;
|
||||||
results[jjj] = resultQueue.pop();
|
while (!batchRequests.isEmpty()) {
|
||||||
if (results[jjj]<-60.0) {
|
HmmInput test = batchRequests.remove(0);
|
||||||
final Haplotype haplotype = test.haplotypes.get(jjj);
|
int testSize = test.haplotypes.size();
|
||||||
results[jjj]=softHmm(haplotype.getBases(), test.readBases, test.readQuals, test.insertionGOP, test.deletionGOP, test.overallGCP, 0, true);
|
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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue