liulab-mbio¶
Molecular biology design tools for sequences, enzymes, primers and cloning. You give it your own files; it picks the enzymes, designs the oligos, builds the plasmid you should get, and writes the bench protocol. One command plans a whole job. Everything it writes is a file you can open — a map in SnapGene, a sheet in a spreadsheet, one page in a browser.
One install gives two commands: mbio for a job with a standard name, and synbio for this
lab's own projects, iGGA and DMX. Two commands says which one a job wants.
graph LR
M["Cloning method"] -- "planned into" --> P["Protocol"] -- "chained by an item" --> J["Project"]
A cloning method is how fragments are joined. A protocol is one page someone follows at the bench. A project is protocols run in order, each handed what the ones before it produced.
Pick a job¶
Each row is one job, with a worked run you can repeat. For a cloning job, Choosing a method weighs the four against each other.
| What you want | Start here |
|---|---|
| Join fragments in one tube, in the order you choose | Golden Gate assembly |
| Join fragments by bases they share, with no enzyme site needed | Gibson assembly |
| Cut and paste at a pair of restriction sites | Restriction and ligation |
| Move a gene between plasmids by recombining att sites | Gateway cloning |
| A primer pair for a fragment, checked against a whole genome | Primer design |
| Barcodes far enough apart that no two can be read as one | Barcode sets |
| A protein written as DNA for a host, free of the sites you name | Codon optimisation |
| A plasmid map to look at, or a figure for a paper | Maps and figures |
The next two are projects, run with synbio. Each works across a library or a plate of wells,
not one plasmid.
| What you want | Start here |
|---|---|
| Every combination of several protein lists, each part barcoded | iGGA |
| Read back which design landed in each well of a plate | DMX |
Install it¶
The repo uses pixi and nothing else. No pip, no conda, no uv. Clone the repo, then:
pixi install
That reads pyproject.toml and builds the environment from the lock file, so you get the
same versions the tests ran on. You now have both commands.
Run it¶
Golden Gate, from a vector file and an insert file that ship with the repo. --out names the
folder to write into, and makes it if it is not there:
pixi run mbio cloning goldengate plan tests/data/pUC19.dna tests/data/GFP.dna --out plan/
It prints the design in one line, then the nine files it wrote:
pUC19-GFP: 3347 bp, BbsI, 2 fragments, overhangs ATGA, TGGC, fidelity 100% (measured), checks warn
plan/product.dna
plan/puc19-backbone-amplicon.dna
plan/gfp-amplicon.dna
plan/primers.tsv
plan/protocol.json
plan/puc19-backbone-amplicon-map.html
plan/gfp-amplicon-map.html
plan/product-map.html
plan/protocol.html
| File | What it is |
|---|---|
| product.dna | the finished plasmid, features carried over and both joins marked. Opens in SnapGene |
| puc19-backbone-amplicon.dna, gfp-amplicon.dna | each amplicon, tails and all, whose end its PCR step draws |
| primers.tsv | the nine oligos to order, with length and melting temperature |
| protocol.json | the same protocol as data |
| puc19-backbone-amplicon-map.html, gfp-amplicon-map.html | each amplicon as a map you can explore, which its PCR step's figure opens |
| product-map.html | the finished plasmid as a map you can explore, which the figure on the page opens |
| protocol.html | the protocol as one page: no network, nothing to install |
Each name links to what that run wrote, published here unedited. Nothing in it is typed by
hand, so the same two input files always give the same nine. To change the design, change the
command and run it again. To change what the page says, edit protocol.json and
make the page from it again.
Golden Gate assembly reads that run line by line, and Protocols covers the page it wrote.
Do it from Python¶
from mbio.cloning.goldengate import plan_assembly
plan = plan_assembly("tests/data/pUC19.dna", "tests/data/GFP.dna")
plan.write("plan/")
Each method has one function like that as its way in. Sequence files read into one shared model, whatever their format:
from mbio.io import read_record
record = read_record("tests/data/pUC19.dna")
Python reference has the rest, and Command line
every verb. The code is at
liuhlab/liulab-mbio, where pixi run check runs
the linters, the type checker and the tests.