Skip to content
mdelmans edited this page Jul 23, 2018 · 1 revision

LoopDB creates several tables behid the scene, which are used to store part elements.

RE Table

RE Table stores Restriction enzyme definitions.

RE Table
    name:       Name of restriction enzyme
    seq:        Recognition sequence of the enzyme

RES Table

RES Table stores pairs of restriction enzyme overhangs, that will be further used to define receivers and adapters for Base sequences and Backbones.

RES Table
    name:       Name of a restriction site
    site5:      Sequence of a 5' overhang
    site3:      Sequence of a 3' overhang

BaseSeq Table

BaseSeq Table stores definitions of Base sequences, which conceptually are meta-backbones composed of a backbone sequence and receiver overhangs. In original Loop Assembly schema there are two Base sequences: Ly (level odd) and Lx (Level even).

BaseSeq Table
    name:       Name of a Base sequence
    seq:        Sequence
    receiver:   RES corresponding to the receiver overhangs

Backbone Table

Backbone table stores definitions of the backbones, which conceptually are variants of the Base sequences, defined by unique adapter overhangs. In original Loop Assembly schema these are Lx1 - Lx4 and Ly1 - Ly4.

Backbone Table
    name:       Name of a Backbone
    baseSeq:    Corresponding BaseSeq
    adapter:    RES corresponding to the adapter overhangs.
    *seq:       Backbone sequence
    *record:    Corresponding SeqRecord

Part Table

Here LoopDB stores all the parts.

Part
    name:       Name of a Part
    backbone:   Corresponding backbone
    seq:        Original part sequence (Only for Level 0 parts)
    children:   List of references to subparts (For Level 1 and higher)
    *level:     Level of the part, defines as maximum level of the children + 1.
    *partSeq:   Paert sequence : a recursive sum of all part's children sequences (seq), including overhangs.
    *fullSeq:   Same as *partSeq but with backbone sequence included.
    *record:    SeqRecord with *partSeq as a sequnce pluss all annotations from the supplied gb files.
    *fullRecord: Same as *record but with backbone sequence and annotation.

Note: Asterisks * denote properties that are not stored in the database, but are genrated on the fly. # Advanced LoopDB is based on SQLAlchemy, which offers an advanced database querying system ( apart from many more other things ). You can get SQLAlchemy Session either by using LoopDB.session or creating a new session via LoopDB.Session() method.

loopDB = LoopDB(...)
session = loopDB.Session()
parts = session.query(Part).filter( ... ).all()
session.close()

# OR

parts = loopDB.session.query(Part).filter( ... ).all()

For more information on querying see SQLAlchemy tutorial.

You can also have a look in tables.py file to see the definition of the SQLAlchemy tables and their methods.