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

#include <AccessibilityConstraint.h>

Collaboration diagram for IntaRNA::AccessibilityConstraint:
Collaboration graph
[legend]

Public Member Functions

 AccessibilityConstraint (const size_t length, const size_t maxBpSpan, const std::string &shapeFile, const std::string &shapeMethod, const std::string &shapeConversion)
 
 AccessibilityConstraint (const AccessibilityConstraint &toCopy, const bool reverseIndices=false)
 
 AccessibilityConstraint (const RnaSequence &seq, const std::string &dotBracket, const size_t maxBpSpan, const std::string &shapeFile, const std::string &shapeMethod, const std::string &shapeConversion)
 
virtual ~AccessibilityConstraint ()
 
bool isMarkedBlocked (const size_t i) const
 
bool isMarkedAccessible (const size_t i) const
 
bool isMarkedPaired (const size_t i) const
 
bool isUnconstrained (const size_t i) const
 
bool isAccessible (const size_t i) const
 
bool isEmpty () const
 
char getVrnaDotBracket (const size_t i) const
 
size_t getMaxBpSpan () const
 
const std::string & getShapeFile () const
 
const std::string & getShapeMethod () const
 
const std::string & getShapeConversion () const
 
AccessibilityConstraint & operator= (const AccessibilityConstraint &c)
 

Static Public Attributes

static const char dotBracket_unconstrained
 the marker for unconstrained positions in dot-bracket notation
 
static const char dotBracket_blocked
 the marker for blocked positions in dot-bracket notation
 
static const char dotBracket_accessible
 the marker for accessible positions in dot-bracket notation
 
static const char dotBracket_paired
 the marker for paired positions in dot-bracket notation
 
static const std::string dotBracket_constraints
 collection of all allowed encoding of constraints
 
static const std::string dotBracketAlphabet
 the alphabet to encode accessibility constraints in dot-bracket notation
 
static const std::string regionIndexList
 regular expression that encodes a single region encoding as index list
 
static const boost::regex regex
 the regular expression that marks a non-empty valid constraint encoding
 
static const boost::regex regexShapeMethod
 the regular expression to be matched by shapeMethod encodings
 
static const boost::regex regexShapeConversion
 the regular expression to be matched by shapeConversion encodings
 

Static Protected Member Functions

static void screenDotBracket (const std::string &dotBracket, const char marker, IndexRangeList &storage)
 

Protected Attributes

size_t length
 the overall sequence length this constraint is about
 
size_t maxBpSpan
 the maximal base pair span to be used for accessibility computation
 
std::string shapeFile
 filename of SHAPE reactivity data or empty if no SHAPE data to be used
 
std::string shapeMethod
 method for converting SHAPE reactivity data to pseudo energies
 
std::string shapeConversion
 method for conversion of SHAPE reactivity data to paired probabilities
 
IndexRangeList blocked
 sorted list of ranges that are marked as blocked
 
IndexRangeList accessible
 sorted list of ranges that are marked as accessible
 
IndexRangeList paired
 sorted list of ranges that are marked as paired (intramolecular)
 

Friends

std::ostream & operator<< (std::ostream &out, const AccessibilityConstraint &c)
 

Detailed Description

Represents the constraints for accessibility computation, ie. sequence regions that are known to be blocked (not available to interaction) or for sure accessible.

These constraints are than incorporated into the computation of the accessibility (ED) values to be used for interaction prediction.

Author
Martin Mann

Constructor & Destructor Documentation

◆ AccessibilityConstraint() [1/3]

IntaRNA::AccessibilityConstraint::AccessibilityConstraint ( const size_t  length,
const size_t  maxBpSpan,
const std::string &  shapeFile,
const std::string &  shapeMethod,
const std::string &  shapeConversion 
)
inline

Empty constraint construction

Parameters
lengthlength of the constrained sequence
maxBpSpanthe maximal base pair span to be used for accessibility computation; set to 0 for full sequence length
shapeFileif non-empty: name of the SHAPE reactivity data file to be used for accessibility computation
shapeMethodif non-empty: encoding of the method to be used to convert SHAPE reactivity data to pseudo energies
shapeConversionif non-empty: encoding of the method to be used to convert SHAPE reactivity data to pairing probabilities

◆ AccessibilityConstraint() [2/3]

IntaRNA::AccessibilityConstraint::AccessibilityConstraint ( const AccessibilityConstraint &  toCopy,
const bool  reverseIndices = false 
)
inline

Copy construction

Parameters
toCopythe constraint to copy
reverseIndiceswhether or not to reverse indexing (eg to be used for ReverseAccessibility)

◆ AccessibilityConstraint() [3/3]

IntaRNA::AccessibilityConstraint::AccessibilityConstraint ( const RnaSequence &  seq,
const std::string &  dotBracket,
const size_t  maxBpSpan,
const std::string &  shapeFile,
const std::string &  shapeMethod,
const std::string &  shapeConversion 
)

Constraint construction based on VRNA-like dot-bracket encoding

Parameters
seqthe constrained sequence
dotBracketthe constraint encoding in VRNA-like dot-bracket encoding
maxBpSpanthe maximal base pair span to be used for accessibility computation; set to 0 for full sequence length
shapeFileif non-empty: name of the SHAPE reactivity data file to be used for accessibility computation
shapeMethodif non-empty: encoding of the method to be used to convert SHAPE reactivity data to pseudo energies
shapeConversionif non-empty: encoding of the method to be used to convert SHAPE reactivity data to pairing probabilities

◆ ~AccessibilityConstraint()

IntaRNA::AccessibilityConstraint::~AccessibilityConstraint ( )
inlinevirtual

Member Function Documentation

◆ getMaxBpSpan()

size_t IntaRNA::AccessibilityConstraint::getMaxBpSpan ( ) const
inline

Provides the maximal base pair span to be considered for accessibility computation.

Returns
the maximal base pair span for accessibility computation

◆ getShapeConversion()

const std::string & IntaRNA::AccessibilityConstraint::getShapeConversion ( ) const
inline

Get method how to convert SHAPE reactivity data to pairing probabilities.

Returns
the encoding or an empty string if no SHAPE data available

◆ getShapeFile()

const std::string & IntaRNA::AccessibilityConstraint::getShapeFile ( ) const
inline

Get filename from where to read SHAPE reactivity data.

Returns
the filename or an empty string if no SHAPE data available

◆ getShapeMethod()

const std::string & IntaRNA::AccessibilityConstraint::getShapeMethod ( ) const
inline

Get method how to convert SHAPE reactivity data to pseudo energies.

Returns
the encoding or an empty string if no SHAPE data available

◆ getVrnaDotBracket()

char IntaRNA::AccessibilityConstraint::getVrnaDotBracket ( const size_t  i) const
inline

Provides the VRNA dot-bracket notation of the constraint for position i

Parameters
ithe position of interest
Returns
the VRNA conform constraint encoding for position i

◆ isAccessible()

bool IntaRNA::AccessibilityConstraint::isAccessible ( const size_t  i) const
inline

Checks whether or not a position is available for interaction

Parameters
ithe position of interest
Returns
true if the position i is available interaction; false otherwise

◆ isEmpty()

bool IntaRNA::AccessibilityConstraint::isEmpty ( ) const
inline

Checks whether or not any accessibility constraints (base pairs, blocked, accessible, etc.) are given

Returns
true if no structural constraints are present; false otherwise

◆ isMarkedAccessible()

bool IntaRNA::AccessibilityConstraint::isMarkedAccessible ( const size_t  i) const
inline

Checks whether or not a sequence position is marked as accessible or not

Parameters
ithe position of interest
Returns
true if position i is marked accessible

◆ isMarkedBlocked()

bool IntaRNA::AccessibilityConstraint::isMarkedBlocked ( const size_t  i) const
inline

Checks whether or not a sequence position is marked as blocked or not

Parameters
ithe position of interest
Returns
true if position i is marked blocked

◆ isMarkedPaired()

bool IntaRNA::AccessibilityConstraint::isMarkedPaired ( const size_t  i) const
inline

Checks whether or not a sequence position is marked as intramolecularly paired or not

Parameters
ithe position of interest
Returns
true if position i is marked accessible

◆ isUnconstrained()

bool IntaRNA::AccessibilityConstraint::isUnconstrained ( const size_t  i) const
inline

Checks whether or not a sequence position is not constrained

Parameters
ithe position of interest
Returns
true if position i is not constrained

◆ operator=()

AccessibilityConstraint & IntaRNA::AccessibilityConstraint::operator= ( const AccessibilityConstraint &  c)
inline

Assignment of constraints for the same rna sequence.

Parameters
cthe interaction to make this a copy of

◆ screenDotBracket()

static void IntaRNA::AccessibilityConstraint::screenDotBracket ( const std::string &  dotBracket,
const char  marker,
IndexRangeList &  storage 
)
staticprotected

screens the given dot-bracket string for consecutive regions of marker characters and pushes the according regions to the storage

Parameters
dotBracketthe dot-bracket encoding to screen
markerthe marker character to screen for
storagethe container to push the identified regions to

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const AccessibilityConstraint &  c 
)
friend

Prints the accessibility constraint in range-based encoding to stream

Parameters
outthe ostream to write to
cthe AccessibilityConstraint object to add
Returns
the altered stream out

Member Data Documentation

◆ accessible

IndexRangeList IntaRNA::AccessibilityConstraint::accessible
protected

sorted list of ranges that are marked as accessible

◆ blocked

IndexRangeList IntaRNA::AccessibilityConstraint::blocked
protected

sorted list of ranges that are marked as blocked

◆ dotBracket_accessible

const char IntaRNA::AccessibilityConstraint::dotBracket_accessible
static

the marker for accessible positions in dot-bracket notation

◆ dotBracket_blocked

const char IntaRNA::AccessibilityConstraint::dotBracket_blocked
static

the marker for blocked positions in dot-bracket notation

◆ dotBracket_constraints

const std::string IntaRNA::AccessibilityConstraint::dotBracket_constraints
static

collection of all allowed encoding of constraints

◆ dotBracket_paired

const char IntaRNA::AccessibilityConstraint::dotBracket_paired
static

the marker for paired positions in dot-bracket notation

◆ dotBracket_unconstrained

const char IntaRNA::AccessibilityConstraint::dotBracket_unconstrained
static

the marker for unconstrained positions in dot-bracket notation

◆ dotBracketAlphabet

const std::string IntaRNA::AccessibilityConstraint::dotBracketAlphabet
static

the alphabet to encode accessibility constraints in dot-bracket notation

◆ length

size_t IntaRNA::AccessibilityConstraint::length
protected

the overall sequence length this constraint is about

◆ maxBpSpan

size_t IntaRNA::AccessibilityConstraint::maxBpSpan
protected

the maximal base pair span to be used for accessibility computation

◆ paired

IndexRangeList IntaRNA::AccessibilityConstraint::paired
protected

sorted list of ranges that are marked as paired (intramolecular)

◆ regex

const boost::regex IntaRNA::AccessibilityConstraint::regex
static

the regular expression that marks a non-empty valid constraint encoding

◆ regexShapeConversion

const boost::regex IntaRNA::AccessibilityConstraint::regexShapeConversion
static

the regular expression to be matched by shapeConversion encodings

◆ regexShapeMethod

const boost::regex IntaRNA::AccessibilityConstraint::regexShapeMethod
static

the regular expression to be matched by shapeMethod encodings

◆ regionIndexList

const std::string IntaRNA::AccessibilityConstraint::regionIndexList
static

regular expression that encodes a single region encoding as index list

◆ shapeConversion

std::string IntaRNA::AccessibilityConstraint::shapeConversion
protected

method for conversion of SHAPE reactivity data to paired probabilities

◆ shapeFile

std::string IntaRNA::AccessibilityConstraint::shapeFile
protected

filename of SHAPE reactivity data or empty if no SHAPE data to be used

◆ shapeMethod

std::string IntaRNA::AccessibilityConstraint::shapeMethod
protected

method for converting SHAPE reactivity data to pseudo energies


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