Skip to content

Commit

Permalink
v3.1.3 : bugfix traceback
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-raden committed Nov 4, 2019
1 parent c444612 commit 722a26c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
################################################################################
################################################################################

################################################################################
### version 3.1.3
################################################################################

# IntaRNA
- bugfix latest changes on traceback

################################################################################

191104 Martin Raden
* PredictorMfe2dSeedExtension::
* traceBack()
* bugfix tracback (reset of k2 iteration)

191031 Martin Raden
* using c++11 raw strings where appropriate

Expand Down
12 changes: 6 additions & 6 deletions src/IntaRNA/PredictorMfe2dSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ traceBack( Interaction & interaction )
// check all combinations of decompositions into (i1,i2)..(k1,k2)-(si1,si2)
const size_t k1max = std::min(si1-1,i1+noLpShift+energy.getMaxInternalLoopSize1()+1);
const size_t k2max = std::min(si2-1,i2+noLpShift+energy.getMaxInternalLoopSize2()+1);
for (k1++; traceNotFound && k1<=k1max; k1++) {
for (k2++; traceNotFound && k2<=k2max; k2++) {
for (k1=i1+noLpShift+1; traceNotFound && k1<=k1max; k1++) {
for (k2=i2+noLpShift+1; traceNotFound && k2<=k2max; k2++) {
// check if (k1,k2) are valid left boundary
if ( E_isNotINF( hybridE_left(si1-k1,si2-k2) ) ) {
if ( E_equal( curE,
Expand All @@ -411,10 +411,10 @@ traceBack( Interaction & interaction )
i1=k1;
i2=k2;
curE = hybridE_left(si1-i1,si2-i2);
}
}
}
}
} // found trace step
} // (k1,k2) complementary
} // k2
} // k1
if (traceNotFound) {
LOG(ERROR) <<"left-not-found: i "<<i1<<","<<i2<<" si "<<si1<<","<<si2;
throw std::runtime_error("trace not found");
Expand Down

0 comments on commit 722a26c

Please sign in to comment.