IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IntaRNA::HelixHandlerUnpaired Class Reference

#include <HelixHandlerUnpaired.h>

Inheritance diagram for IntaRNA::HelixHandlerUnpaired:
Inheritance graph
[legend]
Collaboration diagram for IntaRNA::HelixHandlerUnpaired:
Collaboration graph
[legend]

Public Types

typedef boost::multi_array< std::pair< E_type, size_t >, 3 > HelixRecMatrix
 
typedef boost::array< HelixRecMatrix::index, 3 > HelixIndex
 
typedef Matrix< std::tuple< E_type, size_t, size_t > > HelixMatrix
 
typedef Matrix< std::pair< E_type, size_t > > HelixSeedMatrix
 

Public Member Functions

 HelixHandlerUnpaired (const InteractionEnergy &energy, const HelixConstraint &helixConstraint, SeedHandler *const seedHandler=NULL)
 
virtual ~HelixHandlerUnpaired ()
 
virtual const HelixConstraint & getConstraint () const
 
virtual const InteractionEnergy & getInteractionEnergy () const
 
virtual size_t fillHelix (const size_t i1, const size_t j1, const size_t i2, const size_t j2)
 
virtual size_t fillHelixSeed (const size_t i1, const size_t j1, const size_t i2, const size_t j2)
 
virtual void traceBackHelix (Interaction &interaction, const size_t i1, const size_t i2)
 
virtual void traceBackHelixSeed (Interaction &interaction, const size_t i1, const size_t i2)
 
virtual E_type getHelixE (const size_t i1, const size_t i2) const
 
virtual E_type getHelixSeedE (const size_t i1, const size_t i2) const
 
virtual size_t getHelixLength1 (const size_t i1, const size_t i2) const
 
virtual size_t getHelixLength2 (const size_t i1, const size_t i2) const
 
virtual size_t getHelixLength1 (const size_t i1, const size_t i2, const size_t bp) const
 
virtual size_t getHelixLength2 (const size_t i1, const size_t i2, const size_t bp) const
 
virtual size_t getHelixSeedLength1 (const size_t i1, const size_t i2) const
 
virtual size_t getHelixSeedLength2 (const size_t i1, const size_t i2) const
 
void setSeedHandler (SeedHandler &seedHandler)
 
- Public Member Functions inherited from IntaRNA::HelixHandler
 HelixHandler ()
 
virtual ~HelixHandler ()
 

Protected Member Functions

size_t getBestBP (const size_t i1, const size_t i2) const
 
E_type getHelixE (const size_t i1, const size_t i2, const size_t bp)
 
void setHelixPair (const size_t i1, const size_t i2, const size_t bp, const E_type E, const size_t length)
 
size_t encodeHelixLength (const size_t l1, const size_t l2) const
 
size_t decodeHelixLength1 (const size_t code) const
 
size_t decodeHelixLength2 (const size_t code) const
 
size_t encodeHelixSeedLength (const size_t l1, const size_t l2) const
 
size_t decodeHelixSeedLength1 (const size_t code) const
 
size_t decodeHelixSeedLength2 (const size_t code) const
 
void traceBackHelix (Interaction &interaction, const size_t i1, const size_t i2, const size_t bp)
 

Protected Attributes

const InteractionEnergy & energy
 the used energy function
 
const HelixConstraint & helixConstraint
 the helix constraint to be applied
 
HelixRecMatrix helixE_rec
 
HelixMatrix helix
 the helix mfe information for helix starting at (i1, i2)
 
HelixSeedMatrix helixSeed
 the helix mfe information for helix with seed starting at (i1, i2)
 
size_t offset1
 offset for seq1 indices for the current matrices
 
size_t offset2
 offset for seq2 indices for the current matrices
 
SeedHandler * seedHandler
 used seedHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from IntaRNA::HelixHandler
static HelixHandler * getHelixHandler (const InteractionEnergy &energy, const HelixConstraint &helixConstraint, SeedHandler *const seedHandler=NULL)
 

Detailed Description

Handler to provide helix interaction information that allows for minor interior loops with a constraint maximal number of unpaired bases (per loop)

Author
Rick Gelhausen

Member Typedef Documentation

◆ HelixIndex

typedef boost::array<HelixRecMatrix::index, 3> IntaRNA::HelixHandlerUnpaired::HelixIndex

defines the helix data {{ i1, i2, bp }} to acces elements of the HelixRecMatrix

◆ HelixMatrix

typedef Matrix< std::tuple<E_type, size_t, size_t> > IntaRNA::HelixHandlerUnpaired::HelixMatrix

matrix to store the helix information for each helix left side (i1, i2) it holds both the energy (first) as well as the length of the helix using the length combination of encodeHelixLength() The third entry is the bestBP, i.e. the optimal number of bases for this left boundary

◆ HelixRecMatrix

typedef boost::multi_array<std::pair<E_type, size_t>,3> IntaRNA::HelixHandlerUnpaired::HelixRecMatrix

3D matrix type to hold the mfe energies for helix interactions of the ranges i1..(i1+bpMax-1) and i2..(i2+bpMax-1), with i1,i2 = the start index of the helix in seq1/2 bp = the maximal number of base pairs within the helix (>=bpMin) using the index [i1][i2][bp] or a HelixIndex object

◆ HelixSeedMatrix

Constructor & Destructor Documentation

◆ HelixHandlerUnpaired()

IntaRNA::HelixHandlerUnpaired::HelixHandlerUnpaired ( const InteractionEnergy &  energy,
const HelixConstraint &  helixConstraint,
SeedHandler *const  seedHandler = NULL 
)
inline

Constructor

Parameters
energythe energy function to be used

◆ ~HelixHandlerUnpaired()

IntaRNA::HelixHandlerUnpaired::~HelixHandlerUnpaired ( )
inlinevirtual

destructor

Member Function Documentation

◆ decodeHelixLength1()

size_t IntaRNA::HelixHandlerUnpaired::decodeHelixLength1 ( const size_t  code) const
inlineprotected

Decodes the length of the helix within sequence 1 from an encoding generated with encodeHelixLength()

Parameters
codethe lengths encoding
Returns
the length of the helix in seq1

◆ decodeHelixLength2()

size_t IntaRNA::HelixHandlerUnpaired::decodeHelixLength2 ( const size_t  code) const
inlineprotected

Decodes the length of the helix within sequence 2 from an encoding generated with encodeHelixLength()

Parameters
codethe lengths encoding
Returns
the length of the helix in seq2

◆ decodeHelixSeedLength1()

size_t IntaRNA::HelixHandlerUnpaired::decodeHelixSeedLength1 ( const size_t  code) const
inlineprotected

Decodes the length of the seed within sequence 1 from an encoding generated with encodeHelixSeedLength()

Parameters
codethe lengths encoding
Returns
the length of the seed in seq1

◆ decodeHelixSeedLength2()

size_t IntaRNA::HelixHandlerUnpaired::decodeHelixSeedLength2 ( const size_t  code) const
inlineprotected

Decodes the length of the seed within sequence 2 from an encoding generated with encodeHelixSeedLength()

Parameters
codethe lengths encoding
Returns
the length of the seed in seq2

◆ encodeHelixLength()

size_t IntaRNA::HelixHandlerUnpaired::encodeHelixLength ( const size_t  l1,
const size_t  l2 
) const
inlineprotected

Encodes the helix lengths into one number

Parameters
l1the length of the helix in seq1
l2the length of the helix in seq2
Returns
the combined encoding = (l1 + l2*(max_l1+1))

◆ encodeHelixSeedLength()

size_t IntaRNA::HelixHandlerUnpaired::encodeHelixSeedLength ( const size_t  l1,
const size_t  l2 
) const
inlineprotected

Encodes the seed lengths into one number

Parameters
l1the length of the seed in seq1
l2the length of the seed in seq2
Returns
the combined encoding = (l1 + l2*(max_l1+1))

◆ fillHelix()

virtual size_t IntaRNA::HelixHandlerUnpaired::fillHelix ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2 
)
virtual

Compute the helix matrix for the given interval boundaries

Parameters
i1the first index of seq1 that might interact
j1the last index of seq1 that might interact
i2the first index of seq2 that might interact
j2the last index of seq2 that might interact
Returns

Implements IntaRNA::HelixHandler.

◆ fillHelixSeed()

virtual size_t IntaRNA::HelixHandlerUnpaired::fillHelixSeed ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2 
)
virtual

Computes the helix information for the given interval boundaries for helices containing a seed

Parameters
i1the first index of seq1 that might interact
j1the last index of seq1 that might interact
i2the first index of seq2 that might interact
j2the last index of seq2 that might interact
Returns
the number of potential helix interactions

Implements IntaRNA::HelixHandler.

◆ getBestBP()

size_t IntaRNA::HelixHandlerUnpaired::getBestBP ( const size_t  i1,
const size_t  i2 
) const
inlineprotected
Parameters
i1the helix left end in seq 1 (index including offset)
i2the helix left end in seq 2 (index including offset)
Returns
get optimal number of bases for this left boundary

◆ getConstraint()

const HelixConstraint & IntaRNA::HelixHandlerUnpaired::getConstraint ( ) const
inlinevirtual

Access to the underlying helix constraint

Returns
the used helix constraint

Implements IntaRNA::HelixHandler.

◆ getHelixE() [1/2]

E_type IntaRNA::HelixHandlerUnpaired::getHelixE ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Access to the mfe of any helix with left-most base pair (i1, i2)

Parameters
i1the left most interaction base of seq1
i2the left most interaction base of seq2
Returns
the mfe of any helix starting at (i1,i2) or E_INF if none possible

Implements IntaRNA::HelixHandler.

◆ getHelixE() [2/2]

E_type IntaRNA::HelixHandlerUnpaired::getHelixE ( const size_t  i1,
const size_t  i2,
const size_t  bp 
)
inlineprotected

Provides the helix energy during recursion

Parameters
i1the helix left end in seq 1 (index including offset)
i2the helix left end in seq 2 (index including offset)
bpthe number of base pairs
u1the number of unpaired bases within seq 1
u2the number of unpaired bases within seq 2
Returns
the energy of the according helix

◆ getHelixLength1() [1/2]

size_t IntaRNA::HelixHandlerUnpaired::getHelixLength1 ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Access to the length in seq1 of the mfe helix with left-most base pair (i1,i2)

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
Returns
the length in seq1 of the mfe helix starting at (i1,i2) or 0 if none possible

Implements IntaRNA::HelixHandler.

◆ getHelixLength1() [2/2]

size_t IntaRNA::HelixHandlerUnpaired::getHelixLength1 ( const size_t  i1,
const size_t  i2,
const size_t  bp 
) const
inlinevirtual

Access to the length in seq1 of the mfe helix with left-most base pair (i1,i2)

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
bpthe number of base pairs allowed
Returns
the length in seq1 of the mfe helix starting at (i1,i2) or 0 if none possible

◆ getHelixLength2() [1/2]

size_t IntaRNA::HelixHandlerUnpaired::getHelixLength2 ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Access to the length in seq2 of the mfe helix with left-most base pair (i1,i2)

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
Returns
the length in seq2 of the mfe helix starting at (i1,i2) or 0 if none possible

Implements IntaRNA::HelixHandler.

◆ getHelixLength2() [2/2]

size_t IntaRNA::HelixHandlerUnpaired::getHelixLength2 ( const size_t  i1,
const size_t  i2,
const size_t  bp 
) const
inlinevirtual

Access to the length in seq2 of the mfe helix with left-most base pair (i1,i2)

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
bpthe number of base pairs allowed
Returns
the length in seq2 of the mfe helix starting at (i1,i2) or 0 if none possible

◆ getHelixSeedE()

E_type IntaRNA::HelixHandlerUnpaired::getHelixSeedE ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Access to the mfe of any helix with left-most base pair (i1,i2)

Parameters
i1the left most interacting base of seq1
i2the left most interaction base of seq2
Returns
the mfe of any heli starting at (i1,i2) or E_INF if none possible

Implements IntaRNA::HelixHandler.

◆ getHelixSeedLength1()

size_t IntaRNA::HelixHandlerUnpaired::getHelixSeedLength1 ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Access to the length in seq1 of the mfe helix with left-most base pair (i1,i2) containing a seed

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
Returns
the length in seq1 of the mfe helix starting at (i1,i2) or 0 if none possible

Implements IntaRNA::HelixHandler.

◆ getHelixSeedLength2()

size_t IntaRNA::HelixHandlerUnpaired::getHelixSeedLength2 ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Access to the length in seq2 of the mfe helix with left-most base pair (i1,i2) containing a seed

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
Returns
the length in seq2 of the mfe helix starting at (i1,i2) or 0 if none possible

Implements IntaRNA::HelixHandler.

◆ getInteractionEnergy()

const InteractionEnergy & IntaRNA::HelixHandlerUnpaired::getInteractionEnergy ( ) const
inlinevirtual

Access to the underlying interaction energy function

Returns
the used energy function

Implements IntaRNA::HelixHandler.

◆ setHelixPair()

void IntaRNA::HelixHandlerUnpaired::setHelixPair ( const size_t  i1,
const size_t  i2,
const size_t  bp,
const E_type  E,
const size_t  length 
)
inlineprotected

Fills the helix energy during recursion

Parameters
i1the helix left end in seq 1 (index including offset)
i2the helix left end in seq 2 (index including offset)
bpthe number of base pairs
u1the number of unpaired bases within seq 1
u2the number of unpaired bases within seq 2
Ethe energy value to be set

◆ setSeedHandler()

void IntaRNA::HelixHandlerUnpaired::setSeedHandler ( SeedHandler &  seedHandler)
inlinevirtual

Set the seedHandler in order to compute helixSeed

Parameters
seedHandlerseedHandler to be used in the helix computation

Implements IntaRNA::HelixHandler.

◆ traceBackHelix() [1/2]

void IntaRNA::HelixHandlerUnpaired::traceBackHelix ( Interaction &  interaction,
const size_t  i1,
const size_t  i2 
)
inlinevirtual

Identifies the base pairs of the mfe helix interaction starting at i1,i2 and writes them to the provided container

Note: the right most base pair is excluded!

Parameters
interactionthe container to add the base pairs too
i1the start of the helix in seq1
i2the start of the helix in seq2

Implements IntaRNA::HelixHandler.

◆ traceBackHelix() [2/2]

void IntaRNA::HelixHandlerUnpaired::traceBackHelix ( Interaction &  interaction,
const size_t  i1,
const size_t  i2,
const size_t  bp 
)
protected

Fills a given interaction with the according hybridizing base pairs of the provided helix interaction

Parameters
interactionIN/OUT the interaction to fill
i1the helix left end in seq 1 (index including offset)
i2the helix left end in seq 2 (index including offset)
bpthe number of base pairs (bestBP)
u1the number of unpaired bases within seq 1
u2the number of unpaired bases within seq 2

◆ traceBackHelixSeed()

virtual void IntaRNA::HelixHandlerUnpaired::traceBackHelixSeed ( Interaction &  interaction,
const size_t  i1,
const size_t  i2 
)
virtual

Identifies the base pairs of the mfe helix interaction starting at i1,i2 and writes them to the provided container

Note: the right most base pair is excluded!

Parameters
interactionthe container to add the base pairs too
i1the start of the helix in seq1
i2the start of the helix in seq2

Implements IntaRNA::HelixHandler.

Member Data Documentation

◆ energy

const InteractionEnergy& IntaRNA::HelixHandlerUnpaired::energy
protected

the used energy function

◆ helix

HelixMatrix IntaRNA::HelixHandlerUnpaired::helix
protected

the helix mfe information for helix starting at (i1, i2)

◆ helixConstraint

const HelixConstraint& IntaRNA::HelixHandlerUnpaired::helixConstraint
protected

the helix constraint to be applied

◆ helixE_rec

HelixRecMatrix IntaRNA::HelixHandlerUnpaired::helixE_rec
protected

the recursion data for the computation of a helix interaction bp: the number of bases i1..(i1+bp-1) and i2..(i2+bp-1) using the indexing [i1][i2][bp]

◆ helixSeed

HelixSeedMatrix IntaRNA::HelixHandlerUnpaired::helixSeed
protected

the helix mfe information for helix with seed starting at (i1, i2)

◆ offset1

size_t IntaRNA::HelixHandlerUnpaired::offset1
protected

offset for seq1 indices for the current matrices

◆ offset2

size_t IntaRNA::HelixHandlerUnpaired::offset2
protected

offset for seq2 indices for the current matrices

◆ seedHandler

SeedHandler* IntaRNA::HelixHandlerUnpaired::seedHandler
protected

used seedHandler


The documentation for this class was generated from the following file: