Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/IntaRNA/HelixHandlerNoBulgeMax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ fillHelix(const size_t i1min, const size_t i1max, const size_t i2min, const size
i2 = i2start+o;

// check if valid base pair
if( energy.isAccessible1( i1 )
&& energy.isAccessible2( i2 )
&& energy.areComplementary( i1, i2 ))
if (energy.areComplementary( i1, i2 ))
{
// start new canonical helix information
if (E_isINF(curHelixE)) {
Expand Down Expand Up @@ -232,9 +230,7 @@ fillHelixSeed(const size_t i1min, const size_t i1max, const size_t i2min, const
j1 = seedEnd1+trailingL;
j2 = seedEnd2+trailingL;
// check if trailing based pairs are possible, otherwise stop computation
if (!(energy.isAccessible1(j1)
&& energy.isAccessible2(j2)
&& energy.areComplementary(j1,j2)))
if (!energy.areComplementary(j1,j2))
{
break;
}
Expand All @@ -258,9 +254,7 @@ fillHelixSeed(const size_t i1min, const size_t i1max, const size_t i2min, const

// check if leading based pairs are possible, otherwise stop computation
if (leadingBP > 0
&&!(energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2)))
&& !energy.areComplementary(i1,i2))
{
break;
}
Expand Down
8 changes: 2 additions & 6 deletions src/IntaRNA/PredictorMfe2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ fillHybridE( const size_t j1, const size_t j2
hybridE_pq(i1,i2) = E_INF;

// check if this cell is to be computed (!=E_INF)
if( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2)
if( energy.areComplementary(i1,i2)
)
{
// w2 = interaction width in seq2
Expand Down Expand Up @@ -162,9 +160,7 @@ fillHybridE( const size_t j1, const size_t j2
} else {
// no lp allowed
// check if right-side stacking of (i1,i2) is possible
if (energy.isAccessible1(i1+noLpShift)
&& energy.isAccessible2(i2+noLpShift)
&& energy.areComplementary(i1+noLpShift,i2+noLpShift))
if (energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
// get stacking term to avoid recomputation
iStackE = energy.getE_interLeft(i1,i1+noLpShift,i2,i2+noLpShift);
Expand Down
4 changes: 1 addition & 3 deletions src/IntaRNA/PredictorMfe2dHelixBlockHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ predict( const IndexRange & r1
for (i2=0; i2<hybridE.size2(); i2++) {

// check if positions can form interaction
if ( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2) )
if (energy.areComplementary(i1,i2) )
{
// set to interaction initiation with according boundary
hybridE(i1,i2) = BestInteractionE(energy.getE_init(), i1, i2);
Expand Down
4 changes: 1 addition & 3 deletions src/IntaRNA/PredictorMfe2dHelixBlockHeuristicSeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ predict( const IndexRange & r1
for (i2=0; i2<hybridE.size2(); i2++) {

// check if positions can form interaction
if ( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2) )
if (energy.areComplementary(i1,i2) )
{
// set to interaction initiation with according boundary
hybridE(i1,i2) = BestInteractionE(energy.getE_init(), i1, i2);
Expand Down
6 changes: 1 addition & 5 deletions src/IntaRNA/PredictorMfe2dHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,13 @@ fillHybridE()
curCellEtotal = E_INF;

// check if positions can form interaction
if ( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2) )
if (energy.areComplementary(i1,i2) )
{
// no LP allowed
if (outConstraint.noLP) {
// check if right-side stacking of (i1,i2) is possible
if ( i1+noLpShift < energy.size1()
&& i2+noLpShift < energy.size2()
&& energy.isAccessible1(i1+noLpShift)
&& energy.isAccessible2(i2+noLpShift)
&& energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
// get stacking term to avoid recomputation
Expand Down
6 changes: 1 addition & 5 deletions src/IntaRNA/PredictorMfe2dHeuristicSeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,14 @@ fillHybridE()
curCellEtotal = E_INF;

// check if positions can form interaction
if ( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2) )
if (energy.areComplementary(i1,i2) )
{

// no lp allowed
if (noLpShift != 0) {
// check if right-side stacking of (i1,i2) is possible
if ( i1+noLpShift < energy.size1()
&& i2+noLpShift < energy.size2()
&& energy.isAccessible1(i1+noLpShift)
&& energy.isAccessible2(i2+noLpShift)
&& energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
// get stacking term to avoid recomputation
Expand Down
16 changes: 4 additions & 12 deletions src/IntaRNA/PredictorMfe2dHeuristicSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,15 @@ fillHybridE_right( const size_t sj1, const size_t sj2

// skip if not accessible
// check if complementary
if ( energy.isAccessible1(j1)
&& energy.isAccessible2(j2)
&& sj1<j1
if (sj1<j1
&& sj2<j2
&& energy.areComplementary(j1,j2) )
{

// left-stacking of j if no-LP
if (outConstraint.noLP) {
// skip if no stacking possible
if ( !energy.areComplementary(j1-noLpShift,j2-noLpShift)
| !energy.isAccessible1(j1-noLpShift)
| !energy.isAccessible2(j2-noLpShift))
if (!energy.areComplementary(j1-noLpShift,j2-noLpShift))
{
continue;
}
Expand Down Expand Up @@ -242,18 +238,14 @@ fillHybridE_left( const size_t si1, const size_t si2 )
curMinE = (i1==si1 && i2==si2) ? energy.getE_init() : E_INF;
// skip if not accessible
// check if complementary
if (energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& i1<si1
if (i1<si1
&& i2<si2
&& energy.areComplementary(i1,i2) )
{
// left-stacking of j if no-LP
if (outConstraint.noLP) {
// skip if no stacking possible
if ( !energy.areComplementary(i1+noLpShift,i2+noLpShift)
| !energy.isAccessible1(i1+noLpShift)
| !energy.isAccessible2(i2+noLpShift))
if (!energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
continue;
}
Expand Down
8 changes: 2 additions & 6 deletions src/IntaRNA/PredictorMfe2dSeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ fillHybridE( const size_t j1, const size_t j2
hybridE_pq_seed(i1,i2) = E_INF;

// check if this cell is to be computed (!=E_INF)
if( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2))
if( energy.areComplementary(i1,i2))
{

// w2 = interaction width in seq2
Expand Down Expand Up @@ -184,9 +182,7 @@ fillHybridE( const size_t j1, const size_t j2
} else {
// no lp allowed
// check if right-side stacking of (i1,i2) is possible
if (energy.isAccessible1(i1+noLpShift)
&& energy.isAccessible2(i2+noLpShift)
&& energy.areComplementary(i1+noLpShift,i2+noLpShift))
if (energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
// get stacking term to avoid recomputation
iStackE = energy.getE_interLeft(i1,i1+noLpShift,i2,i2+noLpShift);
Expand Down
16 changes: 4 additions & 12 deletions src/IntaRNA/PredictorMfe2dSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,15 @@ fillHybridE_left( const size_t si1, const size_t si2 )
curE = (i1==si1 && i2==si2) ? energy.getE_init() : E_INF;
// skip if not accessible
// check if complementary
if (energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& i1<si1
if (i1<si1
&& i2<si2
&& energy.areComplementary(i1,i2) )
{

// right-stacking of i if no-LP
if (outConstraint.noLP) {
// skip if no stacking possible
if ( !energy.areComplementary(i1+noLpShift,i2+noLpShift)
| !energy.isAccessible1(i1+noLpShift)
| !energy.isAccessible2(i2+noLpShift))
if (!energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
continue;
}
Expand Down Expand Up @@ -238,19 +234,15 @@ fillHybridE_right( const size_t sj1, const size_t sj2 )

// skip if not accessible
// check if complementary
if (energy.isAccessible1(j1)
&& energy.isAccessible2(j2)
&& sj1<j1
if (sj1<j1
&& sj2<j2
&& energy.areComplementary(j1,j2) )
{

// left-stacking of j if no-LP
if (outConstraint.noLP) {
// skip if no stacking possible
if (!energy.areComplementary(j1-noLpShift,j2-noLpShift)
| !energy.isAccessible1(j1-noLpShift)
| !energy.isAccessible2(j2-noLpShift))
if (!energy.areComplementary(j1-noLpShift,j2-noLpShift))
{
continue;
}
Expand Down
12 changes: 2 additions & 10 deletions src/IntaRNA/PredictorMfe2dSeedExtensionRIblast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ parallelExtension( PredictorMfe2dSeedExtensionRIblast::ExtendedSeed & seed
// extend left
while (seed.i1 > 1 && seed.i2 > 1) {
// todo acc1/acc2 maxLength() termination
if (energy.isAccessible1(seed.i1-1)
&& energy.isAccessible2(seed.i2-1)
&& energy.areComplementary(seed.i1-1,seed.i2-1))
if (energy.areComplementary(seed.i1-1,seed.i2-1))
{
E_type newEnergy = seed.energy + energy.getE_interLeft(seed.i1-1,i1min,seed.i2-1,i2min);
if (newEnergy < seed.energy) {
Expand All @@ -190,9 +188,7 @@ parallelExtension( PredictorMfe2dSeedExtensionRIblast::ExtendedSeed & seed
// extend right
while (seed.j1 < max_extension1-1 && seed.j2 < max_extension2-1) {
// todo acc1/acc2 maxLength() termination
if (energy.isAccessible1(seed.j1+1)
&& energy.isAccessible2(seed.j2+1)
&& energy.areComplementary(seed.j1+1,seed.j2+1))
if (energy.areComplementary(seed.j1+1,seed.j2+1))
{
E_type newEnergy = seed.energy + energy.getE_interLeft(j1min,seed.j1+1,j2min,seed.j2+1);
if (newEnergy < seed.energy) {
Expand Down Expand Up @@ -238,8 +234,6 @@ fillHybridE_left( const size_t j1, const size_t j2 )
// check if complementary
if( i1>0
&& i2>0
&& energy.isAccessible1(j1-i1)
&& energy.isAccessible2(j2-i2)
&& energy.areComplementary(j1-i1,j2-i2) )
{
curMinE = E_INF;
Expand Down Expand Up @@ -299,8 +293,6 @@ fillHybridE_right( const size_t i1, const size_t i2 )
// check if complementary
if( j1>i1
&& j2>i2
&& energy.isAccessible1(i1+j1)
&& energy.isAccessible2(i2+j2)
&& energy.areComplementary(i1+j1,i2+j2) )
{
curMinE = E_INF;
Expand Down
8 changes: 2 additions & 6 deletions src/IntaRNA/PredictorMfeEns2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ fillHybridZ( const size_t j1, const size_t j2
hybridZ(i1,i2) = Z_type(0.0);

// check if this cell is to be computed (!=E_INF)
if( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2)
if( energy.areComplementary(i1,i2)
)
{
// w2 = interaction width in seq2
Expand Down Expand Up @@ -159,9 +157,7 @@ fillHybridZ( const size_t j1, const size_t j2
} else {
// no lp allowed
// check if right-side stacking of (i1,i2) is possible
if (energy.isAccessible1(i1+noLpShift)
&& energy.isAccessible2(i2+noLpShift)
&& energy.areComplementary(i1+noLpShift,i2+noLpShift))
if (energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
// get stacking term to avoid recomputation
iStackZ = energy.getBoltzmannWeight(energy.getE_interLeft(i1,i1+noLpShift,i2,i2+noLpShift));
Expand Down
6 changes: 1 addition & 5 deletions src/IntaRNA/PredictorMfeEns2dHeuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,13 @@ fillHybridZ()
curCellEtotal = E_INF;

// check if positions can form interaction
if ( energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2) )
if (energy.areComplementary(i1,i2) )
{
// no lp allowed
if (noLpShift != 0) {
// check if right-side stacking of (i1,i2) is possible
if ( i1+noLpShift < energy.size1()
&& i2+noLpShift < energy.size2()
&& energy.isAccessible1(i1+noLpShift)
&& energy.isAccessible2(i2+noLpShift)
&& energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
// get stacking term to avoid recomputation
Expand Down
12 changes: 2 additions & 10 deletions src/IntaRNA/PredictorMfeEns2dSeedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,13 @@ fillHybridZ_left( const size_t si1, const size_t si2 )
// check if complementary (use global sequence indexing)
if( i1<si1
&& i2<si2
&& energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2) )
{

// right-stacking of i if no-LP
if (outConstraint.noLP) {
// skip if no stacking possible
if (!energy.areComplementary(i1+noLpShift,i2+noLpShift)
| !energy.isAccessible1(i1+noLpShift)
| !energy.isAccessible2(i2+noLpShift) )
if (!energy.areComplementary(i1+noLpShift,i2+noLpShift))
{
continue;
}
Expand Down Expand Up @@ -376,17 +372,13 @@ fillHybridZ_right( const size_t sj1, const size_t sj2 )
// check if complementary free base pair
if( sj1<j1
&& sj2<j2
&& energy.isAccessible1(j1)
&& energy.isAccessible2(j2)
&& energy.areComplementary(j1,j2) )
{

// left-stacking of j if no-LP
if (outConstraint.noLP) {
// skip if no stacking possible
if (!energy.areComplementary(j1-noLpShift,j2-noLpShift)
| !energy.isAccessible1(j1-noLpShift)
| !energy.isAccessible2(j2-noLpShift) )
if (!energy.areComplementary(j1-noLpShift,j2-noLpShift))
{
continue;
}
Expand Down
2 changes: 0 additions & 2 deletions src/IntaRNA/SeedHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ isFeasibleSeedBasePair( const size_t i1, const size_t i2, const bool atEndOfSeed
{

return i1 < energy.size1() && i2 < energy.size2()
&& energy.isAccessible1(i1)
&& energy.isAccessible2(i2)
&& energy.areComplementary(i1,i2)
&& seedConstraint.getMaxED() >= energy.getED1( i1,i1 )
&& seedConstraint.getMaxED() >= energy.getED2( i2,i2 )
Expand Down
Loading
Loading