schemarecomb.generate_libraries¶
- schemarecomb.generate_libraries(parents, num_blocks, start_overhangs=None, end_overhangs=None, min_block_len=None, max_block_len=None, algorithm='SCHEMA-RASPP')¶
Wrapper for optimizers that generate chimeric protein libraries. Uses the restriction enzyme BsaI-HFv2, an initial Golden Gate efficiency threshold of 95%, and a simple E. coli codon optimization dictionary. For fine control over these parameters, directly use the Optimizer objects in the optimizer module.
At present, the only implemented algorithm is SCHEMA-RASPP, which uses
RASPPwith theSCHEMAenergy function.The start_overhangs and end_overhangs parameters are commonly used to insert the assembled chimeras into a vector.
- Parameters
parents (
_ParentSequences) – Aligned parent sequences.num_blocks (
int) – Number of blocks in the generated libraries. Must be greater than 1.start_overhangs (
Optional[list[Overhang]]) – Overhang options for the breakpoint at position 0. If None, no breakpoint will be inserted at this position.end_overhangs (
Optional[list[Overhang]]) – Overhang options for the breakpoint at position len(parents.alignment). If None, no breakpoint will be inserted at this position.min_block_len (
Optional[int]) – Smallest block length allowed in generated libraries. If None, the minimum block length will be len(parents.alignment) // (num_blocks + 1).max_block_len (
Optional[int]) – Largest block length allowed in generated libraries. If None, the maximum block length will be len(parents.alignment) // (num_blocks - 1).algorithm (
str) – Name of the algorithm used to generate libraries. Currently must be ‘SCHEMA-RASPP’.
- Return type
list[_Library]- Returns
Collection of libraries found using the algorithm specified.
- Raises
NotImplementedError – If algorithm is anything except ‘SCHEMA-RASPP’. This will be changed in future versions.
ValueError – If num_blocks is less than 2.
LibrariesNotFound – If no libraries could be generated given the inputs.