Parts

Moclo part classes.

Abstract

class moclo.core.parts.AbstractPart(object)[source]

An abstract modular cloning part.

Parts can be either modules or vectors, but are determined by their flanking overhangs sequences, declared in the signature class attribute. The part structure is derived from the part class (module of vector), signature, and restriction enzyme.

Example

>>> class ExamplePart(AbstractPart, Entry):
...     cutter = BsaI
...     signature = ('ATGC', 'ATTC')
...
>>> ExamplePart.structure()
'GGTCTCN(ATGC)(NN*N)(ATTC)NGAGACC'
__init__(record)
classmethod characterize(record)[source]

Load the record in a concrete subclass of this type.

is_valid()

Check if the wrapped record follows the required class structure.

Returns

True if the record is valid, False otherwise.

Return type

bool

classmethod structure()[source]

Get the part structure, as a DNA regex pattern.

The structure of most parts can be obtained automatically from the part signature and the restriction enzyme used in the Golden Gate assembly.

Warning

If overloading this method, the returned pattern must include 3 capture groups to capture the following features:

  1. The upstream (5’) overhang sequence

  2. The vector placeholder sequence

  3. The downstream (3’) overhang sequence