]> git.donarmstrong.com Git - rsem.git/blobdiff - EM.cpp
--bowtie-chunkmbs
[rsem.git] / EM.cpp
diff --git a/EM.cpp b/EM.cpp
index 15dd11747b27e84e6732ff6a2411efd0a1529f36..322a3063ff6596c9b1cce15d037065c8c2c1af85 100644 (file)
--- a/EM.cpp
+++ b/EM.cpp
@@ -394,9 +394,11 @@ void release(ReadReader<ReadType> **readers, HitContainer<HitType> **hitvs, doub
        delete[] mhps;
 }
 
+int tmp_n;
+
 inline bool doesUpdateModel(int ROUND) {
-       //return false; // never update, for debugging only
-       return ROUND <= 20 || ROUND % 100 == 0;
+  //  return ROUND <= 20 || ROUND % 100 == 0;
+  return ROUND <= 10;
 }
 
 //Including initialize, algorithm and results saving
@@ -571,6 +573,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); }