| RNAstructure Classes Version 6.2

Public Member Functions | Private Member Functions | Private Attributes | List of all members
Oligowalk_object Class Reference

Oligowalk_object Class. More...

`#include <Oligowalk_object.h>`

Inheritance diagram for Oligowalk_object:

## Public Member Functions
| Oligowalk_object (const char sequence[])
| Constructor - user provides a sequence as a c string. More...
| Oligowalk_object (const char filename[], const int type)
| Constructor - user provides a filename for existing file as a c string. More...
| Oligowalk_object (const bool IsRNA=true)
| Default Constructor - user provides nothing. More...
int | Oligowalk (const int oligo_length, const bool isDNA, const int option, const double oligo_concentration, const int usesub, const int start, const int stop)
double | GetBreakTargetDG (const int index)
double | GetDuplexDG (const int index)
double | GetOligoOligoDG (const int index)
double | GetOligoSelfDG (const int index)
double | GetOverallDG (const int index)
double | GetTm (const int index)
int | WriteReport (const char outputfilename[], const int oligo_length, const bool isDNA, const int option, const double oligo_concentration, const int usesub, const int start, const int stop)
int | OligoScreen (const char infilename[], const char outfilename[])
| This function runs OligoScreen. More...
const char * | GetErrorMessage (const int error)
| ~Oligowalk_object ()
| This is the destructor. More...
Public Member Functions inherited from RNA
| RNA (const char sequence[], const bool IsRNA=true)
| Constructor - user provides a sequence as a c string. More...
| RNA (const char filepathOrSequence[], const RNAInputType fileType, const char *const alphabetName, const bool allowUnknownBases=false, const bool skipThermoTables=false)
| RNA (const char filepathOrSequence[], const RNAInputType fileType, const Thermodynamics *copyThermo)
| RNA (const char filename[], const RNAInputType fileType, const bool IsRNA=true)
| Constructor - user provides a filename for existing file as a c string. More...
| RNA (const bool IsRNA=true)
int | GetErrorCode () const
| Return an error code, where a return of zero is no error. More...
string | GetFullErrorMessage () const
const string | GetErrorDetails () const
| Returns extended details about the last error. (e.g. error messages produced during file read operations that are otherwise lost.) More...
void | SetErrorDetails (const string &details)
| Set extended details about the last error. (e.g. error messages produced during file read operations that are otherwise lost.) More...
void | SetSequenceLabel (const string &label)
| Set the name of the sequence. (This must be called before structure prediction for it to affect the resulting structures.) More...
string | GetErrorMessageString (const int error) const
| Return error messages based on code from GetErrorCode and other error codes. More...
void | ResetError ()
void | EnsureStructureCapcacity (const int minimumStructures)
| Ensure that at a minumum number of structures have been created. More...
int | SpecifyPair (const int i, const int j, const int structurenumber=1)
| Specify a base pair between nucleotides i and j. More...
int | RemovePairs (const int structurenumber=1, bool removeIfLastStructure=true)
| Remove all the current base pairs in a specified structure. More...
int | RemoveBasePair (const int i, const int structurenumber=1)
| Remove a specified pair in a specified structure. More...
double | CalculateFreeEnergy (const int structurenumber=1, const bool UseSimpleMBLoopRules=false)
| Return the predicted Gibb's free energy change for structure # structurenumber, defaulted to 1. More...
double | ExteriorLoopCorrection (const int structurenumber, const bool UseSimpleMBLoopRules, int min_index, int max_index)
int | WriteThermodynamicDetails (const char filename[], const bool UseSimpleMBLoopRules=false)
| Calculate the folding free energy change for all structures and write the details of the calculation to a file. More...
int | FoldSingleStrand (const float percent=20, const int maximumstructures=20, const int window=5, const char savefile[]="", const int maxinternalloopsize=30, bool mfeonly=false, bool simple_iloops=true, bool disablecoax=false, bool allow_isolated=false)
| Predict the lowest free energy secondary structure and generate suboptimal structures using a heuristic. More...
int | GenerateAllSuboptimalStructures (const float percent=5, const double deltaG=0.6)
| Predict the lowest free energy secondary structure and generate all suboptimal structures. More...
int | MaximizeExpectedAccuracy (const double maxPercent=20, const int maxStructures=20, const int window=1, const double gamma=1.0)
| Predict the structure with maximum expected accuracy and suboptimal structures. More...
int | PartitionFunction (const char savefile[]="", double temperature=-10.0, bool disablecoax=false, bool restoreSHAPE=true, bool allowisolated=false, int maxinter=30)
| Predict the partition function for a sequence. More...
int | Rsample (const vector< double > &experimentalRestraints, RsampleData &refdata, const int randomSeed=0, const char savefile[]="", const double cparam=0.5, const double offset=1.10, const int numsamples=10000)
int | PredictProbablePairs (const float probability=0)
| Predict structures containing highly probable pairs. More...
int | ProbKnot (int iterations=1, int MinHelixLength=1, double threshold=0)
| Predict maximum expected accuracy structures that contain pseudoknots from either a sequence or a partition function save file. More...
int | ProbKnotFromSample (int iterations=1, int MinHelixLength=1, double threshold=0)
| Predict maximum expected accuracy structures that contain pseudoknots from a file containing ensemble of structures. More...
int | ReFoldSingleStrand (const float percent=20, const int maximumstructures=20, const int window=5)
| Re-predict the lowest free energy secondary structure and generate suboptimal structures using a heuristic. More...
int | Stochastic (const int structures=1000, const int seed=1)
| Sample structures from the Boltzman ensemable. More...
int | ForceDoubleStranded (const int i)
| Force a nucleotide to be double stranded (base paired). More...
int | ForceFMNCleavage (const int i)
| Indicate a nucleotide that is accessible to FMN cleavage (a U in GU pair). More...
int | ForceMaximumPairingDistance (const int distance)
| Force a maximum distance between apired nucleotides. More...
int | ForceModification (const int i)
| Force modification for a nucleotide. More...
int | ForcePair (const int i, const int j)
| Force a pair between two nucleotides. More...
int | ForceProhibitPair (const int i, const int j)
| Prohibit a pair between two nucleotides. More...
int | ForceSingleStranded (const int i)
| Force a nucleotide to be single stranded. More...
int | GetForcedDoubleStranded (const int constraintnumber)
| Return a nucleotide that is forced double stranded. More...
int | GetForcedFMNCleavage (const int constraintnumber)
| Return a nucleotide that is accessible to FMN cleavage. More...
int | GetForcedModification (const int constraintnumber)
| Return a nucleotide that is accessible to modification. More...
int | GetForcedPair (const int constraintnumber, const bool fiveprime)
| Return a nucleotide in a forced pair. More...
int | GetForcedProhibitedPair (const int constraintnumber, const bool fiveprime)
| Return a nucleotide in a prohibited pair. More...
int | GetForcedSingleStranded (const int constraintnumber)
| Return a nucleotide that is forced single stranded. More...
int | GetMaximumPairingDistance ()
| Return the maximum pairing distance. More...
int | GetNumberOfForcedDoubleStranded ()
| Return the number of nucletides forced to be paired. More...
int | GetNumberOfForcedFMNCleavages ()
| Return the number of nucleotides accessible to FMN cleavage. More...
int | GetNumberOfForcedModifications ()
| Return the number of nucleotides accessible to chemical modification. More...
int | GetNumberOfForcedPairs ()
| Return the number of forced base pairs. More...
int | GetNumberOfForcedProhibitedPairs ()
| Return the number of prohibited base pairs. More...
int | GetNumberOfForcedSingleStranded ()
| Return the number of nucleotides that are not allowed to pair. More...
int | ReadConstraints (const char filename[])
| Read a set of folding constraints to disk in a plain text file. More...
int | ReadSHAPE (const char filename[], const double slope, const double intercept, RestraintType modifier=RESTRAINT_SHAPE, const bool IsPseudoEnergy=true)
| Read SHAPE data from disk. More...
int | ReadSHAPE (const char filename[], const double dsSlope, const double dsIntercept, const double ssSlope, const double ssIntercept, RestraintType modifier=RESTRAINT_SHAPE)
| Read SHAPE data from disk including single-stranded SHAPE pseudo free energys. More...
int | ReadDMS (const char filename[], const bool bynt=false)
int | ReadDSO (const char filename[])
| Read double strand offset data from disk. More...
int | ReadSSO (const char filename[])
| Read single strand offset data from disk. More...
int | ReadExperimentalPairBonus (const char filename[], double const experimentalOffset, double const experimentalScaling)
| Read experimental pair bonuses from disk. More...
void | RemoveConstraints ()
| Remove all folding constraints. More...
void | SetConstraints (vector< int > ss)
int | SetExtrinsic (int i, int j, double k)
| Add extrinsic restraints for partition function calculations. More...
int | WriteConstraints (const char filename[])
| Write the current set of folding constraints to disk in a plain text file. More...
int | AddComment (const char comment[], const int structurenumber=1)
| Add a comment associated with a structure. More...
int | WriteCt (const char filename[], bool append=false, CTCommentProvider &commentProvider=CTComments::Energy) const
| Write a ct file of the structures. More...
int | WriteDotBracket (const char filename[], const int structurenumber=-1, const DotBracketFormat format=DBN_FMT_MULTI_TITLE, CTCommentProvider &commentProvider=CTComments::Energy) const
| Write dot-bracket file of structures. More...
int | BreakPseudoknot (const bool minimum_energy=true, const int structurenumber=0, const bool useFastMethod=true)
| Break any pseudoknots that might be in a structure. More...
bool | ContainsPseudoknot (const int structurenumber)
| Report if there are any pseudoknots in a structure. More...
double | GetEnsembleEnergy ()
| Get the ensemble folding free energy change. More...
double | GetEnsembleDefect (const int structurenumber=1, const int start=0, const int end=0, const char filename[]="")
| Get the ensemble defect of a secondary structure. More...
double | GetFreeEnergy (const int structurenumber)
| Get the folding free energy change for a predicted structure. More...
int | GetPair (const int i, const int structurenumber=1)
| Get the nucleotide to which the specified nucleotide is paired. More...
double | GetPairEnergy (const int i, const int j)
| Get the lowest folding free energy possible for a structure containing pair i-j. More...
double | GetPairProbability (const int i, const int j)
| Get a base pair probability. More...
int | GetPairProbabilities (double *arr, const int size)
int | GetStructureNumber () const
| Get the total number of specified or predicted structures. More...
int | DetermineDrawingCoordinates (const int height, const int width, const int structurenumber=1)
| Determine the coordinates for drawing a secondary structure. More...
std::string | GetCommentString (const int structurenumber=1)
| Provide the comment from the ct file as a string. More...
int | GetNucleotideXCoordinate (const int i)
| Get the X coordinate for nucleotide i for drawing a structure. More...
int | GetNucleotideYCoordinate (const int i)
| Get the Y coordinate for nucleotide i for drawing a structure. More...
int | GetLabelXCoordinate (const int i)
| Get the X coordinate for placing the nucleotide index label specified by i. More...
int | GetLabelYCoordinate (const int i)
| Get the Y coordinate for placing the nucleotide index label specified by i. More...
char | GetNucleotide (const int i)
int | GetSequenceLength () const
| Get the total length of the sequence. More...
const char * | GetSequence () const
std::string | GetSequence (size_t start, size_t length=std::string::npos) const
bool | GetBackboneType () const
| Get the backbone type. More...
double | GetVprimeQ (const int i, const int j)
double | GetW (const int i, const int j)
bool | CheckPair (const int i, const int j)
structure * | GetStructure ()
void | SetProgress (ProgressHandler &Progress)
void | StopProgress ()
ProgressHandler * | GetProgress ()
| ~RNA ()
| Destructor. More...
void | CopyThermo (Thermodynamics &copy)
| Copy thermodynamic parameters from an instance of an RNA class. More...
Public Member Functions inherited from Thermodynamics
| Thermodynamics (const bool isRNA=true, const char *const alphabetName=NULL, const double temperature=310.15)
| Thermodynamics (const Thermodynamics &copyThermo)
int | SetTemperature (double temperature)
| Set the temperature of folding in K. More...
double | GetTemperature () const
string | GetAlphabetName () const
| Get the name of the extended alphabet for which thermodynamic parameters should be loaded. More...
int | ReadThermodynamic (const char *directory=NULL, const char *alphabet=NULL, const double temperature=-1.0)
| Function to read the thermodynamic parameters. More...
int | ReloadDataTables (const double new_temperature=-1.0)
bool | VerifyThermodynamic ()
| Force the datatables to be read if they haven't already. Return true if the tables were already loaded or if the attempt to (re)open them succeded. More...
datatable * | GetDatatable ()
datatable * | GetEnthalpyTable (const char *alphabet=NULL)
void | ClearEnergies ()
| Clear the currently loaded energy datatable and release its resources. More...
void | ClearEnthalpies ()
| Clear the currently loaded enthalpy datatable and release its resources. More...
bool | GetEnergyRead () const
| Return whether this instance of Thermodynamics has the paremters populated (either from disk or from another Thermodynamics class). More...
bool | IsAlphabetRead () const
| ~Thermodynamics ()

## Private Member Functions
void | CommonConstructor ()

## Private Attributes
int ** | table
int ** | numofsubstructures
siPREFILTER * | prefilter
int | length

## Additional Inherited Members
Static Public Member Functions inherited from RNA
static const char * | GetErrorMessage (const int error)
| Return error messages based on code from GetErrorCode and other error codes. More...
Public Attributes inherited from Thermodynamics
bool | isrna
Protected Member Functions inherited from RNA
int | FileReader (const char filename[], const RNAInputType fileType)
void | init (const char *sequenceOrFileName, const RNAInputType fileType, const bool allowUnknownBases=false, const bool skipThermoTables=false)
Protected Member Functions inherited from Thermodynamics
virtual void | CopyThermo (const Thermodynamics &copy)
| Copy thermodynamic parameters from an instance of Thermodynamics class. More...
Protected Attributes inherited from RNA
int | ErrorCode
ProgressHandler * | progress
PFPRECISION * | w5
PFPRECISION * | w3
PFPRECISION ** | wca
pfdatatable * | pfdata
DynProgArray< PFPRECISION > * | w
DynProgArray< PFPRECISION > * | v
DynProgArray< PFPRECISION > * | wmb
DynProgArray< PFPRECISION > * | wl
DynProgArray< PFPRECISION > * | wmbl
DynProgArray< PFPRECISION > * | wcoax
DynProgArray< PFPRECISION > * | wlc
PFPRECISION | Q
Protected Attributes inherited from Thermodynamics
datatable * | data
datatable * | enthalpy
bool | copied
double | nominal_temperature
string | nominal_alphabetName
bool | skipThermoTables

## Detailed Description

Oligowalk_object Class.

The Oligowalk_class inhereits from RNA and provides the OligoWalk functionality.
Additionally, it provides OligoScreen.

## Constructor & Destructor Documentation

## ◆ Oligowalk_object() [1/3]

Oligowalk_object::Oligowalk_object | ( | const char | sequence[] | ) |

Constructor - user provides a sequence as a c string.

This constructor simply calls the underlying RNA(const char sequence[], const bool IsRNA=true) constructor and sets IsRNA=true. Input sequence should contain A,C,G,T,U,a,c,g,t,u,x,X. Capitalization makes no difference. T=t=u=U. U is assumed by OligoWalk. 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.

## ◆ Oligowalk_object() [2/3]

Oligowalk_object::Oligowalk_object | ( | const char | filename[],
|  | const int | type
| ) |  |

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

This constructor simply calls the underlying RNA(const char filename[], const int type, const bool IsRNA=true) constructor and sets IsRNA=true. 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). For OligoWalk calculations, types 1 and 2 are the relevant types. 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 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.
  type | is an integer that indicates the file type.

## ◆ Oligowalk_object() [3/3]

Oligowalk_object::Oligowalk_object | ( | const bool | IsRNA = `true` | ) |

Default Constructor - user provides nothing.

This constructor calls the underlying RNA(IsRNA=true) constructor. This basic constructor is provided for performing OligoScreen calculations, which do not need an input sequence. This constructor needs to be called with RNA=true for Oligos to be RNA and RNA=false for Oligos to be DNA.

Parameters

  IsRNA | is a bool where true=RNA and false=DNA.

## ◆ ~Oligowalk_object()

Oligowalk_object::~Oligowalk_object | ( |  | ) |

This is the destructor.

## Member Function Documentation

## ◆ CommonConstructor()

void Oligowalk_object::CommonConstructor | ( |  | ) |
| private

## ◆ GetBreakTargetDG()

double Oligowalk_object::GetBreakTargetDG | ( | const int | index | ) |

Get the breaking target DG for a given nucleotide. This can only be called after performing a valid OligoWalk calculation. In case of error, the function returns a free energy change of zero. Note!: That a free energy change of zero is also a valid folding free energy change. Errors will also generate an internal error code, accessible with GetErrorCode().

Parameters

  index | is an int that specifies the 5' end of an oligonucleotide binding site on the target.

Returns
  A double that is the free energy change in kcal/mol.

## ◆ GetDuplexDG()

double Oligowalk_object::GetDuplexDG | ( | const int | index | ) |

Get the duplex DG for a given nucleotide. This can only be called after performing a valid OligoWalk calculation. In case of error, the function returns a free energy change of zero. Note!: That a free energy change of zero is also a valid folding free energy change. Errors will also generate an internal error code, accessible with GetErrorCode().

Parameters

  index | is an int that specifies the 5' end of an oligonucleotide binding site on the target.

Returns
  A double that is the free energy change in kcal/mol.

## ◆ GetErrorMessage()

const char * Oligowalk_object::GetErrorMessage | ( | const int | error | ) |

Return error messages based on code from GetErrorCode and other error codes.
100 = no OligoWalk data present 101 = OligoWalk has already been performed other codes are handled by the RNA base class function GetErrorMessage.

Parameters

  error | is the integer error code provided by GetErrorCode()/

Returns
  A pointer to a c string that provides an error message or from other functions that return integer error codes.

## ◆ GetOligoOligoDG()

double Oligowalk_object::GetOligoOligoDG | ( | const int | index | ) |

Get the bimolecular oligo-oligo DG for a given nucleotide. This can only be called after performing a valid OligoWalk calculation. In case of error, the function returns a free energy change of zero. Note!: That a free energy change of zero is also a valid folding free energy change. Errors will also generate an internal error code, accessible with GetErrorCode().

Parameters

  index | is an int that specifies the 5' end of an oligonucleotide binding site on the target.

Returns
  A double that is the free energy change in kcal/mol.

## ◆ GetOligoSelfDG()

double Oligowalk_object::GetOligoSelfDG | ( | const int | index | ) |

Get the oligo-self DG for a given nucleotide. This can only be called after performing a valid OligoWalk calculation. In case of error, the function returns a free energy change of zero. Note!: That a free energy change of zero is also a valid folding free energy change. Errors will also generate an internal error code, accessible with GetErrorCode().

Parameters

  index | is an int that specifies the 5' end of an oligonucleotide binding site on the target.

Returns
  A double that is the free energy change in kcal/mol.

## ◆ GetOverallDG()

double Oligowalk_object::GetOverallDG | ( | const int | index | ) |

Get the overall DG for a given nucleotide. This can only be called after performing a valid OligoWalk calculation. In case of error, the function returns a free energy change of zero. Note!: That a free energy change of zero is also a valid folding free energy change. Errors will also generate an internal error code, accessible with GetErrorCode().

Parameters

  index | is an int that specifies the 5' end of an oligonucleotide binding site on the target.

Returns
  A double that is the free energy change in kcal/mol.

## ◆ GetTm()

double Oligowalk_object::GetTm | ( | const int | index | ) |

Get the Tm for a given nucleotide. This can only be called after performing a valid OligoWalk calculation. In case of error, the function returns a free energy change of zero. Note!: That a free energy change of zero is also a valid folding free energy change. Errors will also generate an internal error code, accessible with GetErrorCode().

Parameters

  index | is an int that specifies the 5' end of an oligonucleotide binding site on the target.

Returns
  A double that is the Tm in degrees C.

## ◆ OligoScreen()

int Oligowalk_object::OligoScreen | ( | const char | infilename[],
|  | const char | outfilename[]
| ) |  |

This function runs OligoScreen.

Read a list of oligonucleotides in infilename and output thermodynamic characteristics in outfilename. The backbone type is set when the constructor is called. Note that oligoscreen has no target sequence, so the default constructor OligoWalk(bool IsRNA) should be used.

Parameters

  infilename | is a c-string that indicates the filename to be read.
  outfilename | is a c-string that indicates the name of an output file to be written with report.

Returns
  An int that indicates an error code that can be parsed by GetErrorMessage() or GetErrorMessageString(), 0 = no error.

## ◆ Oligowalk()

int Oligowalk_object::Oligowalk | ( | const int | oligo_length,
|  | const bool | isDNA,
|  | const int | option,
|  | const double | oligo_concentration,
|  | const int | usesub,
|  | const int | start,
|  | const int | stop
| ) |  |

Perform an OligoWalk calculation. Note that this can only be performed once.

Parameters

  oligo_length | is an int that gives the length of the oligonucleotides.
  isDNA | is a bool that indicates the oligonucleotide chemistry, where true = DNA and false = RNA.
  option | is an int that gives the calculation type, where option 1 = break local target structure to bind oligo, option 2 = refold target RNA after oligo binding, and option 3 = no target structure considered.
  oligo_concentration | is a double that indicates the oligonucleotide concentration in M.
  usesub | is an int that indicates whether suboptimal structures are to be used, where 0 = none and 3 = use heuristic method.
  start | is an int that indicates the starting location of the walk.
  stop | is an int that indicates the ending location of the walk.

Returns
  An integer that indicates an error code that can be parsed by GetErrorMessage() or GetErrorMessageString(), 0 = no error.

## ◆ WriteReport()

int Oligowalk_object::WriteReport | ( | const char | outputfilename[],
|  | const int | oligo_length,
|  | const bool | isDNA,
|  | const int | option,
|  | const double | oligo_concentration,
|  | const int | usesub,
|  | const int | start,
|  | const int | stop
| ) |  |

Write a report for an OligoWalk calculation. This must be called after performing a valid OligoWalk calculation.

Parameters

  outputfilename | is a c-string that provides a filename to which the report will be written.
  oligo_length | is an int that gives the length of the oligonucleotides.
  isDNA | is a bool that indicates the oligonucleotide chemistry, where true = DNA and false = RNA.
  option | is an int that gives the calculation type, where option 1 = break local target structure to bind oligo, option 2 = refold target RNA after oligo binding, and option 3 = no target structure considered.
  oligo_concentration | is a double that indicates the oligonucleotide concentration in M.
  usesub | is an int that indicates whether suboptimal structures are to be used, where 0 = none and 3 = use heuristic method.
  start | is an int that indicates the starting location of the walk.
  stop | is an int that indicates the ending location of the walk.

Returns
  An integer that indicates an error code that can be parsed by GetErrorMessage() or GetErrorMessageString(), 0 = no error.

## Member Data Documentation

## ◆ length

int Oligowalk_object::length
| private

## ◆ numofsubstructures

int ** Oligowalk_object::numofsubstructures
| private

## ◆ prefilter

siPREFILTER* Oligowalk_object::prefilter
| private

## ◆ table

int** Oligowalk_object::table
| private

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

- RNA_class/Oligowalk_object.h
- RNA_class/Oligowalk_object.cpp