Skip to content

Commit

Permalink
Merge pull request #169 from BackofenLab/dev
Browse files Browse the repository at this point in the history
version 3.1.0.2
  • Loading branch information
martin-raden authored Sep 20, 2019
2 parents 6aec12e + 922b9a7 commit 31284e7
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
12 changes: 11 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
################################################################################

################################################################################
### version 3.1.0
### version 3.1.0.2
################################################################################

190920 Martin Raden :
* IntaRNA/PredictorMfe :
* getNextBest() :
* ensure deterministic output for degenerate bestE interactions (left most)
* tests updated

################################################################################
### version 3.1.0.1
################################################################################

# IntaRNA
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

AC_PREREQ([2.65])
# 5 argument version only available with aclocal >= 2.64
AC_INIT([IntaRNA], [3.1.0], [], [intaRNA], [http://www.bioinf.uni-freiburg.de] )
AC_INIT([IntaRNA], [3.1.0.2], [], [intaRNA], [http://www.bioinf.uni-freiburg.de] )

# minimal required version of the boost library
BOOST_REQUIRED_VERSION=1.50.0
Expand Down
22 changes: 21 additions & 1 deletion src/IntaRNA/PredictorMfe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,32 @@ getNextBest( Interaction & curBest )
curCellE = energy.getE(curLeftBound->first.first, curLeftBound->second.j1
, curLeftBound->first.second, curLeftBound->second.j2
, curLeftBound->second.val );
// deal with degeneracy of energy model, ie. multiple sites with bestE
if (E_equal(curCellE,curBestCellE)) {
// select left most to be deterministic in output
if (curLeftBound->first.first > curBestCellStart.first
|| (curLeftBound->first.first == curBestCellStart.first
&& curLeftBound->first.second > curBestCellStart.second)
|| (curLeftBound->first.first == curBestCellStart.first
&& curLeftBound->first.second == curBestCellStart.second
&& curLeftBound->second.j1 > curBestCell->j1)
|| (curLeftBound->first.first == curBestCellStart.first
&& curLeftBound->first.second == curBestCellStart.second
&& curLeftBound->second.j1 == curBestCell->j1
&& curLeftBound->second.j2 > (curBestCell->j2))
)
{
// right of curBest
continue;
}
} else
// or energy is too low to be considered
// or energy is higher than current best found so far
if (curCellE < curBestE || curCellE >= curBestCellE )
if (curCellE < curBestE || curCellE > curBestCellE)
{
continue;
}

//// FOUND THE NEXT BETTER SOLUTION
// overwrite current best found so far
curBestCell = curCell;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id1;start1;end1;id2;start2;end2;subseqDP;hybridDP;E
target;1;2;query;1;2;CC&GG;((&));-2
target;6;7;query;3;4;CC&GG;((&));-2
target;5;6;query;3;4;CC&GG;((&));-2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id1;start1;end1;id2;start2;end2;subseqDP;hybridDP;E
target;1;2;query;1;2;CC&GG;((&));-2
target;6;7;query;3;4;CC&GG;((&));-2
target;9;10;query;1;2;CC&GG;((&));-2
target;5;6;query;3;4;CC&GG;((&));-2
target;9;10;query;3;4;CC&GG;((&));-2

0 comments on commit 31284e7

Please sign in to comment.