]> git.donarmstrong.com Git - rsem.git/commitdiff
fix a bug in partition reads for parallel
authorBo Li <bli@cs.wisc.edu>
Sat, 2 Apr 2011 06:47:49 +0000 (01:47 -0500)
committerBo Li <bli@cs.wisc.edu>
Sat, 2 Apr 2011 06:47:49 +0000 (01:47 -0500)
EM.cpp

diff --git a/EM.cpp b/EM.cpp
index 318b7eba94cfd9a31cb3009f2b6cf0d627b59df1..aa7ebdb9011e37b5e58b1b0e00c201b9ca60aed6 100644 (file)
--- a/EM.cpp
+++ b/EM.cpp
@@ -128,7 +128,7 @@ void init(ReadReader<ReadType> **&readers, HitContainer<HitType> **&hitvs, doubl
                if (!readers[i]->locate(curnr)) { fprintf(stderr, "Read indices files do not match!\n"); exit(-1); }
                //assert(readers[i]->locate(curnr));
 
-               while (nrLeft > ntLeft && hitvs[i]->getNHits() < nhT) {
+               while (nrLeft > ntLeft && (i == nThreads - 1 || hitvs[i]->getNHits() < nhT)) {
                        if (!hitvs[i]->read(fin)) { fprintf(stderr, "Cannot read alignments from .dat file!\n"); exit(-1); }
                        //assert(hitvs[i]->read(fin));
                        --nrLeft;