]> git.donarmstrong.com Git - rsem.git/commitdiff
fix one bug will lead using not the last theta value estimates
authorBo Li <bli@cs.wisc.edu>
Fri, 12 Aug 2011 18:13:49 +0000 (13:13 -0500)
committerBo Li <bli@cs.wisc.edu>
Fri, 12 Aug 2011 18:13:49 +0000 (13:13 -0500)
EM.cpp

diff --git a/EM.cpp b/EM.cpp
index 15dd11747b27e84e6732ff6a2411efd0a1529f36..5f9b8c05a3d11f785eb31de57466e5dd3c4d5e4c 100644 (file)
--- a/EM.cpp
+++ b/EM.cpp
@@ -571,6 +571,7 @@ void EM() {
 
        //calculate expected weights and counts using learned parameters
        updateModel = false; calcExpectedWeights = true;
+       for (int i = 0; i <= M; i++) probv[i] = theta[i];
        for (int i = 0; i < nThreads; i++) {
                rc = pthread_create(&threads[i], &attr, E_STEP<ReadType, HitType, ModelType>, (void*)(&fparams[i]));
                if (rc != 0) { fprintf(stderr, "Cannot create thread %d when calculate expected weights! (numbered from 0)\n", i); exit(-1); }