schemarecomb.libraries.LibraryConfig

class schemarecomb.libraries.LibraryConfig(energy_function, gg_enzyme, gg_threshold=1.0, mr_cache=None, amino_to_cdn=None)

Holds parameters shared across a collection of Library instances.

Passed into schemarecomb.Library.calc_from_config() constructor.

Parameters
  • energy_function (EnergyFunction) – The EnergyFunction used the calculate to energy attribute of a Library. Note that this attribute is purely for recordkeeping; no computation is done with energy_function in Library.calc_from_config. Therefore, it is up to the user to ensure that energy_function correctly reflects the EnergyFunction used calculate energy.

  • gg_enzyme (RestrictionEnzyme) – The enzyme used to calculate gg_prob and optimize over possible gg_overhangs. This should correspond to the restriction enzyme to be used to assemble the library.

  • gg_threshold (Union[float, Decimal]) – Minimum gg_prob for a set of overhangs to be considered optimal. May be set < 1.0 for faster runtime, but then a Library’s gg_overhangs is not guaranteed to be the set with maximum gg_prob.

  • mr_cache (Optional[MutationRateCache]) – Optional cache used to speed up mutation rate calculations by reusing values from adjacent libraries.

  • amino_to_cdn (Optional[dict[str, set[str]]]) – Mapping of amino acids to codons. Forms a simple codon optimization.