#include <HybridRNA.h>
Public Member Functions | |
HybridRNA (const char sequence1[], const char sequence2[], const bool IsRNA=true) | |
Constructors. | |
HybridRNA (const char filename1[], const int type1, const char filename2[], const int type2, const bool IsRNA=true) | |
int | AccessFold (const double gamma=0.4, const float percent=50, const int maximumstructures=20, const int window=0, const int maxinternalloopsize=30) |
int | FoldBimolecular (const float percent=10, const int maximumstructures=20, const int window=0, const char savefile[]="", const int maxinternalloopsize=30) |
Predict the lowest free energy secondary structure and generate suboptimal structures using a heuristic. | |
int | FoldDuplex (const float percent=40, const int maximumstructures=10, const int window=0, const int maxinternalloopsize=30) |
Predict the lowest free energy secondary structure for two strands that cannot form intramolecular pairs and generate suboptimal structures using a heuristic. | |
int | PartitionFunctionBimolecular (const char savefile[]="") |
Predict the bimolecular partition function for a sequence (with no intramolecular pairs). | |
RNA * | GetRNA1 () |
RNA * | GetRNA2 () |
int | GetErrorCode () |
Return an error code, where a return of zero is no error. | |
char * | GetErrorMessage (const int error) |
Return error messages based on code from GetErrorCode and other error codes. | |
bool | GetForbidIntramolecular () |
Get whether intramolecular pairs are allowed. | |
void | SetForbidIntramolecular (const bool forbid) |
Set whether intramolecular pairs are allowed. | |
void | SetProgress (TProgressDialog &Progress) |
void | StopProgress () |
~HybridRNA () | |
Private Member Functions | |
void | commonconstructor () |
void | SetupBimolecular () |
Private Attributes | |
bool | forbidunimolecular |
TwoRNA * | sequences |
The HybridRNA class provides an entry point for all the bimolecular structure prediction routines of RNAstructure. The class is inherited from the RNA class and contains an instance of TwoRNA, which itself contains two instances to the class RNA.
HybridRNA::HybridRNA | ( | const char | sequence1[], | |
const char | sequence2[], | |||
const bool | IsRNA = true | |||
) |
HybridRNA::HybridRNA | ( | const char | filename1[], | |
const int | type1, | |||
const char | filename2[], | |||
const int | type2, | |||
const bool | IsRNA = true | |||
) |
HybridRNA::~HybridRNA | ( | ) |
int HybridRNA::AccessFold | ( | const double | gamma = 0.4 , |
|
const float | percent = 50 , |
|||
const int | maximumstructures = 20 , |
|||
const int | window = 0 , |
|||
const int | maxinternalloopsize = 30 | |||
) |
Predict the lowest free energy secondary structure for two interacting strands and generate suboptimal structures. Thuis method does not allow intramolecular pairs. It considers accessibility with a heuristic that uses tge partition function. If the temperature has not been specified using the RNA base class SetTemperature and no free energies have been calculated, the thermodynamic parameters have not been read and therefore they will be read by this function call. The parameter files should be located in the directory specified by the environment variable $DATAPATH of the pwd. In case of error, the function returns a non-zero that can be parsed by GetErrorMessage() or GetErrorMessageString().
gamma | is a scaling factor that weights accessibility. The defaults is 0.4 | |
percent | is the maximum % difference in free energy in suboptimal structures from the lowest free energy structure. The default is 50. | |
maximumstructures | is the maximum number of suboptimal structures to generate. The fefault is 20. | |
window | is a parameter that specifies how different the suboptimal structures should be from each other (0=no restriction and larger integers require structures to be more different). The default is 0. | |
maxinternalloopsize | is the maximum number of unpaired nucleotides in bulge and internal loops. This is used to accelerate the prediction speed. The default is 30. |
void HybridRNA::commonconstructor | ( | ) | [private] |
int HybridRNA::FoldBimolecular | ( | const float | percent = 10 , |
|
const int | maximumstructures = 20 , |
|||
const int | window = 0 , |
|||
const char | savefile[] = "" , |
|||
const int | maxinternalloopsize = 30 | |||
) |
Predict the lowest free energy secondary structure and generate suboptimal structures using a heuristic.
This function predicts the lowest free energy structure and suboptimal structures. If the temperature has not been specified using the RNA base class SetTemperature and no free energies have been calculated, the thermodynamic parameters have not been read and therefore they will be read by this function call. The parameter files should be located in the directory specified by the environment variable $DATAPATH of the pwd. In case of error, the function returns a non-zero that can be parsed by GetErrorMessage() or GetErrorMessageString().
percent | is the maximum % difference in free energy in suboptimal structures from the lowest free energy structure. The default is 10. | |
maximumstructures | is the maximum number of suboptimal structures to generate. The defaults is 20. | |
window | is a parameter that specifies how different the suboptimal structures should be from each other (0=no restriction and larger integers require structures to be more different). The default is 0. | |
savefile | is c string containing a file path and name for a savefile (.sav)that can be used to generate energy dot plots and to refold the secondary structure using different suboptimal structure parameters. The default is "", which results in no save file written. | |
maxinternalloopsize | is the maximum number of unpaired nucleotides in bulge and internal loops. This is used to accelerate the prediction speed. The default is 30. |
int HybridRNA::FoldDuplex | ( | const float | percent = 40 , |
|
const int | maximumstructures = 10 , |
|||
const int | window = 0 , |
|||
const int | maxinternalloopsize = 30 | |||
) |
Predict the lowest free energy secondary structure for two strands that cannot form intramolecular pairs and generate suboptimal structures using a heuristic.
This function predicts the lowest free energy bimolecular structure and suboptimal structures. This function does not allow any folding constraints. If the temperature has not been specified using SetTemperature and no free energies have been calculated, the thermodynamic parameters have not been read and therefore they will be read by this function call. The parameter files should be located in the directory specified by the environment variable $DATAPATH of the pwd. In case of error, the function returns a non-zero that can be parsed by GetErrorMessage() or GetErrorMessageString().
percent | is the maximum % difference in free energy in suboptimal structures from the lowest free energy structure. The default is 40. | |
maximumstructures | is the maximum number of suboptimal structures to generate. The default is 10. | |
window | is a parameter that specifies how different the suboptimal structures should be from each other (0=no restriction and larger integers require structures to be more different). The default is 0. | |
maxinternalloopsize | is the maximum number of unpaired nucleotides in bulge and internal loops. This is used to accelerate the prediction speed. The default is 30. |
int HybridRNA::GetErrorCode | ( | ) |
Return an error code, where a return of zero is no error.
This function returns and error flag that is generated during construction by RNA(const char &filename, const int type, const bool IsRNA=true) or from CalculateFreeEnergy(). An error of zero is always no error. Other codes are errors and a c-string can be fetched for the error with GetErrorMessage().
Reimplemented from RNA.
char * HybridRNA::GetErrorMessage | ( | const int | error | ) |
Return error messages based on code from GetErrorCode and other error codes.
0 = no error <100 = Error to be fetched from RNA base class. 100-999 = Error associated with bimolecular folding, to be handled here. >=1000 = Errors for underlying sequence, get message from TwoRNA base class.
error | is the integer error code provided by GetErrorCode(). |
Reimplemented from RNA.
bool HybridRNA::GetForbidIntramolecular | ( | ) |
Get whether intramolecular pairs are allowed.
RNA * HybridRNA::GetRNA1 | ( | ) |
RNA * HybridRNA::GetRNA2 | ( | ) |
int HybridRNA::PartitionFunctionBimolecular | ( | const char | savefile[] = "" |
) |
Predict the bimolecular partition function for a sequence (with no intramolecular pairs).
This function must be called to predict base pair probabilities, perform stochastic traceback, or for maximizing expected accuracy. This predicts the partition function without intramolecular pairs. If the temperature has not been specified using SetTemperature and no free energies have been calculated, the thermodynamic parameters have not been read and therefore they will be read by this function call. The parameter files should be located in the directory specified by the environment variable $DATAPATH of the pwd. In case of error, the function returns a non-zero that can be parsed by GetErrorMessage() or GetErrorMessageString().
savefile | is a c string that contains the path and filename for creating a save file. This defaults to "", which indicates no file is to be written. |
void HybridRNA::SetForbidIntramolecular | ( | const bool | forbid | ) |
Set whether intramolecular pairs are allowed.
If true is passed to this function, intramolecular pairs will be forbidden in FoldBimolecular.
forbid | is a bool that indicates whether intramolecular pairs are forbid. |
void HybridRNA::SetProgress | ( | TProgressDialog & | Progress | ) |
Provide a TProgressDialog for following calculation progress. A TProgressDialog class has a public function void update(int percent) that indicates the progress of a long calculation.
Progress | is a TProgressDialog class. |
Reimplemented from RNA.
void HybridRNA::SetupBimolecular | ( | ) | [private] |
void HybridRNA::StopProgress | ( | ) |
bool HybridRNA::forbidunimolecular [private] |
TwoRNA* HybridRNA::sequences [private] |