Skip to content

Commit

Permalink
bugfix: tracing of helices with seed-trailing bps
Browse files Browse the repository at this point in the history
  • Loading branch information
'qubsq01' committed Sep 13, 2022
1 parent b8fef4b commit d5f29fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
# IntaRNA
- compilation fix: correcting shared variables for parallelization
- BUGFIX debug check
- BUGFIX IntaRNAhelix traceback of helices where seed is not at right end

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

220913 Martin Raden
* IntaRNA/HelixHandlerNoBulgeMax:
* traceBackHelixSeed() : bugfix: tracing of helices with seed-trailing bps

220505 Martin Raden
* bin/IntaRNA :
* compilation fix: removing queryNumber from shared variables, since constant
Expand Down
12 changes: 6 additions & 6 deletions src/IntaRNA/HelixHandlerNoBulgeMax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,17 @@ traceBackHelixSeed( Interaction & interaction
// get energy to be traced
E_type curE = helixSeed.at(BP(i1,i2)).first;

// No traceback possible for current boundary
if (E_isINF(curE)) {
return;
}

const size_t bestL1 = getHelixSeedLength1(i1,i2);
const size_t bestL2 = getHelixSeedLength2(i1,i2);

const size_t j1 = i1 + decodeHelixSeedLength1(helixSeed.at(BP(i1,i2)).second) -1;
const size_t j2 = i2 + decodeHelixSeedLength2(helixSeed.at(BP(i1,i2)).second) -1;

// No traceback possible for current boundary
if (E_isINF(curE)) {
return;
}

// Calculate how many base pairs are possible alongside the seed.
// Note: If seedHandler allows unpaired positions this check is not enough, check happens in loop
size_t possibleBasePairs = std::min(j1-i1,j2-i2) +1 - seedHandler->getConstraint().getBasePairs();
Expand Down Expand Up @@ -436,7 +436,7 @@ traceBackHelixSeed( Interaction & interaction
E_type trailingE = E_type(0);
const size_t trailingBP = (j1-seedEnd1);
// update trailingE to cover all (missing) trailing base pairs
for (size_t trailingL = 0; trailingL < trailingBP; trailingL++) {
for (size_t trailingL = 1; trailingL <= trailingBP; trailingL++) {
// check if trailing based pairs are possible, otherwise stop computation
if (!energy.areComplementary(seedEnd1+trailingL,seedEnd2+trailingL))
{
Expand Down

0 comments on commit d5f29fd

Please sign in to comment.