RNAblueprint-1.3.2
design Namespace Reference

All classes and functions for the RNA design library are under the design namespace. More...

Data Structures

class  DependencyGraph
 Dependency Graph which holds all structural constraints. More...
 

Functions

void initialize_library (bool debug)
 Initialize the Libraries global variables. More...
 
void initialize_library (bool debug, int construction_timeout)
 Initialize the Libraries global variables. More...
 
std::string structures_to_graphml (std::vector< std::string > structures, std::string constraints, bool decompose, unsigned long seed)
 Generate a graphml representation of structural and sequence constraints. More...
 
std::string structures_to_graphml (std::vector< std::string > structures, std::string constraints, bool decompose)
 Generate a graphml representation of structural and sequence constraints. More...
 
std::string structures_to_graphml (std::vector< std::string > structures, std::string constraints)
 Generate a graphml representation of structural and sequence constraints. More...
 
bool graph_is_bipartite (std::vector< std::string > structures)
 Returns whether the dependency graph built from the given input structures is bipartite. More...
 
bool sequence_structure_compatible (std::string sequence, std::vector< std::string > structures)
 Returns whether the the given sequence is compatible to all the given structures. More...
 
std::vector< int > incompatible_sequence_positions (std::string sequence, std::string structure)
 Returns whether the the given sequence is compatible to all the given structures. More...
 

Detailed Description

All classes and functions for the RNA design library are under the design namespace.

Function Documentation

◆ graph_is_bipartite()

bool design::graph_is_bipartite ( std::vector< std::string >  structures)

Returns whether the dependency graph built from the given input structures is bipartite.

This helper function checks, if a set of input structures will generate a bipartite dependency graph. If the graph is not bipartite, it cannot be used to generate a valid RNA sequence.

Parameters
structuresvector of string structures in dot-bracket notation.
Exceptions
std::exceptionif input is invalid or construction fails an exception is thrown.
Returns
boolean specifying whether the input structures can be constructed to a bipartite dependency graph.

◆ incompatible_sequence_positions()

std::vector<int> design::incompatible_sequence_positions ( std::string  sequence,
std::string  structure 
)

Returns whether the the given sequence is compatible to all the given structures.

This function checks, if a given sequence can fold into the given structure and returns an empty vector if this is the case. Else, it returns all positions on the sequence which are incompatible with the given structural constraint. E.g. incompatible_sequence_positions("ANC", "(.)") would return [0, 2]!

Parameters
sequencestring in IUPAC notation.
structurestring in dot-bracket notation.
Exceptions
std::exceptionif input is invalid.
Returns
map of a pair of integers specifying the sequence positions incompatible to the structure input.

◆ initialize_library() [1/2]

void design::initialize_library ( bool  debug)

Initialize the Libraries global variables.

Parameters
debugboolean whether to print debugging information to std:err (default: false)

◆ initialize_library() [2/2]

void design::initialize_library ( bool  debug,
int  construction_timeout 
)

Initialize the Libraries global variables.

Parameters
debugboolean whether to print debugging information to std:err (default: false)
construction_timeoutinteger specifying the dependency graph construction timeout in seconds. 0 is infinite. (default: 0)

◆ sequence_structure_compatible()

bool design::sequence_structure_compatible ( std::string  sequence,
std::vector< std::string >  structures 
)

Returns whether the the given sequence is compatible to all the given structures.

This function checks, if a given sequence can form all base-pairs given by a set of input structures. Or the other way around, if the given structures could have produced this sequence.

Parameters
sequencestring in IUPAC notation.
structuresvector of string structures in dot-bracket notation.
Exceptions
std::exceptionif input is invalid.
Returns
boolean specifying whether the input sequence is compatible to all the given structures.

◆ structures_to_graphml() [1/3]

std::string design::structures_to_graphml ( std::vector< std::string >  structures,
std::string  constraints 
)

Generate a graphml representation of structural and sequence constraints.

This function generates a graphml representation of the dependency graph given some structural and sequence constraints without constructing a DependencyGraph object, but with decomposition of the graph into subpaths. It is mainly thought to be useful for developmental purposes, analysis of hard problems and vizualisation.

Parameters
structuresvector of string structures in dot-bracket notation.
constraintsstring containing the sequence constraints in IUPAC notation. Can also be a empty string!
Exceptions
std::exceptionif input is invalid or construction/decomposition fails an exception is thrown.
Returns
string containing the GraphML notation of the dependency graph.

◆ structures_to_graphml() [2/3]

std::string design::structures_to_graphml ( std::vector< std::string >  structures,
std::string  constraints,
bool  decompose 
)

Generate a graphml representation of structural and sequence constraints.

This function generates a graphml representation of the dependency graph given some structural and sequence constraints without constructing a DependencyGraph object, with or without decomposition of the graph into subpaths. It is mainly thought to be useful for developmental purposes, analysis of hard problems and vizualisation. Caution: There are random parts in the decomposition algorithms. If you want to assign a seed, use structures_to_graphml(std::vector<std::string> structures, std::string constraints, bool decompose, unsigned long seed)

Parameters
structuresvector of string structures in dot-bracket notation.
constraintsstring containing the sequence constraints in IUPAC notation. Can also be a empty string!
decomposeboolean Whether to decompose the dependency graph into paths and therefore draw articulation vertices and ears.
Exceptions
std::exceptionif input is invalid or construction/decomposition fails an exception is thrown.
Returns
string containing the GraphML notation of the dependency graph.

◆ structures_to_graphml() [3/3]

std::string design::structures_to_graphml ( std::vector< std::string >  structures,
std::string  constraints,
bool  decompose,
unsigned long  seed 
)

Generate a graphml representation of structural and sequence constraints.

This function generates a graphml representation of the dependency graph given some structural and sequence constraints without constructing a DependencyGraph object, with or without decomposition of the graph into subpaths. It is mainly thought to be useful for developmental purposes, analysis of hard problems and vizualisation.

Parameters
structuresvector of string structures in dot-bracket notation.
constraintsstring containing the sequence constraints in IUPAC notation. Can also be a empty string!
decomposeboolean Whether to decompose the dependency graph into paths and therefore draw articulation vertices and ears.
seedunsigned long Seed for the random number generator which is used for some random parts of the decomposition.
Exceptions
std::exceptionif input is invalid or construction/decomposition fails an exception is thrown.
Returns
string containing the GraphML notation of the dependency graph.