Skip to main content

synbio

synbio is a library for designing and assembling DNA. Users can design plasmids or libraries and export multi-step build protocols. Input SeqRecords. Output assembly SeqRecords, protocols, plate maps, and robotic picklists.

Documentation is available at https://lattice-automation.github.io/synbio

Installation

pip install synbio

Models

synbio only expects the user to define their Design and Protocol. Several protocols are pre-defined.

Designs

All are in synbio.designs:

  • Combinatorial - list of SeqRecords to combinatorially anneal into all valid assemblies
  • CombinatorialBins - list of bins of SeqRecords for combinatorial assembly of records between bins
  • Plasmid - single list of SeqRecords to combine into a plasmid
  • PlasmidLibrary - list of list of SeqRecords to combine into plasmids

Protocols

All are in synbio.protocols:

Example

In the example below, the user specifies a combinatorial library design. All SeqRecords are tested for circularization with other SeqRecords. New and valid plasmids are assembled.

Behind the scenes, synbio is filtering all combinations of SeqRecords from the design that will circularize into valid plasmids (via circuits in a graph). After running the protocol, users can export plate maps (to_csv()), composite plasmids (to_fasta(), to_genbank()), and assembly instructions (to_txt(), to_picklists()).

"""Example of a Combinatorial Golden Gate assembly with human and robot output protocols."""

import os
from Bio.SeqIO import parse
from synbio.designs import Combinatorial
from synbio.protocols import GoldenGate

def read_all_records():
    gg_dir = os.path.join(".", "data", "goldengate")
    records = []
    for file in os.listdir(gg_dir):
        if file.endswith(".gb"):
            records.extend(parse(os.path.join(gg_dir, file), "genbank"))
    return records

# create a combinatorial library design from all valid combinations
design = Combinatorial(read_all_records())

# create a protocol using Golden Gate as the sole composite step and run
protocol = GoldenGate(
    name="Combinatorial Golden Gate",
    design=design,
    include=["KanR"],  # only keep circularized plasmids with a KanR SeqFeature
    min_count=5,  # only keep circularized plasmids from >=5 SeqRecords
)
protocol.to_fasta("plasmids.fasta")  # export multi-FASTA
protocol.to_csv("plates.csv")  # export plate layouts
protocol.to_txt("protocol.txt")  # export human protocol
protocol.to_picklists("picklist", platform="hamilton")  # export a hamilton picklist

plasmids.fasta:

>J23100_AB+B0032m_BC+C0012m_CD+B0015_DE+DVK_AE
GGAGTTGACGGCTAGCTCAGTCCTAGGTACAGTGCTAGCTACTAGAGTCACACAGGAAAG
TACTAAATGATGGTGAATGTGAAACCAGTAACGTTATACGATGTCGCAGAGTATGCCGGT
...

plates.csv:

Setup Wells with volumes (uL) shown:
Plate:1,1,2,3,4,5,6,7,8,9,10,11,12
A,B0015_DE(4),C0080_CD(18),R0010_AB(54),water(36)
B,B0015_DE(160),DVK_AE(160),cre_CD(18),water(156)
...

protocol.txt:

Combinatorial GoldenGate:
1. Setup PCR plate with (volumes) shown:
	1.1. Dilute plasmid DNA to 75 ng/µL in 'water'
	1.2. Create 'assembly-mix' from 1:1 T4 Ligase Buffer (10X) and NEB Golden Gate Assembly Mix
...

picklist.gwl:

A;Plate:2;;;15;;2.0;;;
D;Plate:3;;;80;;2.0;;;
W;;;;;;;;;
...

Annotation

In addition to DNA assembly, synbio exposes a plasmid annotation function in synbio.features. An example below shows a SeqRecord being augmented with additional SeqFeatures from a curated database of common plasmid features.

from Bio.SeqIO import parse
from synbio.features import annotate

record = next(parse("plasmid.fa", "fasta"))
record_with_features = annotate(record, identity=0.96)

Alternatives

This is a non-exhaustive list. Contact me for a comparison of these libraries/platforms and synbio.

  • Aquarium is an extensive library/application for LIMS, protocol definition/execution, and workflow design. A lab operating system.
  • Autoprotocol is a specification standard for experiments in the life sciences.
  • BioBricks is a general focus, web-based editor for describing experiments in Biology.
  • Biocoder is a C++ library with extensive protocol step definition capabilities.
  • Plateo is a python library for planning, running and checking laboratory experiments. Great for parsing and exporting plates and picklists form multiple formats.
  • pydna is a python DNA assembly simulation library with a human-readable description of clone and assembly strategies.

Metadata

Release files for synbio 0.6.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synbio 0.6.18
File Size Uploaded
synbio-0.6.18.tar.gz 76.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for synbio 0.6.18
File Interpreter ABI Platform
synbio-0.6.18-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 MB

Release files / synbio-0.6.18.tar.gz

Download URL synbio-0.6.18.tar.gz
Size 76.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f1c4d1c347886ff7fdb21e495e33087eb056f458506226697d1cc2640a82c1c1
BLAKE2b-256 checksum
How to use checksums
9b7a9f49af79896e4a3ff53f97f7cbcd25f00d95755f8a31d0d93ef14a97b61d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / synbio-0.6.18-py3-none-any.whl

Download URL synbio-0.6.18-py3-none-any.whl
Size 19.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4709d69233d8b5fa0669eb2d070f2f420453eb7f89c5e2d90ff045be5dd9b54f
BLAKE2b-256 checksum
How to use checksums
fc4ab02ceb1143e1a214db9b0d4d47679962645fee0183235d4fdaa04b2f83aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release history Release notifications | RSS feed

This release

0.6.18 This release

2 release files

0.6.17

2 release files

0.6.16

2 release files

0.6.15

2 release files

0.6.14

2 release files

0.6.13

2 release files

0.6.12

2 release files

0.6.11

2 release files

0.6.10

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

2 release files

0.5.0

2 release files

0.4.27

2 release files

0.4.26

2 release files

0.4.25

2 release files

0.4.24

2 release files

0.4.23

2 release files

0.4.22

2 release files

0.4.21

2 release files

0.4.20

2 release files

0.4.18

2 release files

0.4.17

2 release files

0.4.16

2 release files

0.4.14

2 release files

0.4.13

2 release files

0.4.12

2 release files

0.4.11

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page