design Class Reference

#include <design.h>

Inheritance diagram for design:

RNA Thermodynamics

List of all members.

Public Member Functions

 design (const char filename[], const bool IsRNA=true)
 Constructor. Programmer provides a filename for a ct file.
int design_sequence (const double pernucdefect, const bool random, const int maxdepth=5, bool heuristic=false, int MaxRedesignC=10, int MaxMutateC=4, int MaxLeafRedesignC=3, long randomSeed=1L)
void SpecifyRedesignLimits (int leaf, int parent, int mutate)
void SpecifyWeightedDefect (bool DefectWeighted)

Private Member Functions

void decompose (int nucstart, int nucend, int currentdepth, int maxdepth, int **tree, int missingstart=0, int missingend=0)
bool closeenoughtocut (int i, int j, int nucstart, int nucend, int missingstart, int missingend, double CLOSENESS)
void marktree (int beststart, int bestend, int nucstart, int nucend, int missingstart, int missingend, int currentdepth, int **tree)
void bestdecomposition (int nuctstart, int nucend, int currentstart, int currentend, int *beststart, int *bestend, int missingstart, int missingend)
void SelectSequence (int **tree, bool random, int depth, const double pernucdefect, long seed=1)
void SelectSequenceHeuristic (int **tree, bool random, int depth, const double pernucdefect, long seed=1)
void FindFragments (int **tree, int level, int start, int stop, int missingstart, int missingstop, vector< int > *stackstart, vector< int > *stackend, vector< int > *stackmissingstart, vector< int > *stackmissingend, vector< int > *stackfragmentdepth)
void FillSequence (int start, int end, int missingstart, int missingend, bool random, randomnumber *dice, vector< vector< string > > &Helices, vector< vector< string > > &Loops)
int MapNuctoFragment (int j, int start, int missingstart, int missingend)
int MapFragmenttoNuc (int j, int start, int missingstart, int missingend)
void Mutation (int maxDefPos, int start, int missingstart, int missingend, char *sequence, vector< int > &Mutated)
void GetDefect (int start, int end, int missingstart, int missingend, vector< double > &def, double &defect, RNA *fragment)
void Debug1 (int start, int end, int missingstart, int missingend, char *sequence, RNA *fragment)
void PlaceSeqOnStack (vector< int > *stackstart, vector< int > *stackend, vector< int > *stackmissingstart, vector< int > *stackmissingend, vector< int > *stackfragmentdepth)
void StoreMutation (int start, int end, int missingstart, int missingend, char *sequence)
void StoreBestSequence (int start, int end, int missingstart, int missingend, char **sequence, int fragmentdepth)
char tonuc (int i)
int toint (char i)
double leafdesign (int start, int end, int missingstart, int missingend, bool random, randomnumber *dice, vector< vector< string > > *Helices, vector< vector< string > > *Loops, double pernucdefect, Thermodynamics *thermo)
void LeafOptimize (const double pernucdefect, randomnumber &dice, double &defect, vector< double > &def, RNA *fragment, int start, int end, int missingstart, int missingend, char *sequence, Thermodynamics *thermo)

Private Attributes

int MaxRedesign
int MaxMutate
int MaxLeafRedesign
bool defectweighted
int numbering


Constructor & Destructor Documentation

design::design ( const char  filename[],
const bool  IsRNA = true 
)

Constructor. Programmer provides a filename for a ct file.

Read a ct with name filename. This is a template for the structure. The sequence in the ct file will be ignored. If IsRNA is true (default), this is RNA, and it is DNA otherwise.

Parameters:
filename is a null terminated cstring that provides the filename and path.
IsRNA is a bool that is true for RNA (default value) and false for DNA.


Member Function Documentation

void design::bestdecomposition ( int  nuctstart,
int  nucend,
int  currentstart,
int  currentend,
int *  beststart,
int *  bestend,
int  missingstart,
int  missingend 
) [private]

bool design::closeenoughtocut ( int  i,
int  j,
int  nucstart,
int  nucend,
int  missingstart,
int  missingend,
double  CLOSENESS 
) [private]

void design::Debug1 ( int  start,
int  end,
int  missingstart,
int  missingend,
char *  sequence,
RNA fragment 
) [private]

void design::decompose ( int  nucstart,
int  nucend,
int  currentdepth,
int  maxdepth,
int **  tree,
int  missingstart = 0,
int  missingend = 0 
) [private]

int design::design_sequence ( const double  pernucdefect,
const bool  random,
const int  maxdepth = 5,
bool  heuristic = false,
int  MaxRedesignC = 10,
int  MaxMutateC = 4,
int  MaxLeafRedesignC = 3,
long  randomSeed = 1L 
)

Design the sequence. This function will choose a sequence will low ensemble defect to fold to the structure read in the constructor. The sequence is stored in the underlying RNA class.

Parameters:
pernucdefect is the maximum allowed ensemble defect per nucleotide.
random determines the method for choosing sequence. If false, use pre-selected sequences, and otherwise (true), randomly choose the sequence.
maxdepth is the mximum extent to which the structure will be sub-divided in the binary decomposition. The default is 5.
heuristic if true, avoids performing a partition function on the complete sequence. Default is false.
MaxRedesignC speicies the maximum numbewr of redesigns.
MaxMutateC is the maximum number of nucleotide mutations to make.
MaxLeafRedesignC is the maximum number of time a leaf will be redesigned when building the tree.
randomSeed is the seed for the random number generator.
Returns:
An int error code that can be resolved to a message using RNA::GetErrorMessage. A return of 0 means no errors.

void design::FillSequence ( int  start,
int  end,
int  missingstart,
int  missingend,
bool  random,
randomnumber *  dice,
vector< vector< string > > &  Helices,
vector< vector< string > > &  Loops 
) [private]

void design::FindFragments ( int **  tree,
int  level,
int  start,
int  stop,
int  missingstart,
int  missingstop,
vector< int > *  stackstart,
vector< int > *  stackend,
vector< int > *  stackmissingstart,
vector< int > *  stackmissingend,
vector< int > *  stackfragmentdepth 
) [private]

void design::GetDefect ( int  start,
int  end,
int  missingstart,
int  missingend,
vector< double > &  def,
double &  defect,
RNA fragment 
) [private]

end else, (j!=missingstart)

double design::leafdesign ( int  start,
int  end,
int  missingstart,
int  missingend,
bool  random,
randomnumber *  dice,
vector< vector< string > > *  Helices,
vector< vector< string > > *  Loops,
double  pernucdefect,
Thermodynamics thermo 
) [private]

void design::LeafOptimize ( const double  pernucdefect,
randomnumber &  dice,
double &  defect,
vector< double > &  def,
RNA fragment,
int  start,
int  end,
int  missingstart,
int  missingend,
char *  sequence,
Thermodynamics thermo 
) [private]

int design::MapFragmenttoNuc ( int  j,
int  start,
int  missingstart,
int  missingend 
) [private]

int design::MapNuctoFragment ( int  j,
int  start,
int  missingstart,
int  missingend 
) [private]

void design::marktree ( int  beststart,
int  bestend,
int  nucstart,
int  nucend,
int  missingstart,
int  missingend,
int  currentdepth,
int **  tree 
) [private]

void design::Mutation ( int  maxDefPos,
int  start,
int  missingstart,
int  missingend,
char *  sequence,
vector< int > &  Mutated 
) [private]

void design::PlaceSeqOnStack ( vector< int > *  stackstart,
vector< int > *  stackend,
vector< int > *  stackmissingstart,
vector< int > *  stackmissingend,
vector< int > *  stackfragmentdepth 
) [private]

void design::SelectSequence ( int **  tree,
bool  random,
int  depth,
const double  pernucdefect,
long  seed = 1 
) [private]

defect<=pernucdefect

void design::SelectSequenceHeuristic ( int **  tree,
bool  random,
int  depth,
const double  pernucdefect,
long  seed = 1 
) [private]

void design::SpecifyRedesignLimits ( int  leaf,
int  parent,
int  mutate 
)

Change the defaults for maximum redesigns. This function allows the programmer to change the maximum number of redesigns at three levels from the defaults. The defaults are to redesign leaves (leaf) up to 3 times, parent nodes (parent) up to 10 times, and to mutate nucleotides for defect-weighted mutation (mutate) up to 4 times.

Parameters:
leaf is an int that specifies the maximum number of times the leaf is re-optimized at random.
parent is an int that specifies the maximum number of redesigns per parent node.
mutate is an int that specifies the maximum number of times a nucleotide will be mutated during defect-weighted reoptimization.

void design::SpecifyWeightedDefect ( bool  DefectWeighted  ) 

Change the default for whether weighted-defect optimization should occur. This function allows the programmer to change whether the ascent back up the tree (if check of weighted defect fails) should only redesign a fraction of the sequence. The default is for this to occur.

Parameters:
DefectWeighted is a bool that specifies whether defect-weighted re-optimization should occur (true=yes, false=no).

void design::StoreBestSequence ( int  start,
int  end,
int  missingstart,
int  missingend,
char **  sequence,
int  fragmentdepth 
) [private]

void design::StoreMutation ( int  start,
int  end,
int  missingstart,
int  missingend,
char *  sequence 
) [private]

int design::toint ( char  i  )  [private]

char design::tonuc ( int  i  )  [private]


Member Data Documentation

bool design::defectweighted [private]

int design::MaxLeafRedesign [private]

int design::MaxMutate [private]

int design::MaxRedesign [private]

int design::numbering [private]


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