#include <Interaction.h>
|
| typedef std::vector< BasePair > | PairingVec |
| | type of a vector encoding base pair indices that are interacting
|
| |
| typedef std::set< Seed > | SeedSet |
| | type of a vector containing seeds
|
| |
|
| template<typename bpIterator > |
| static std::string | dotSomething (bpIterator bpBegin, const bpIterator bpEnd, const bool handleSeq1, const char bpSymbol) |
| |
Data structure to describe and store an Interaction
◆ PairingVec
type of a vector encoding base pair indices that are interacting
◆ SeedSet
type of a vector containing seeds
◆ Interaction() [1/3]
construction
- Parameters
-
| s1 | the sequence of the first interaction partner |
| s2 | the sequence of the second interaction partner |
◆ Interaction() [2/3]
| IntaRNA::Interaction::Interaction |
( |
const Interaction & |
toCopy | ) |
|
|
inline |
copy construction from interaction
- Parameters
-
| toCopy | the interaction range to make this a copy of |
◆ Interaction() [3/3]
construction from interaction range, ie. forming base pairs at the beginning and end of the interaction range.
NOTE: the ends have to be complementary nucleotides
- Parameters
-
| range | the interaction range to be used for initialization |
◆ ~Interaction()
| IntaRNA::Interaction::~Interaction |
( |
| ) |
|
|
inlinevirtual |
◆ clear()
| void IntaRNA::Interaction::clear |
( |
| ) |
|
|
inline |
Clears all interaction information.
◆ compareEnergy()
| bool IntaRNA::Interaction::compareEnergy |
( |
const E_type & |
energy, |
|
|
const Interaction & |
hasLargerE |
|
) |
| |
|
inlinestatic |
Compares if an interaction has larger energy that a given value
- Parameters
-
| energy | the energy to compare to |
| hasLargerE | the interaction that is supposed to have larger energy |
- Returns
- (energy < (hasLargerE.energy-precisionDelta))
◆ dotBar()
| static std::string IntaRNA::Interaction::dotBar |
( |
const Interaction & |
i, |
|
|
const bool |
fullLength = false |
|
) |
| |
|
static |
Produces a dot-bar encoding of the interaction in the form
startId1 dot-bar-1 & startId2 dot-bar-2
where dot-bar-1/2 encodes all positions of the first/second sequence enclosed by the first and last base pair of the interaction. Here, a '|' bar encodes an intermolecular base pair and a '.' dot encodes unpaired positions.
Note, within this encoding, the '&' separated parts can be swapped if needed yielding still a valid encoding (for the swapped sequences).
- Parameters
-
| i | interaction to encode |
| fullLength | whether or not full length base pair annotation is to be printed |
- Returns
- the dot-bracket encoding
◆ dotBracket()
| static std::string IntaRNA::Interaction::dotBracket |
( |
const Interaction & |
i, |
|
|
const char |
symOpen = '(', |
|
|
const char |
symClose = ')', |
|
|
const bool |
fullLength = false |
|
) |
| |
|
static |
Produces a dot-bracket encoding of the interaction in VRNA style in the form
dot-bracket-1 & dot-bracket-2
where dot-bracket-1/2 encodes all positions of the first/second sequence enclosed by the first and last base pair of the interaction. In dot-bracket-1, a closing '(' parenthesis encodes an intermolecular base pair and a '.' dot encodes unpaired positions. In dot-bracket-2, closing ')' parentheses are used to mark base pairs.
- Parameters
-
| i | interaction to encode |
| symOpen | the symbol to be used for base pairs in dot-bracket-1 |
| symClose | the symbol to be used for base pairs in dot-bracket-2 |
| fullLength | whether or not full length base pair annotation is to be printed |
- Returns
- the VRNA-styled dot-bracket encoding
◆ dotSomething()
template<typename bpIterator >
| std::string IntaRNA::Interaction::dotSomething |
( |
bpIterator |
bpBegin, |
|
|
const bpIterator |
bpEnd, |
|
|
const bool |
handleSeq1, |
|
|
const char |
bpSymbol |
|
) |
| |
|
inlinestaticprotected |
◆ getSeedRanges1()
Compiles the list of ranges in seq1 covered by seeds.
- Returns
- the list of ranges covered by seeds in seq1
◆ getSeedRanges2()
Compiles the list of ranges in seq2 covered by seeds.
- Returns
- the list of ranges covered by seeds in seq2
◆ isEmpty()
| bool IntaRNA::Interaction::isEmpty |
( |
| ) |
const |
|
inline |
Checks whether or not the interaction contains no base pairs.
- Returns
- true if the interaction encodes no base pair; false otherwise
◆ isValid()
| bool IntaRNA::Interaction::isValid |
( |
| ) |
const |
checks whether or not the current interaction is non-empty, nested and sorted.
- Returns
- true if the interaction encoding is non-empty, nested and sorted; false otherwise
◆ operator<()
| bool IntaRNA::Interaction::operator< |
( |
const Interaction & |
i | ) |
const |
|
inline |
Checks whether or not this interaction is considered better (smaller) than another interaction of the same sequences
- Parameters
-
| i | the interaction to compare to (for the same sequences!) |
- Returns
- energy < i.energy || (energy == i.energy && bpLeft < i.bpLeft) || (energy == i.energy && bpLeft == i.bpLeft && bpRight < i.bpRight)
◆ operator=() [1/2]
Creates an interaction with one base pair for each interaction range boundary.
NOTE: the ends have to be complementary nucleotides
NOTE: the interaction energy is reset too.
- Parameters
-
| toCopy | the interaction to copy |
- Returns
- the altered object (*this)
◆ operator=() [2/2]
Creates an interaction with one base pair for each interaction range boundary.
NOTE: the ends have to be complementary nucleotides
NOTE: the interaction energy is reset too.
- Parameters
-
| range | the interaction range to copy |
- Returns
- the altered object (*this)
◆ operator==()
| bool IntaRNA::Interaction::operator== |
( |
const Interaction & |
i | ) |
const |
Checks whether or not this interaction equals another
- Parameters
-
| i | the interaction to compare to (for the same sequences!) |
- Returns
- (equal sequence pointers) && (same energy) && (same positions)
◆ setSeedRange()
| void IntaRNA::Interaction::setSeedRange |
( |
const BasePair |
bp_left, |
|
|
const BasePair |
bp_right, |
|
|
const E_type |
energy |
|
) |
| |
Sets the seedRange member according to the given data
- Parameters
-
| bp_left | left most base pair in seed |
| bp_right | right most base pair in seed |
| energy | full energy of the seed interaction |
◆ sort()
| void IntaRNA::Interaction::sort |
( |
| ) |
|
|
inline |
Sorts the stored interacting base pairs.
◆ operator<< [1/3]
| std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const BasePair & |
bp |
|
) |
| |
|
friend |
Prints the interacting base pair to stream
- Parameters
-
| out | the ostream to write to |
| bp | the Interaction base pair object to add |
- Returns
- the altered stream out
◆ operator<< [2/3]
| std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const Boundary & |
b |
|
) |
| |
|
friend |
Prints the interaction boundary to stream
- Parameters
-
| out | the ostream to write to |
| b | the Boundary object to add |
- Returns
- the altered stream out
◆ operator<< [3/3]
| std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const Interaction & |
i |
|
) |
| |
|
friend |
Prints the interacting base pairs to stream
- Parameters
-
| out | the ostream to write to |
| i | the Interaction object to add |
- Returns
- the altered stream out
◆ basePairs
◆ energy
| E_type IntaRNA::Interaction::energy |
energy of the interaction
◆ s1
the first interaction partner
◆ s2
the second interaction partner
◆ seed
| SeedSet* IntaRNA::Interaction::seed |
optional: seed information
The documentation for this class was generated from the following file: