Generated on Tue Dec 16 12:50:11 2008 for BIU-2.2.0 by doxygen 1.5.1

biu::RNAStructure_TB Class Reference

#include <RNAStructure_TB.hh>

Inheritance diagram for biu::RNAStructure_TB:

Inheritance graph
[legend]

Detailed Description

An object of the class RNAStructure_TB represents a RNA as a BioMolecule.

An object of this class is allowed to have only 1- nested bonds 2- loop size greater than MIN_LOOP_LENGTH 3- certain matching base pairs -otherwise, isValid() returns false, and methods other than getSequenceString, getStructureString should not be called

both MS1 (insertion & deletion) and MS2 (shifting) are supported

the validity of a move should be ensured seperatly (using the corresponding method) befor performing the move.

Author:
Salem Dekelbab

Martin Mann

Definition at line 30 of file RNAStructure_TB.hh.

Public Member Functions

void decodeMoveIndex (size_t const index, size_t &i, size_t &j) const
void deleteBond (const size_t i, const size_t j)
void executeOrderedMove (size_t i, size_t j)
bool executeOrderedMoveTry (size_t const index)
bool executeOrderedMoveTry (size_t i, size_t j)
size_t getCorrespondingBase (size_t basePos) const
virtual double getEnergy () const
size_t getLength () const
size_t getMoveIndexCount () const
bool getNextSingleMove (size_t &i, size_t &j) const
Sequence getSequence () const
std::string getSequenceString () const
std::string getStringRepresentation () const
Structure getStructure () const
std::string getStructureString () const
const std::string & getStructureStringRef () const
bool hasValidBasePairs () const
bool hasValidLoopSize () const
bool hasValidStructure () const
void insertBond (const size_t i, const size_t j)
bool isAllowedBasePair (size_t pos1, size_t pos2) const
bool isValid () const
bool isValidDeleteMove (const size_t i, const size_t j) const
bool isValidInsertMove (const size_t i, const size_t j) const
bool isValidLeftShiftMove (const size_t i, const size_t j, const size_t k) const
bool isValidRightShiftMove (const size_t i, const size_t j, const size_t k) const
bool isValidShift (const size_t i, const size_t j) const
int isValidSingleMove (const size_t i, const size_t j) const
bool isValidUnorderedShift (const size_t i, const size_t j) const
void leftShift (const size_t i, const size_t j, const size_t k)
size_t moveType (size_t i, size_t j) const
bool operator!= (const RNAStructure_TB &rnaStruct2) const
RNAStructure_TBoperator= (const RNAStructure_TB &rnaStruct2)
bool operator== (const RNAStructure_TB &rnaStruct2) const
void rightShift (const size_t i, const size_t j, const size_t k)
 RNAStructure_TB (const RNAStructure_TB &rnaStruct)
 RNAStructure_TB (Sequence *rnaSeq, const Structure *const rnaStructBracketDot, const AllowedBasePairs *const bPair, const bool seqIsShared)
 RNAStructure_TB (const std::string &rnaSeqStr, const std::string &rnaStructBracketDotStr, const AllowedBasePairs *const bPair)
virtual void setStructure (const Structure &str)
void shiftToBond (const size_t i, const size_t j, const size_t k)
void shiftToBond (const size_t i, const size_t k)
void shiftUnordered (const size_t i, const size_t j)
virtual ~RNAStructure_TB ()

Static Public Member Functions

static const size_t getMinLoopLength ()
static const AlphabetgetStructureAlphabet ()

Static Public Attributes

static const size_t BASEPAIRS_VALIDITY
static const size_t BASEPAIRS_VALIDITY_CALCULATED
static const size_t DELETE_MOVE
static const size_t INSERT_MOVE
static const size_t INVALID_DELETE_MOVE
static const size_t INVALID_INDEX
static const size_t LOOPSIZE_VALIDITY
static const size_t LOOPSIZE_VALIDITY_CALCULATED
static const size_t REVERSE_SHIFT_MOVE
static const size_t SHIFT_MOVE
static const Alphabet::AlphElem STRUCT_BND_CLOSE
static const Alphabet::AlphElem STRUCT_BND_OPEN
static const Alphabet::AlphElem STRUCT_UNBOUND
static const size_t STRUCTURE_VALIDITY
static const size_t STRUCTURE_VALIDITY_CALCULATED

Protected Member Functions

bool areOnSameLevel (const size_t i, const size_t j) const
bool initTree (const Structure &str)
void setStringBrackets (const size_t i, const size_t j)

Protected Attributes

const AllowedBasePairsbPair
std::string bracketStructStr
SequencernaSeq
const bool seqShared
size_t strucStatus
std::vector< TreeItem > * validTreeStruc

Static Protected Attributes

static const size_t MIN_LOOP_LENGTH
static const Alphabet STRUCT_ALPH

Private Member Functions

std::string decodedStatus () const

Data Structures

class  TreeItem


Constructor & Destructor Documentation

biu::RNAStructure_TB::RNAStructure_TB ( const std::string &  rnaSeqStr,
const std::string &  rnaStructBracketDotStr,
const AllowedBasePairs *const  bPair 
)

Construction of an RNA molecule

Using this constructor no sequence sharing is possible.

Parameters:
rnaSeqStr is the RNA sequence
rnaStructBracketDotStr is the RNA structure in bracket notation.
bPair is the handler for the allowed base pairs.

Definition at line 51 of file RNAStructure_TB.cc.

biu::RNAStructure_TB::RNAStructure_TB ( Sequence rnaSeq,
const Structure *const  rnaStructBracketDot,
const AllowedBasePairs *const  bPair,
const bool  seqIsShared 
)

Construction of an RNA molecule

Parameters:
rnaSeq the RNA sequence representation
rnaStructBracketDot the RNA structure representation in bracket notation.
bPair is the handler for the allowed base pairs.
seqIsShared whether or not the rnaSeqStr representation should be shared among all derived objects of this class and no copy should be done

Definition at line 94 of file RNAStructure_TB.cc.

biu::RNAStructure_TB::RNAStructure_TB ( const RNAStructure_TB rnaStruct  ) 

Definition at line 128 of file RNAStructure_TB.cc.

biu::RNAStructure_TB::~RNAStructure_TB (  )  [virtual]

Definition at line 156 of file RNAStructure_TB.cc.


Member Function Documentation

bool biu::RNAStructure_TB::areOnSameLevel ( const size_t  i,
const size_t  j 
) const [protected]

std::string biu::RNAStructure_TB::decodedStatus (  )  const [private]

Definition at line 581 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::decodeMoveIndex ( size_t const   index,
size_t &  i,
size_t &  j 
) const

Definition at line 846 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::deleteBond ( const size_t  i,
const size_t  j 
)

Definition at line 469 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::executeOrderedMove ( size_t  i,
size_t  j 
)

Definition at line 715 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::executeOrderedMoveTry ( size_t const   index  ) 

Definition at line 928 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::executeOrderedMoveTry ( size_t  i,
size_t  j 
)

Definition at line 733 of file RNAStructure_TB.cc.

size_t biu::RNAStructure_TB::getCorrespondingBase ( size_t  basePos  )  const

Returns the corresponding closing/opening bond index to the given opening/closing index

Returns INVALID_INDEX in error case, if there doesnt exist a bond.

virtual double biu::RNAStructure_TB::getEnergy (  )  const [virtual]

DUMMY IMPLEMENTATION THAT ALWAYS RETURNS 0.0 !!!

Returns:
0.0

Implements biu::BioMolecule.

size_t biu::RNAStructure_TB::getLength (  )  const [virtual]

Returns the length of the Biomolecule, i.e. the number of monomers.

Implements biu::BioMolecule.

static const size_t biu::RNAStructure_TB::getMinLoopLength (  )  [static]

size_t biu::RNAStructure_TB::getMoveIndexCount (  )  const [inline]

Definition at line 934 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::getNextSingleMove ( size_t &  i,
size_t &  j 
) const

Calculates the next single move according to the internal order 'after' the currently given single move (i,j).

To get the FIRST allowed single move call this function with i set to INVALID_INDEX.

Parameters:
i IN/OUT the first position of the move to update
j IN/OUT the second position of the move to update (>=i)
Returns:
whether or not another move was found and the given new (i,j) is a valid move

Definition at line 766 of file RNAStructure_TB.cc.

Sequence biu::RNAStructure_TB::getSequence (  )  const [virtual]

Implements biu::BioMolecule.

std::string biu::RNAStructure_TB::getSequenceString (  )  const

std::string biu::RNAStructure_TB::getStringRepresentation (  )  const [virtual]

Returns a combination of bracket notation and sequence information of this RNA.

BRACKETNOTATION(SEQUENCE)

Implements biu::BioMolecule.

Structure biu::RNAStructure_TB::getStructure (  )  const [virtual]

Returns the RNA structure in bracket notation.

Implements biu::BioMolecule.

static const Alphabet* biu::RNAStructure_TB::getStructureAlphabet (  )  [static]

std::string biu::RNAStructure_TB::getStructureString (  )  const

const std::string& biu::RNAStructure_TB::getStructureStringRef (  )  const

bool biu::RNAStructure_TB::hasValidBasePairs (  )  const

Returns whether all RNA base pairs of an RNAStructure_TB object are valid.

Definition at line 305 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::hasValidLoopSize (  )  const

Returns whether all loops of an RNAStructure_TB object have at least a length of MIN_LOOP_LENGTH.

Definition at line 350 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::hasValidStructure (  )  const

Returns whether the RNA structure is in valid bracket notation (each opening has a closing bracket).

Definition at line 269 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::initTree ( const Structure str  )  [protected]

Initialises the bonds data structure. (called by setStructure).

Definition at line 507 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::insertBond ( const size_t  i,
const size_t  j 
)

Definition at line 454 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::isAllowedBasePair ( size_t  pos1,
size_t  pos2 
) const

Returns whether a base pair between positions first and second is valid.

bool biu::RNAStructure_TB::isValid (  )  const [virtual]

Returns true if an RNAStructure_TB object has a valid structure with valid base pairs and loops of a length of at least MIN_LOOP_LENGTH.

Implements biu::BioMolecule.

bool biu::RNAStructure_TB::isValidDeleteMove ( const size_t  i,
const size_t  j 
) const

bool biu::RNAStructure_TB::isValidInsertMove ( const size_t  i,
const size_t  j 
) const

Definition at line 380 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::isValidLeftShiftMove ( const size_t  i,
const size_t  j,
const size_t  k 
) const

Definition at line 417 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::isValidRightShiftMove ( const size_t  i,
const size_t  j,
const size_t  k 
) const

Definition at line 435 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::isValidShift ( const size_t  i,
const size_t  j 
) const

Definition at line 621 of file RNAStructure_TB.cc.

int biu::RNAStructure_TB::isValidSingleMove ( const size_t  i,
const size_t  j 
) const

Checks if the given base pair (i,j) represents a valid insertion or deletion of a base pair.

Returns:
0 if not valid, -1 if valid deletion, +1 if valid insertion

Definition at line 397 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::isValidUnorderedShift ( const size_t  i,
const size_t  j 
) const

Definition at line 597 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::leftShift ( const size_t  i,
const size_t  j,
const size_t  k 
)

Definition at line 489 of file RNAStructure_TB.cc.

size_t biu::RNAStructure_TB::moveType ( size_t  i,
size_t  j 
) const

Definition at line 696 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::operator!= ( const RNAStructure_TB rnaStruct2  )  const

RNAStructure_TB & biu::RNAStructure_TB::operator= ( const RNAStructure_TB rnaStruct2  ) 

Definition at line 170 of file RNAStructure_TB.cc.

bool biu::RNAStructure_TB::operator== ( const RNAStructure_TB rnaStruct2  )  const

Definition at line 210 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::rightShift ( const size_t  i,
const size_t  j,
const size_t  k 
)

Definition at line 498 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::setStringBrackets ( const size_t  i,
const size_t  j 
) [protected]

void biu::RNAStructure_TB::setStructure ( const Structure str  )  [virtual]

Sets the RNA structure in bracket notation.

Parameters:
str the structure to set in bracket notation of correct length

Definition at line 247 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::shiftToBond ( const size_t  i,
const size_t  j,
const size_t  k 
)

Definition at line 675 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::shiftToBond ( const size_t  i,
const size_t  k 
)

Definition at line 654 of file RNAStructure_TB.cc.

void biu::RNAStructure_TB::shiftUnordered ( const size_t  i,
const size_t  j 
)

Definition at line 640 of file RNAStructure_TB.cc.


Field Documentation

Definition at line 160 of file RNAStructure_TB.hh.

Definition at line 161 of file RNAStructure_TB.hh.

A pointer to a BasePair object containing the valid RNA base pairs

Definition at line 120 of file RNAStructure_TB.hh.

std::string biu::RNAStructure_TB::bracketStructStr [protected]

  • RNA structure in bracket notation string

Definition at line 137 of file RNAStructure_TB.hh.

const size_t biu::RNAStructure_TB::DELETE_MOVE [static]

Definition at line 173 of file RNAStructure_TB.hh.

const size_t biu::RNAStructure_TB::INSERT_MOVE [static]

Definition at line 169 of file RNAStructure_TB.hh.

Definition at line 172 of file RNAStructure_TB.hh.

const size_t biu::RNAStructure_TB::INVALID_INDEX [static]

Constant that represents a invalid structure index position.

Definition at line 156 of file RNAStructure_TB.hh.

Definition at line 162 of file RNAStructure_TB.hh.

Definition at line 163 of file RNAStructure_TB.hh.

const size_t biu::RNAStructure_TB::MIN_LOOP_LENGTH [static, protected]

Minimal length of an RNA loop.

Definition at line 104 of file RNAStructure_TB.hh.

Definition at line 171 of file RNAStructure_TB.hh.

RNA sequence.

Definition at line 131 of file RNAStructure_TB.hh.

const bool biu::RNAStructure_TB::seqShared [protected]

whether or not the rnaSeq pointer is shared

Definition at line 114 of file RNAStructure_TB.hh.

const size_t biu::RNAStructure_TB::SHIFT_MOVE [static]

Definition at line 170 of file RNAStructure_TB.hh.

size_t biu::RNAStructure_TB::strucStatus [mutable, protected]

Definition at line 127 of file RNAStructure_TB.hh.

const Alphabet biu::RNAStructure_TB::STRUCT_ALPH [static, protected]

The alphabet of the structure representation which contains the left and right parenthesis and a dot.

Definition at line 110 of file RNAStructure_TB.hh.

structure element encoding a bond closing position

Definition at line 150 of file RNAStructure_TB.hh.

structure element encoding a bond opening position

Definition at line 148 of file RNAStructure_TB.hh.

structure element encoding an unbound position

Definition at line 152 of file RNAStructure_TB.hh.

Definition at line 164 of file RNAStructure_TB.hh.

Definition at line 165 of file RNAStructure_TB.hh.

RNA structure, tree representation, NULL if structure is invalid.

Definition at line 141 of file RNAStructure_TB.hh.


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