]> git.donarmstrong.com Git - rsem.git/blobdiff - EM.cpp
rsem v1.1.11, allow spaces appear in field seqname and attributes gene_id, transcript...
[rsem.git] / EM.cpp
diff --git a/EM.cpp b/EM.cpp
index ff257680ead4f4f2087515131623a6e61fb498c1..5f9b8c05a3d11f785eb31de57466e5dd3c4d5e4c 100644 (file)
--- a/EM.cpp
+++ b/EM.cpp
@@ -506,7 +506,7 @@ void EM() {
                        }
 
                if (verbose) printf("ROUND = %d, SUM = %.15g, bChange = %f, totNum = %d\n", ROUND, sum, bChange, totNum);
-       } while (ROUND < MIN_ROUND || totNum > 0 && ROUND < MAX_ROUND);
+       } while (ROUND < MIN_ROUND || (totNum > 0 && ROUND < MAX_ROUND));
          //while (ROUND < MAX_ROUND);
 
        if (totNum > 0) fprintf(stderr, "Warning: RSEM reaches %d iterations before meeting the convergence criteria.\n", MAX_ROUND);
@@ -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); }
@@ -633,8 +634,8 @@ int main(int argc, char* argv[]) {
                printf("Usage : rsem-run-em refName read_type sampleName sampleToken [-p #Threads] [-b samInpType samInpF has_fn_list_? [fn_list]] [-q] [--gibbs-out]\n\n");
                printf("  refName: reference name\n");
                printf("  read_type: 0 single read without quality score; 1 single read with quality score; 2 paired-end read without quality score; 3 paired-end read with quality score.\n");
-               printf("  samplePath: sample path.\n");
-               printf("  sampleName: sample name.\n");
+               printf("  sampleName: sample's name, including the path\n");
+               printf("  sampleToken: sampleName excludes the path\n");
                printf("  -p: number of threads which user wants to use. (default: 1)\n");
                printf("  -b: produce bam format output file. (default: off)\n");
                printf("  -q: set it quiet\n");