ProbScan Class Reference

#include <ProbScan.h>

Inheritance diagram for ProbScan:

RNA Thermodynamics

List of all members.

Public Member Functions

 ProbScan (std::string sequence, bool isRNA=true)
 Constructor - user provides a sequence as a c string.
 ProbScan (const char filename[], bool from_sequence_file, bool isRNA=true)
 Constructor - user provides a filename for existing file as a c string.
double probability_of_hairpin (int i, int j)
 Returns probability of a hairpin closed at a specific position.
std::vector< hairpin_tprobability_of_all_hairpins (int min, int max, double threshold)
 Calculates the probabilities of all possible hairpins in this sequence.
double probability_of_internal_loop (int i, int j, int k, int l)
 Returns probability of an internal loop or bulge loop closed at a specific position.
std::vector< internal_loop_tprobability_of_all_internal_loops (double threshold, std::string mode=std::string("both"))
 Calculates the probabilities of all possible internal loops and/or bulge loops in this sequence.
double probability_of_stack (int i, int j)
double probability_of_helix (const int i, const int j, const int how_many_stacks)
 Calculates probability of an helix at a specific position.
std::vector< basestack_tprobability_of_all_helices (double threshold, int length)
 Calculates the probabilities of all possible helices in this sequence of a specific length.
double probability_of_multibranch_loop (const multibranch_loop_t &mb)
 Calculates probability of a multibranch loop at a specific position.

Private Member Functions

PFPRECISION equilibrium_constant_for_multibranch_loop (const multibranch_loop_t &)
std::vector< mb_elementconstruct_mb_element_array (const multibranch_loop_t &)


Constructor & Destructor Documentation

ProbScan::ProbScan ( std::string  sequence,
bool  isRNA = true 
)

Constructor - user provides a sequence as a c string.

The partition function will be calculated. If the sequence is long, this may take some time. Input sequence should contain A,C,G,T,U,a,c,g,t,u,x,X. Capitalization makes no difference. T=t=u=U. If IsRNA is true, the backbone is RNA, so U is assumed. If IsRNA is false, the backbone is DNA, so T is assumed. x=X= nucleotide that neither stacks nor pairs. For now, any unknown nuc is considered 'X'. Note that sequences will subsequently be indexed starting at 1 (like a biologist), so that the 0th position in the sequence array will be nucleotide 1.

Parameters:
sequence is a NULL terminated c string containing the nucleotide sequence.
isRNA is a bool that indicates whether this sequence is RNA or DNA. true=RNA. false=DNA. Default is true.

ProbScan::ProbScan ( const char  filename[],
bool  from_sequence_file,
bool  isRNA = true 
)

Constructor - user provides a filename for existing file as a c string.

The existing file, specified by filename, can either be a ct file, a sequence, or an RNAstructure save file. Therefore, the user provides a flag for the file: type = 1 => .ct file, type = 2 => .seq file, type = 3 => partition function save (.pfs) file, type = 4 => folding save file (.sav). If the input file is ont a partition function save file, the partition function will be calculated. If the sequence is long, this may take some time. This constructor generates internal error codes that can be accessed by GetErrorCode() after the constructor is called. 0 = no error. The errorcode can be resolved to a c string using GetErrorMessage. Note that the contructor needs to be explicitly told, via IsRNA, what the backbone is because files do not store this information. Note also that save files explicitly store the thermodynamic parameters, therefore changing the backbone type as compaared to the original calculation will not change structure predictions.

Parameters:
filename is null terminated c string containing the path to the input file.
from_sequence_file is a bool which tells the constructor whether we are initializing from a sequence file, in which case the partition function must be calculated
isRNA is a bool that indicates whether this sequence is RNA or DNA. true=RNA. false=DNA. Default is true.


Member Function Documentation

vector< mb_element > ProbScan::construct_mb_element_array ( const multibranch_loop_t mb  )  [private]

PFPRECISION ProbScan::equilibrium_constant_for_multibranch_loop ( const multibranch_loop_t mb  )  [private]

vector< hairpin_t > ProbScan::probability_of_all_hairpins ( int  min,
int  max,
double  threshold 
)

Calculates the probabilities of all possible hairpins in this sequence.

Parameters:
min The minimum size of a hairpin
max The maximum size of a hairpin
threshold The minimum probability for candidate hairpins
Returns:
A vector of hairpin objects, containing the positions of the hairpins and their probabilities

std::vector< basestack_t > ProbScan::probability_of_all_helices ( double  threshold,
int  length 
)

Calculates the probabilities of all possible helices in this sequence of a specific length.

Parameters:
threshold the minimum probability of candidate helices
length the number of base pair stacks to search for
Returns:
A vector of helix objects, containing the positions of the helices and their probabilities

std::vector<internal_loop_t> ProbScan::probability_of_all_internal_loops ( double  threshold,
std::string  mode = std::string("both") 
)

Calculates the probabilities of all possible internal loops and/or bulge loops in this sequence.

Parameters:
threshold the minimum probability of candidate loops
mode a string which indicates what type of loops should be searched for. Allowed values are "internal", "bulge", and "both"
Returns:
A vector of internal loop objects, containing the positions of the loops and their probabilities

double ProbScan::probability_of_hairpin ( int  i,
int  j 
)

Returns probability of a hairpin closed at a specific position.

Parameters:
i The 5' nucleotide closing the hairpin
j The 3' nucleotide closing the hairpin
Returns:
A double containing the probability of the hairpin

double ProbScan::probability_of_helix ( const int  i,
const int  j,
const int  how_many_stacks 
)

Calculates probability of an helix at a specific position.

Parameters:
i The 5' nucleotide closing the helix on the exterior
j The 3' nucleotide closing the helix on the exterior
how_many_stacks The number of base pair STACKS in the helix (this is the number of pairs minus 1)
Returns:
A double containing the probability of the helix

double ProbScan::probability_of_internal_loop ( int  i,
int  j,
int  k,
int  l 
)

Returns probability of an internal loop or bulge loop closed at a specific position.

Parameters:
i The 5' nucleotide closing the loop on the exterior
j The 3' nucleotide closing the loop on the exterior
k The 5' nucleotide closing the loop on the interior
l The 3' nucleotide closing the loop on the interior
Returns:
A double containing the probability of the internal loop

double ProbScan::probability_of_multibranch_loop ( const multibranch_loop_t mb  ) 

Calculates probability of a multibranch loop at a specific position.

Parameters:
mb A multibranch loop object, containing a vector of pairs describing the multibranch loop. These can be created with the multibranch_loop function. See the text interface for the ProbScan program for an example of usage.
Returns:
A double containing the probability of the multibranch loop

double ProbScan::probability_of_stack ( int  i,
int  j 
)

Calculates probability of a base pair stack closed at a specific position Note that this is a special case of probability_of_helix where the size is set to 1

Parameters:
i The 5' nucleotide closing the stack
j The 3' nucleotide closing the stack
Returns:
A double containing the probability of the stack


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

Generated on Wed Sep 2 14:36:50 2015 for RNAstructure Classes by  doxygen 1.5.7.1