schemarecomb.optimizers.RASPP¶
- class schemarecomb.optimizers.RASPP(parents, n, start_overhangs=None, end_overhangs=None, energy_func_type=<class 'schemarecomb.energy_functions.SCHEMA'>, gg_enzyme='BsaI-HFv2', gg_threshold=0.95, amino_to_cdn=None)¶
Recombination as a shortest path problem.
Construct the graph depicted in Endelman et al 2004 figure 2. A node at index i in column c represents the selection of the (c-1)th breakpoint at the ith position in the multiple sequence alignment. Specifically, the ith amino acid in an aligned chimera will be the first residue of block c, while the (i-1)th amino acid is the last residue of block c-1. An edge between two nodes represents the block between the two breakpoints. A recombinant sequence library is therefore a traversal through the graph from node (c=0, i=0) to (n, i_f), where the sum of the edge weights in the path is the average energy of the library.
- Parameters
parents (
_ParentSequences) – Aligned parent sequences.n (
int) – Number of breakpoints in output libraries, not including breakpoints at positions 0 and len(parents.alignment).start_overhangs (
Optional[list[Overhang]]) – Overhang options for the breakpoint at position 0. If None, no BreakPoint will be inserted at this location.start_overhangs – Overhang options for the breakpoint at position len(parents.alignment). If None, no BreakPoint will be inserted at this location.
energy_func_type (
Type[EnergyFunction]) – Class used to calculate the energy of generated libraries.gg_enzyme (
Union[str,RestrictionEnzyme]) – The restriction enzyme used to detect and evaluate Golden Gate sites.gg_threshold (
Union[float,Decimal]) – The minimum threshold for a set of Golden Gate overhangs to be considered optimal. Setting this value lower may result in a faster runtime.amino_to_cdn (
Optional[dict[str,set[str]]]) – Mapping from amino acids to available codons. If None, a simple E. coli codon optimization will be used.
- Attributes
valid_bps (list[BreakPoint]) – Parent alignment positions where a Golden Gate site could go. Libraries are constructed from combinations of elements in this list.
columns (list[list[_Node]]) – RASPP graph, e.g. figure 2 in Endelman et al. 2004. Traversal over this graph results in Libraries.