Refactor
authorMartin C. Frith
Fri Mar 13 08:57:07 2020 +0900 (2 months ago)
changeset 1057ff73ca674104
parent 1056 6f4ec587fe25
child 1058 0b3571f8e14b
Refactor
src/split/cbrc_split_aligner.cc
     1.1 --- a/src/split/cbrc_split_aligner.cc	Fri Mar 13 07:38:42 2020 +0900
     1.2 +++ b/src/split/cbrc_split_aligner.cc	Fri Mar 13 08:57:07 2020 +0900
     1.3 @@ -569,7 +569,7 @@
     1.4      cell(rescales, j) = rescale;
     1.5      double probFromJump = sumOfProbs * restartProb;
     1.6      double pSum = 0.0;
     1.7 -    for (unsigned *x = inplayAlnBeg; x < inplayAlnEnd; ++x) {
     1.8 +    for (const unsigned *x = inplayAlnBeg; x < inplayAlnEnd; ++x) {
     1.9        size_t ij = matrixRowOrigins[*x] + j;
    1.10        double p =
    1.11  	(probFromJump + Fmat[ij] * Sexp[ij*2]) * Sexp[ij*2+1] * rescale;
    1.12 @@ -1046,17 +1046,17 @@
    1.13  
    1.14      sortedAlnIndices.resize(numAlns);
    1.15      for (unsigned i = 0; i < numAlns; ++i) sortedAlnIndices[i] = i;
    1.16 -    oldInplayAlnIndices.resize(numAlns);
    1.17      newInplayAlnIndices.resize(numAlns);
    1.18  
    1.19 -    rBegs.resize(numAlns);
    1.20 -    rEnds.resize(numAlns);
    1.21 -
    1.22 -    if (splicePrior > 0.0 || !chromosomeIndex.empty()) {
    1.23 +    if (restartProb <= 0) {
    1.24 +      oldInplayAlnIndices.resize(numAlns);
    1.25 +      rBegs.resize(numAlns);
    1.26 +      rEnds.resize(numAlns);
    1.27 +      if (splicePrior > 0.0 || !chromosomeIndex.empty()) {
    1.28  	initRbegsAndEnds();
    1.29 -	//initRnameAndStrandIds();
    1.30 +      }
    1.31 +      initRnameAndStrandIds();
    1.32      }
    1.33 -    initRnameAndStrandIds();
    1.34  
    1.35      initDpBounds();
    1.36  }