Corrected the use of the prior.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@284 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
b854c24575
commit
15151ac125
|
|
@ -94,6 +94,8 @@ public class BasecallingBaseModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
double[][] probdist = new double[4][4];
|
double[][] probdist = new double[4][4];
|
||||||
|
double probPrev = (cycle == 0) ? 1.0 : QualityUtils.qualToProb(qualPrev);
|
||||||
|
int baseIndex = (cycle == 0) ? 0 : baseToBaseIndex(basePrev);
|
||||||
|
|
||||||
for (int basePrevIndex = 0; basePrevIndex < ((cycle == 0) ? 1 : 4); basePrevIndex++) {
|
for (int basePrevIndex = 0; basePrevIndex < ((cycle == 0) ? 1 : 4); basePrevIndex++) {
|
||||||
for (int baseCurIndex = 0; baseCurIndex < 4; baseCurIndex++) {
|
for (int baseCurIndex = 0; baseCurIndex < 4; baseCurIndex++) {
|
||||||
|
|
@ -106,7 +108,7 @@ public class BasecallingBaseModel {
|
||||||
DoubleMatrix1D Ax = alg.mult(inverseCovariances[basePrevIndex][baseCurIndex], sub);
|
DoubleMatrix1D Ax = alg.mult(inverseCovariances[basePrevIndex][baseCurIndex], sub);
|
||||||
|
|
||||||
double exparg = -0.5*alg.mult(sub, Ax);
|
double exparg = -0.5*alg.mult(sub, Ax);
|
||||||
probdist[basePrevIndex][baseCurIndex] = norms[basePrevIndex][baseCurIndex]*Math.exp(exparg);
|
probdist[basePrevIndex][baseCurIndex] = (baseIndex == basePrevIndex ? probPrev : 1.0 - probPrev)*norms[basePrevIndex][baseCurIndex]*Math.exp(exparg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue