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

#include <SeedHandlerExplicit.h>

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

Classes

class  SeedData
 

Public Member Functions

 SeedHandlerExplicit (const InteractionEnergy &energy, const SeedConstraint &seedConstraint)
 
virtual ~SeedHandlerExplicit ()
 
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 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
 
- Public Member Functions inherited from IntaRNA::SeedHandler
 SeedHandler (const InteractionEnergy &energy, const SeedConstraint &seedConstraint)
 
virtual ~SeedHandler ()
 
virtual const SeedConstraint & getConstraint () const
 
virtual const InteractionEnergy & getInteractionEnergy () 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
 

Static Public Member Functions

static std::string checkSeedEncoding (const std::string &seed)
 
static size_t getSeedMinBP (const std::string &seedEncoding)
 

Protected Attributes

boost::unordered_map< Interaction::BasePair, SeedData, Interaction::BasePair::Hash > seedForLeftEnd
 container to store
 
- Protected Attributes inherited from IntaRNA::SeedHandler
const InteractionEnergy & energy
 the used energy function
 
const SeedConstraint & seedConstraint
 the seed constraint to be applied
 

Detailed Description

Enables the explicit definition of possible seed interactions.

Only the provided seeds will be considered for interaction prediction.

Constructor & Destructor Documentation

◆ SeedHandlerExplicit()

IntaRNA::SeedHandlerExplicit::SeedHandlerExplicit ( const InteractionEnergy &  energy,
const SeedConstraint &  seedConstraint 
)

Construction

Parameters
energythe energy function to be used for seed prediction
seedConstraintthe seed constraint to be applied that contains the explicit seed encodings

◆ ~SeedHandlerExplicit()

virtual IntaRNA::SeedHandlerExplicit::~SeedHandlerExplicit ( )
virtual

destruction

Member Function Documentation

◆ checkSeedEncoding()

static std::string IntaRNA::SeedHandlerExplicit::checkSeedEncoding ( const std::string &  seed)
static

checks whether or not a given explicit seed encoding is valid or not

Parameters
seedthe seed encoding to check
Returns
an empty string for valid encodings; or an error description otherwise

◆ fillSeed()

virtual size_t IntaRNA::SeedHandlerExplicit::fillSeed ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2 
)
virtual

Computes the seed information 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
the number of potential seed interactions

Implements IntaRNA::SeedHandler.

◆ getSeedE()

virtual E_type IntaRNA::SeedHandlerExplicit::getSeedE ( const size_t  i1,
const size_t  i2 
) const
virtual

Access to the energy of a seed with left-most base pair (i1,i2)

Parameters
i1the left most interacting base of seq1
i2the left most interacting base of seq2
Returns
the energy of a seed starting at (i1,i2) or E_INF if none possible

Implements IntaRNA::SeedHandler.

◆ getSeedLength1()

virtual size_t IntaRNA::SeedHandlerExplicit::getSeedLength1 ( const size_t  i1,
const size_t  i2 
) const
virtual

Access to the length in seq1 of the seed 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 seed starting at (i1,i2) or 0 if none possible

Implements IntaRNA::SeedHandler.

◆ getSeedLength2()

virtual size_t IntaRNA::SeedHandlerExplicit::getSeedLength2 ( const size_t  i1,
const size_t  i2 
) const
virtual

Access to the length in seq2 of the seed 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 seed starting at (i1,i2) or 0 if none possible

Implements IntaRNA::SeedHandler.

◆ getSeedMinBP()

static size_t IntaRNA::SeedHandlerExplicit::getSeedMinBP ( const std::string &  seedEncoding)
static

parses the given explicit seed encoding for the minimal number of base pairs within any of the encoded seed

Parameters
seedEncodingthe explicit seed encoding to parse
Returns
the minimal number of base pairs among all encoded seeds

◆ isSeedBound()

virtual bool IntaRNA::SeedHandlerExplicit::isSeedBound ( const size_t  i1,
const size_t  i2 
) const
virtual

Checks whether or not a given base pair is the left-most base pair of any seed

Parameters
i1the interacting base of seq1
i2the interacting base of seq2
Returns
true if (i1,i2) is the left most base pair of some seed; false otherwise

Implements IntaRNA::SeedHandler.

◆ traceBackSeed()

virtual void IntaRNA::SeedHandlerExplicit::traceBackSeed ( Interaction &  interaction,
const size_t  i1,
const size_t  i2 
) const
virtual

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

NOTE: the left- and right-most base pair is excluded!

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

Implements IntaRNA::SeedHandler.

◆ updateToNextSeed()

virtual bool IntaRNA::SeedHandlerExplicit::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

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
i1seq1 seed index to be changed
i2seq2 seed index to be changed
i1minfirst position within seq1 (inclusive)
i1maxlast position within seq1 (inclusive)
i2minfirst position within seq2 (inclusive)
i2maxlast position within seq2 (inclusive)
Returns
true if the input variables have been changed; false otherwise

Reimplemented from IntaRNA::SeedHandler.

Member Data Documentation

◆ seedForLeftEnd

boost::unordered_map< Interaction::BasePair, SeedData, Interaction::BasePair::Hash > IntaRNA::SeedHandlerExplicit::seedForLeftEnd
protected

container to store


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