#include <SeedHandlerIdxOffset.h>
|
| | SeedHandlerIdxOffset (SeedHandler *seedHandler, const bool deleteOnDestruction=true) |
| |
| virtual | ~SeedHandlerIdxOffset () |
| |
| size_t | getOffset1 () const |
| |
| void | setOffset1 (size_t offset1) |
| |
| size_t | getOffset2 () const |
| |
| void | setOffset2 (size_t offset2) |
| |
| virtual const SeedConstraint & | getConstraint () const |
| |
| virtual const InteractionEnergy & | getInteractionEnergy () const |
| |
| virtual size_t | fillSeed (const size_t i1, const size_t j1, const size_t i2, const size_t j2) |
| |
| virtual void | traceBackSeed (Interaction &interaction, const size_t i1, const size_t i2) const |
| |
| virtual E_type | getSeedE (const size_t i1, const size_t i2) const |
| |
| virtual bool | isSeedBound (const size_t i1, const size_t i2) const |
| |
| virtual size_t | getSeedLength1 (const size_t i1, const size_t i2) const |
| |
| virtual size_t | getSeedLength2 (const size_t i1, const size_t i2) const |
| |
| virtual SeedHandler & | getOriginalSeedHandler () |
| |
| virtual bool | updateToNextSeed (size_t &i1, size_t &i2, const size_t i1min=0, const size_t i1max=RnaSequence::lastPos, const size_t i2min=0, const size_t i2max=RnaSequence::lastPos) const |
| |
| virtual void | addSeeds (Interaction &i) const |
| |
| virtual bool | areLoopOverlapping (const size_t i1, const size_t i2, const size_t k1, const size_t k2) const |
| |
| virtual bool | isFeasibleSeedBasePair (const size_t i1, const size_t i2, const bool atEndOfSeed=false) const |
| |
Public Member Functions inherited from IntaRNA::SeedHandler |
| | SeedHandler (const InteractionEnergy &energy, const SeedConstraint &seedConstraint) |
| |
| virtual | ~SeedHandler () |
| |
Wrapper around a SeedHandler object where indices are shifted by a given positive offset (shifted towards infinity). This is useful for local interaction computations.
- Author
- Martin Mann
◆ SeedHandlerIdxOffset()
| IntaRNA::SeedHandlerIdxOffset::SeedHandlerIdxOffset |
( |
SeedHandler * |
seedHandler, |
|
|
const bool |
deleteOnDestruction = true |
|
) |
| |
|
inline |
Construction
- Parameters
-
| seedHandler | the seed handler to be wrapped |
| deleteOnDestruction | whether or not the seedHandler is to be deleted within the destructor |
◆ ~SeedHandlerIdxOffset()
| IntaRNA::SeedHandlerIdxOffset::~SeedHandlerIdxOffset |
( |
| ) |
|
|
inlinevirtual |
destruction of this object and the wrapped seed handler
◆ addSeeds()
| void IntaRNA::SeedHandlerIdxOffset::addSeeds |
( |
Interaction & |
i | ) |
const |
|
inlinevirtual |
Adds all seeds to a given interaction that are completely covered by its base pairs.
- Parameters
-
| i | the interaction to update with indexing in global in-sequence order |
Reimplemented from IntaRNA::SeedHandler.
◆ areLoopOverlapping()
| bool IntaRNA::SeedHandlerIdxOffset::areLoopOverlapping |
( |
const size_t |
i1, |
|
|
const size_t |
i2, |
|
|
const size_t |
k1, |
|
|
const size_t |
k2 |
|
) |
| const |
|
inlinevirtual |
Checks whether or not two seeds are loop overlapping, ie. given i1 < k1, the last x (>1) base pairs of seed(i1,i2) are equal to the first x base pairs of seed(k1,k2), or vice versa if k1 < i1.
- Parameters
-
| i1 | the left most interacting base of seq1 of seedA |
| i2 | the left most interacting base of seq2 of seedA |
| k1 | the left most interacting base of seq1 of seedB |
| k2 | the left most interacting base of seq2 of seedB |
- Returns
- true if seedA and seedB exist and they are loop overlapping; false otherwise
Reimplemented from IntaRNA::SeedHandler.
◆ fillSeed()
| size_t IntaRNA::SeedHandlerIdxOffset::fillSeed |
( |
const size_t |
i1, |
|
|
const size_t |
j1, |
|
|
const size_t |
i2, |
|
|
const size_t |
j2 |
|
) |
| |
|
inlinevirtual |
Computes the seed matrix for the given interval boundaries
Note, the indices are shifted by an offset for computation.
- Parameters
-
| i1 | the first index of seq1 that might interact |
| j1 | the last index of seq1 that might interact |
| i2 | the first index of seq2 that might interact |
| j2 | the last index of seq2 that might interact |
- Returns
- number of possible seed interactions
Implements IntaRNA::SeedHandler.
◆ getConstraint()
| const SeedConstraint & IntaRNA::SeedHandlerIdxOffset::getConstraint |
( |
| ) |
const |
|
inlinevirtual |
Access to the underlying seed constraint
- Returns
- the used seed constraint
Reimplemented from IntaRNA::SeedHandler.
◆ getInteractionEnergy()
| const InteractionEnergy & IntaRNA::SeedHandlerIdxOffset::getInteractionEnergy |
( |
| ) |
const |
|
inlinevirtual |
Access to the underlying interaction energy function
- Returns
- the used energy function
Reimplemented from IntaRNA::SeedHandler.
◆ getOffset1()
| size_t IntaRNA::SeedHandlerIdxOffset::getOffset1 |
( |
| ) |
const |
|
inline |
Access to the currently used index offset for sequence 1
- Returns
- the index offset for sequence 1 used
◆ getOffset2()
| size_t IntaRNA::SeedHandlerIdxOffset::getOffset2 |
( |
| ) |
const |
|
inline |
Access to the currently used index offset for sequence 2
- Returns
- the index offset for sequence 2 used
◆ getOriginalSeedHandler()
| SeedHandler & IntaRNA::SeedHandlerIdxOffset::getOriginalSeedHandler |
( |
| ) |
|
|
inlinevirtual |
◆ getSeedE()
| E_type IntaRNA::SeedHandlerIdxOffset::getSeedE |
( |
const size_t |
i1, |
|
|
const size_t |
i2 |
|
) |
| const |
|
inlinevirtual |
Access to the mfe of any seed with left-most base pair (i1,i2)
Note, the indices are shifted by an offset for computation.
- Parameters
-
| i1 | the left most interacting base of seq1 |
| i2 | the left most interacting base of seq2 |
- Returns
- the mfe of any seed starting at (i1,i2) or E_INF if none possible
Implements IntaRNA::SeedHandler.
◆ getSeedLength1()
| size_t IntaRNA::SeedHandlerIdxOffset::getSeedLength1 |
( |
const size_t |
i1, |
|
|
const size_t |
i2 |
|
) |
| const |
|
inlinevirtual |
Access to the length in seq1 of the mfe seed with left-most base pair (i1,i2)
Note, the indices are shifted by an offset for computation.
- Parameters
-
| i1 | the left most interacting base of seq1 |
| i2 | the left most interacting base of seq2 |
- Returns
- the length in seq1 of the mfe seed starting at (i1,i2) or 0 if none possible
Implements IntaRNA::SeedHandler.
◆ getSeedLength2()
| size_t IntaRNA::SeedHandlerIdxOffset::getSeedLength2 |
( |
const size_t |
i1, |
|
|
const size_t |
i2 |
|
) |
| const |
|
inlinevirtual |
Access to the length in seq2 of the mfe seed with left-most base pair (i1,i2)
Note, the indices are shifted by an offset for computation.
- Parameters
-
| i1 | the left most interacting base of seq1 |
| i2 | the left most interacting base of seq2 |
- Returns
- the length in seq2 of the mfe seed starting at (i1,i2) or 0 if none possible
Implements IntaRNA::SeedHandler.
◆ isFeasibleSeedBasePair()
| bool IntaRNA::SeedHandlerIdxOffset::isFeasibleSeedBasePair |
( |
const size_t |
i1, |
|
|
const size_t |
i2, |
|
|
const bool |
atEndOfSeed = false |
|
) |
| const |
|
inlinevirtual |
Checks whether or not a given index pair is a valid seed base pair
- Parameters
-
| i1 | the interacting base of seq1 |
| i2 | the interacting base of seq2 |
| atEndOfSeed | whether or not the (i1,i2) form the end of a seed |
- Returns
- true if (i1,i2) are complementary, ED(i,i) < maxED, and both i1 and i2 are in allowed regions; false otherwise
Reimplemented from IntaRNA::SeedHandler.
◆ isSeedBound()
| bool IntaRNA::SeedHandlerIdxOffset::isSeedBound |
( |
const size_t |
i1, |
|
|
const size_t |
i2 |
|
) |
| const |
|
inlinevirtual |
Checks whether or not a given base pair is the left-most base pair of any seed
- Parameters
-
| i1 | the interacting base of seq1 |
| i2 | the interacting base of seq2 |
- Returns
- true if (i1,i2) is the left most base pair of some seed; false otherwise
Implements IntaRNA::SeedHandler.
◆ setOffset1()
| void IntaRNA::SeedHandlerIdxOffset::setOffset1 |
( |
size_t |
offset1 | ) |
|
|
inline |
Sets the index offset to be used for sequence 1
- Parameters
-
| offset1 | the index offset for sequence 1 to be used |
◆ setOffset2()
| void IntaRNA::SeedHandlerIdxOffset::setOffset2 |
( |
size_t |
offset2 | ) |
|
|
inline |
Sets the index offset to be used for sequence 2
- Parameters
-
| offset2 | the index offset for sequence 2 to be used |
◆ traceBackSeed()
| void IntaRNA::SeedHandlerIdxOffset::traceBackSeed |
( |
Interaction & |
interaction, |
|
|
const size_t |
i1, |
|
|
const size_t |
i2 |
|
) |
| const |
|
inlinevirtual |
Identifies the base pairs of the mfe seed interaction starting at i1,i2 and writes them to the provided container
NOTE: the left- and right-most base pairs are excluded!
Note, the indices are shifted by an offset for computation.
- Parameters
-
| interaction | the container to add the base pairs too |
| i1 | the start of the seed in seq1 |
| i2 | the start of the seed in seq2 |
Implements IntaRNA::SeedHandler.
◆ updateToNextSeed()
| bool IntaRNA::SeedHandlerIdxOffset::updateToNextSeed |
( |
size_t & |
i1, |
|
|
size_t & |
i2, |
|
|
const size_t |
i1min = 0, |
|
|
const size_t |
i1max = RnaSequence::lastPos, |
|
|
const size_t |
i2min = 0, |
|
|
const size_t |
i2max = RnaSequence::lastPos |
|
) |
| const |
|
inlinevirtual |
Replace the input variables i1 and i2 to values to within the given range that correspond to
- the first seed (if the given index pair is no valid seed start or one of the indices is out of range bounds)
- the next seed according to some seed order
The indices are not updated if the last seed within the range is given or no seed within the range could be found. It returns whether or not the input variables have been updated.
Note, if changed, only the seed left-most base pair is within the range but the full seed indices might exceed i1max or i2max.
- Parameters
-
| i1 | seq1 seed index to be changed |
| i2 | seq2 seed index to be changed |
| i1min | first position within seq1 (inclusive) |
| i1max | last position within seq1 (inclusive) |
| i2min | first position within seq2 (inclusive) |
| i2max | last position within seq2 (inclusive) |
- Returns
- true if the input variables have been changed; false otherwise
Reimplemented from IntaRNA::SeedHandler.
◆ deleteOnDestruction
| const bool IntaRNA::SeedHandlerIdxOffset::deleteOnDestruction |
|
protected |
whether or not the original seed handler is to be destroyed
◆ energyIdxOffset
dedicated energy object to avoid
◆ idxOffset1
| size_t IntaRNA::SeedHandlerIdxOffset::idxOffset1 |
|
protected |
offset for indices in seq1
◆ idxOffset2
| size_t IntaRNA::SeedHandlerIdxOffset::idxOffset2 |
|
protected |
offset for indices in seq2
◆ seedConstraintOffset
the index shifted seed constraint
◆ seedHandlerOriginal
| SeedHandler* IntaRNA::SeedHandlerIdxOffset::seedHandlerOriginal |
|
protected |
the index shifted seed handler
The documentation for this class was generated from the following file: