Design.py: Class as wrapper for ViennaRNA and Nupack functions to design an RNA molecule This implements the core class which holds all the states of a riboswitch
RNAsketch.Design.
Design
(structures, sequence='')[source]¶Bases: object
Design contains all neccessary information to generate a RNA device or to return a solution. It is used as a container between the different functions.
Parameters: |
|
---|
classtype
¶ensemble_defect
¶Returns: | Dict of ensemble defect values of all states with state names as keys |
---|
eos
¶Returns: | Dict of energy of structure values of all states with state names as keys |
---|
eos_diff_mfe
¶Returns: | Dict of energy of structure to MFE difference values of all states with state names as keys |
---|
eos_reached_mfe
¶Returns: | Dict of booleans telling if the energy of struct equals the mfe energy of all states with state names as keys |
---|
length
¶Returns: | Length of the designed sequence |
---|
mfe_energy
¶Returns: | Dict of mfe values of all states with state names as keys |
---|
mfe_structure
¶Returns: | Dict of mfe structures of all states with state names as keys |
---|
newState
(key, struct, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Creates a new state of the given subclass.
Parameters: |
|
---|
number_of_structures
¶Returns: | Number of uniq structures of all states |
---|
pf_energy
¶Returns: | Dict of partition function energy values of all states with state names as keys |
---|
pf_structure
¶Returns: | Dict of partition function consensus structures of all states with state names as keys |
---|
pos
¶Returns: | Dict of probability of structure values of all states with state names as keys |
---|
sequence
¶Returns: | Sequence of this design object |
---|
structures
¶Returns: | List containing the structures of all states |
---|
write_csv
(separator=';')[source]¶Generates a csv version of all values of this design separated by the given separator
Parameters: | separator – separator for the values |
---|---|
Returns: | string containing all values of this design separated by the given separator |
RNAsketch.Design.
get_Design
(structures, sequence, package, temperature=None)[source]¶Convenience function to build and return the right Design object
Parameters: |
|
---|
RNAsketch.Design.
hotknotsDesign
(structures, sequence='')[source]¶Bases: RNAsketch.Design.Design
classtype
¶newState
(key, struct, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Creates a new state of the given subclass.
Parameters: |
|
---|
RNAsketch.Design.
nupackDesign
(structures, sequence='')[source]¶Bases: RNAsketch.Design.Design
classtype
¶newState
(key, struct, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Creates a new state of the given subclass.
Parameters: |
|
---|
RNAsketch.Design.
pkissDesign
(structures, sequence='')[source]¶Bases: RNAsketch.Design.Design
classtype
¶newState
(key, struct, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Creates a new state of the given subclass.
Parameters: |
|
---|
RNAsketch.Design.
vrnaDesign
(structures, sequence='')[source]¶Bases: RNAsketch.Design.Design
classtype
¶newState
(key, struct, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Creates a new state of the given subclass.
Parameters: |
|
---|
State.py: Class as wrapper for ViennaRNA and Nupack functions to design an RNA molecule. This implements the various states of a riboswitch.
RNAsketch.State.
State
(parent, structure=None, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Bases: object
State object holds structure, ligand, constraints and calculates all values for this state.
Parameters: |
|
---|
classtype
¶constraint
¶Returns: | Structural constraint of this state (hard constraint) |
---|
cut_points
¶Returns: | List containing the positions of the cut points (& or +) in the sequence |
---|
enforce_constraint
¶Returns: | Boolean whether to enforce the hard constraint or not |
---|
ensemble_defect
¶Returns: | Ensemble defect value given all the properties of this state (constraints, temperature,…) |
---|
eos
¶Returns: | Energy of structure given all the properties of this state (constraints, temperature,…) |
---|
eos_diff_mfe
¶Returns: | Energy difference of structure to mfe given all the properties of this state (constraints, temperature,…) |
---|
eos_reached_mfe
¶Returns: | Boolean defining whether the eos reached the mfe energy |
---|
length
¶Returns: | Length of the design sequence if available, otherwise of the stuctural input |
---|
ligand
¶Returns: | Ligand binding definitions for this state; List with sequence pattern, structure pattern and binding energy (soft constraint) |
---|
mfe_energy
¶Returns: | MFE value given all the properties of this state (constraints, temperature,…) |
---|
mfe_structure
¶Returns: | MFE structure given all the properties of this state (constraints, temperature,…) |
---|
multifold
¶Returns: | Number of cut points to specify if it is a cofold or multifold problem |
---|
pf_energy
¶In case of a dimer cofold calculation with viennarna, the function returns the energy of true hybrid states only.
Returns: | Partition function energy value given all the properties of this state (constraints, temperature,…) |
---|
pf_structure
¶Returns: | Partition function consensus structure given all the properties of this state (constraints, temperature,…) |
---|
pos
¶Returns: | Probability of structure given all the properties of this state (constraints, temperature,…) |
---|
structure
¶Returns: | Dot-bracket structure as constraint for this state |
---|
temperature
¶Returns: | Temperature of this state |
---|
RNAsketch.State.
add_cuts
(input, cut_points)[source]¶Takes a string and add back the cut point characters at the positions stored in the cut points list
Parameters: | input – string without cut point characters |
---|---|
Returns: | string containing cut point characters |
RNAsketch.State.
create_bp_table
(structure)[source]¶Takes a structure in dot bracket notation and returns a base pair table. Unpaired positions are -1, otherwise the index of the adjacent bracket is listed
Parameters: | structure – string with dot-bracket notation of the strcture |
---|---|
Return bpt: | base pair table |
RNAsketch.State.
hotknotsState
(parent, structure=None, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Bases: RNAsketch.State.State
classtype
¶RNAsketch.State.
nupackState
(parent, structure=None, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Bases: RNAsketch.State.State
classtype
¶RNAsketch.State.
pKissState
(parent, structure=None, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Bases: RNAsketch.State.State
classtype
¶RNAsketch.State.
remove_cuts
(input)[source]¶Takes a string and removes all cut characters (+&) from this string
Parameters: | input – string containing cut point characters |
---|---|
Returns: | string without cut point characters |
RNAsketch.State.
vrnaState
(parent, structure=None, temperature=37.0, ligand=None, constraint=None, enforce_constraint=False)[source]¶Bases: RNAsketch.State.State
classtype
¶RNAsketch.Structure.
RNAStructure
(dotbracket)[source]¶Bases: object
RNAStructure object to handle RNA secondary structures. Holds a pairtable internally to operate on.
Parameters: | dotbracket – Dot-bracket notation of the RNA secondary structure as string |
---|
RNAsketch.RNARedPrintSampler.
RPSampler
(structures, constraint='', model='nussinov', weights=[], gcweight=1, temperature=37.0, stacksize=1000, StopConstruct=False, RedPrintFolder=None, debug=False)[source]¶Bases: object
RPSampler is a python wrapper for RNARedPrint and implements a similar interface to the RNAblueprint DependencyGraphMT object.
Parameters: |
|
---|
dump_new_stack
()[source]¶Draws a sample from RNARedPrint and returns the list of generated sequences at once. The variable stacksize specifies the amount of sequences.
Returns: | List of RNA sequence strings |
---|
gcweight
¶Integer specifying the GC-weight, ]0, +infinity]
get_sequence
()[source]¶Get the sampled sequence as a string.
Returns: | RNA Sequence string in IUPACK notation |
---|
model
¶String specifying the sampling model.
Returns: | string, can be ‘uniform’, ‘nussinov’, ‘basepairs’ or ‘stacking’ |
---|
revert_sequence
(amount)[source]¶Compatibility to the DependencyGraphMT object, does nothing internally.
set_history_size
(size)[source]¶Compatibility to the DependencyGraphMT object, does nothing internally.
weights
¶List of integers specifying the boltzmann weight for the target structures, range in ]0, +infinity]