Skip to main content

GRASP Library Designer

Codon-optimize GRASP (Farley et al., NAR 2025) binder DNA for Golden Gate assembly.

PyPI package: grasp-library-designer
Import name: grasp_library

Two Colab Forms notebooks:

Notebook Purpose
grasp_oneshot_designer.ipynb One target RNA → binder protein → free GGA cut sites → oligos
grasp_library_designer.ipynb Redesign / anneal the 42-module combinatorial library, then GAP-compile a target

Hard constraints (library path): protein sequence fixed (synonymous codons only); coding Golden Gate overhang bases stay locked in coding_mask. Objectives: ligation fidelity (Potapov / GGAssembler), codon optimality, synthesis fitness.

License: AGPL-3.0 (required by the vendored GGAssembler / dawdlib ligation engine). See LICENSE and THIRD_PARTY_LICENSES.md.


Install (PyPI)

pip install grasp-library-designer
# optional notebook extras
pip install "grasp-library-designer[notebook]"

Minimal API check:

from grasp_library import materialize_project, build_default_config, LigationFidelityCalculator

project = materialize_project()          # creates ./grasp_library_project + GenBank
config = build_default_config(project / "input")
print(LigationFidelityCalculator(25, 18).set_fidelity(["AATG", "GATA"]))

Until the package is published on PyPI, install from GitHub (private repo needs a PAT):

pip install "git+https://<TOKEN>@github.com/JustABiologist/grasp-library-designer.git@main"

Or clone and install editable:

git clone https://github.com/JustABiologist/grasp-library-designer.git
cd grasp-library-designer
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[notebook,dev]"

Run in Google Colab

Both notebooks use Colab Forms (#@title / #@param, {display-mode: "form"}).

1. Open a notebook

From GitHub → Open in Colab, or upload the .ipynb.

2. Install

In 0 · Install, choose:

Mode When
PyPI After the package is on PyPI (pip install grasp-library-designer)
Private GitHub Clone this private repo with a repo-scoped PAT
Local editable Notebook already lives in a checkout

3a. One-shot

Settings → Preview binder → Design oligos → Export Excel
Outputs: grasp_library_project/output/oneshot/{RNA}/

3b. Combinatorial library

Settings → Import → Redesign overhangs → Anneal → Pareto plot → Export → Compile target
Outputs: grasp_library_project/output/

Bundled Farley et al. GenBank modules are copied into the project folder on first run via materialize_project().


Run locally (Cursor / Jupyter / VS Code)

pip install -e ".[notebook]"
python -m ipykernel install --user --name grasp-library-designer --display-name "grasp-library-designer"

Select that kernel, open either notebook, run top-to-bottom.


Package layout

grasp_library/                 # installable Python package
  data/profiles/.../genbank/   # bundled GRASP GenBank modules
  paths.py                     # materialize_project()
  ...
third_party/dawdlib_golden_gate/   # Potapov ligation fidelity (AGPL; also installed)
grasp_*_designer.ipynb             # Colab Forms UIs (also in sdist)

Build / publish (maintainers)

pip install -e ".[dev]"
python -m build
twine check dist/*
# Test PyPI first (recommended):
twine upload --repository testpypi dist/*
# Production:
twine upload dist/*

Requires a PyPI API token (TWINE_USERNAME=__token__, TWINE_PASSWORD=pypi-...).


Hiding code (Colab / Jupyter / VS Code)

Frontend How
Google Colab Forms: #@title … {display-mode: "form"} + #@param
Cursor / VS Code Notebook: Collapse All Cell Inputs

Hide ≠ protect. Source remains in the .ipynb.


License notes

  • Distributed package license: AGPL-3.0 (see LICENSE).
  • Vendored ligation engine under third_party/dawdlib_golden_gate/ is AGPL-3.0 (Fleishman-Lab / GGAssembler).
  • GRASP sequences: Farley et al., Nucleic Acids Res. 2025.

Quick smoke test

python - <<'PY'
from pathlib import Path
from grasp_library import (
    materialize_project,
    build_default_config,
    run_oneshot_design,
    LigationFidelityCalculator,
)
from grasp_library.codon_tables import apply_organism_codon_table, load_codon_usage

project = materialize_project()
input_dir = project / "input"
cfg = build_default_config(input_dir)
cfg["optimizer"]["iterations_per_part"] = 200
apply_organism_codon_table("Escherichia coli (Kazusa)", input_dir / "codon_usage.csv")
_, codon_data = load_codon_usage(input_dir / "codon_usage.csv", genetic_code=1)
run_oneshot_design(
    target_rna="UUACACGUG",
    codon_data=codon_data,
    config=cfg,
    output_dir=project / "output" / "oneshot" / "UUACACGUG",
    n_fragments=4,
    fidelity=LigationFidelityCalculator(25, 18),
)
print("ok")
PY

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grasp_library_designer-0.1.0.tar.gz (184.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grasp_library_designer-0.1.0-py3-none-any.whl (269.2 kB view details)

Uploaded Python 3

File details

Details for the file grasp_library_designer-0.1.0.tar.gz.

File metadata

  • Download URL: grasp_library_designer-0.1.0.tar.gz
  • Upload date:
  • Size: 184.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for grasp_library_designer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 94c90476bd2e6b42d6ec502e94e8d5dcefe8decf76ddfb841b9e4666ebf59175
MD5 88d8868ebbc51bf44439cf52b2acc7b9
BLAKE2b-256 6ddd1bb8e0cb23f8bf6354b552d96c6e2d1d16ea06beac0605e9aaa7548f3ebe

See more details on using hashes here.

File details

Details for the file grasp_library_designer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for grasp_library_designer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d3ec8b0acdf4089c56d39bdb9fc46cf72e38f6d6b2328333b715925280c1940
MD5 d81558f62ea3ded99d659644cabb5662
BLAKE2b-256 475eab333efce0945e89cf2efdbaf74cdd0f358ee1fa0e011420e976bfdaa3c0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.1

2 files

This release

0.1.0 This release

2 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