FastAPI ๊ธฐ๋ฐ DNA ์กฐํฉ ์ด์
๋ธ๋ฆฌ ์ค๊ณ ๋ง์ดํฌ๋ก์๋น์ค.
Part ์์ด + Module ์ค๊ณ๋ฅผ ์
๋ ฅ๋ฐ์ GoldenGate / Gibson ์ด์
๋ธ๋ฆฌ ์๋ฎฌ๋ ์ด์
์ ์ํํ๊ณ ๊ฒฐ๊ณผ๋ฅผ JSON + GenBank(base64)๋ก ๋ฐํํฉ๋๋ค.
Partbank26(partbank26/backend)์์ HTTP๋ก ํธ์ถ๋๋ฉฐ, Docker Compose๋ก ๋
๋ฆฝ ์ปจํ
์ด๋(combinatorial)๋ก ์คํ๋ฉ๋๋ค.
- ์ํคํ ์ฒ
- ๋น ๋ฅธ ์์ (Docker)
- API ๋ ํผ๋ฐ์ค
- GoldenGate ์ด์ ๋ธ๋ฆฌ ๋ก์ง
- ์ค๋ฅ / ๊ฒฝ๊ณ ๋ฉ์์ง ํด์ค
- Partbank26 ์ฐ๋
- ํ ์คํธ
- ์ฃผ์ ๋ณ๊ฒฝ ์ด๋ ฅ
- ๋ ๊ฑฐ์ ์ฌ์ฉ๋ฒ (Jupyter ์คํฌ๋ฆฝํธ)
Partbank26 Backend (FastAPI :8000)
โโ POST /api/v1/combinatorial/run
โ part_ids โ DB ์กฐํ โ ์์ด resolve
โผ
Combinatorial Microservice (FastAPI :8001)
โโ POST /run
โ
โโ [GoldenGate] prepare_goldengate_fragments()
โ ํํธ๋ณ BsaI ์ฌ์ดํธ ๊ฐ์ง / ๋ํ
โ
โโ filter_combinations_by_overhang()
โ ์ธ์ ์ฌ๋กฏ ์ค๋ฒํ ์ผ์น ์ฌ๋ถ๋ก ์กฐํฉ ํํฐ๋ง
โ
โโ assemble_goldengate()
BsaI ์ ๋จ โ pydna Assembly โ circular/linear
๊ฒฐ๊ณผ: sequence, GenBank(base64), primers, features
ํต์ฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ
pydna5.2.0 โ DNA ์กฐ๋ฆฝ ์๋ฎฌ๋ ์ด์ (Assembly,terminal_overlap,cut)biopython1.84 โ ์์ด ์ฒ๋ฆฌ, GenBank I/O, ์ ํํจ์(BsaI)primers0.5.10 โ ํ๋ผ์ด๋จธ ์ค๊ณ
assets/pUC19.gbโ ๊ธฐ๋ณธ ๋ฒกํฐ ํ์ผ (์์ผ๋ฉด ๋ชจ๋ ์์ฒญ์vector_sequenceํ์)
# partbank26 ๋ฃจํธ์์
docker compose -f docker-compose.dev.yml up combinatorial -d
# ์ฌ๋น๋ (api.py ๋ณ๊ฒฝ ํ)
bash scripts/rebuild-combinatorial.shcurl http://localhost:8001/health
# {"status": "ok"}์๋น์ค ์ํ ํ์ธ.
Response
{"status": "ok"}์กฐํฉ ์ด์ ๋ธ๋ฆฌ ์๋ฎฌ๋ ์ด์ ์คํ.
{
"project_name": "string",
"assembly_method": "goldengate",
"vector_sequence": "ATCG...",
"vector_overhang_left": "AAAA",
"vector_overhang_right": "TCAC",
"parts": [...],
"modules": [...]
}| ํ๋ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
project_name |
string | โ | ํ๋ก์ ํธ ์๋ณ์ |
assembly_method |
"goldengate" | "gibson" |
โ | ๊ธฐ๋ณธ๊ฐ: "goldengate" |
vector_sequence |
string | โ | ๋ฒกํฐ DNA ์์ด. ๋ฏธ์ ๊ณต ์ assets/pUC19.gb ์ฌ์ฉ |
vector_overhang_left |
string | โ | ๋ฒกํฐ ์ข์ธก ์ ํฉ ์ค๋ฒํ (4 nt). ์ฒซ ๋ฒ์งธ ํํธ overhang_left์ ์ผ์นํด์ผ ํจ. ๋ฏธ์ง์ ์ ๊ฒ์ฆ ์๋ต |
vector_overhang_right |
string | โ | ๋ฒกํฐ ์ฐ์ธก ์ ํฉ ์ค๋ฒํ (4 nt). ๋ง์ง๋ง ํํธ overhang_right์ ์ผ์นํด์ผ ํจ. ๋ฏธ์ง์ ์ ๊ฒ์ฆ ์๋ต |
parts |
PartInput[] |
โ | ํํธ ๋ชฉ๋ก |
modules |
ModuleInput[] |
โ | ๋ชจ๋ ์ค๊ณ |
{
"id": "p1",
"kid": "KBp_a0001",
"name": "T7_promoter",
"type": "Promoter",
"sequence": "TAATACGACTCACTATA",
"direction": "forward",
"overhang_left": "GGAG",
"overhang_right": "CTTT"
}| ํ๋ | ์ค๋ช |
|---|---|
name |
GenBank LOCUS ์ด๋ฆ์ผ๋ก ์ฌ์ฉ. ๊ณต๋ฐฑ์ _๋ก ์๋ ์นํ |
type |
์ฌ๋กฏ ํ์ ๊ณผ ๋ค๋ฅด๋ฉด ๊ฒฝ๊ณ (์กฐ๋ฆฝ์ ๊ณ์ ์งํ) |
overhang_left |
BsaI ์ ๋จ ํ ํํธ ์ผ์ชฝ 4 nt sticky end |
overhang_right |
BsaI ์ ๋จ ํ ํํธ ์ค๋ฅธ์ชฝ 4 nt sticky end |
{
"id": "MM1",
"slots": [
{"type": "Promoter", "part_names": ["T7_promoter"]},
{"type": "RBS", "part_names": ["T7_RBS", "B0034"]},
{"type": "CDS", "part_names": ["sfGFP"]},
{"type": "Terminator", "part_names": ["T7_terminator"]}
]
}- ์ฌ๋กฏ ๋ด ํํธ๊ฐ 2๊ฐ ์ด์์ด๋ฉด ์กฐํฉ ํญ๋ฐ(combinatorial expansion) ์ํ
part_names์ ํํธ๋parts๋ฐฐ์ด์ ๋ฐ๋์ ์กด์ฌํด์ผ ํจ
{
"combinations": [
{
"id": "MM1_T7_promoter-T7_RBS-sfGFP-T7_terminator",
"sequence": "ATCG...",
"length": 1234,
"genbank_b64": "TE9DVVMg...",
"primers": [
{"target": "T7_promoter", "direction": "forward", "sequence": "ATCG...", "tm": 58.3, "length": 20}
],
"features": [
{"label": "T7_promoter", "start": 0, "end": 17, "strand": 1}
]
}
],
"total_combinations": 2,
"errors": [
"MM1_T7_promoter-B0034-sfGFP-T7_terminator: ๋ฒกํฐ ๋ด BsaI ์ฌ์ดํธ 1๊ฐ ๋ฐ๊ฒฌ โ ์๋ฎฌ๋ ์ด์
์ ์ํด ์๋ ์นํ๋จ"
]
}errors ๋ฐฐ์ด ๊ตฌ์กฐ
{combo_key}: ...โ ํน์ ์กฐํฉ์์ ๋ฐ์ํ ์ค๋ฅ/๊ฒฝ๊ณ- ์ฝค๋ณด ํค ๋ฏธํฌํจ โ ์ ์ฒด ๊ณตํต ์ค๋ฅ (ํํธ ๋ฏธ๋ฐ๊ฒฌ, ๋ฒกํฐ ์ฝ๊ธฐ ์คํจ ๋ฑ)
GenBank ๋์ฝ๋ฉ ์์ (Python)
import base64
gb_text = base64.b64decode(result["genbank_b64"]).decode()๊ฐ ํํธ๋ฅผ BsaI ์ ๋จ ๊ฐ๋ฅํ -withvector.gb ํ์ผ๋ก ๋ณํํฉ๋๋ค.
Case A โ ํํธ์ BsaI ์ฌ์ดํธ 2๊ฐ ์ ํํ ์กด์ฌ (GGTCTC + GAGACC)
- ๊ธฐ์กด BsaI ์ฌ์ดํธ ์ฌ์ด ์์ด ์ถ์ถ
- ์ค์ ์ค๋ฒํ์ด ์ฌ๋กฏ ์ค์ (
overhang_left/overhang_right)๊ณผ ์ผ์นํ๋์ง ๊ฒ์ฆ - ๋ถ์ผ์น ์ โ Case B ๋์ค ์ฒ๋ฆฌ (๊ฒฝ๊ณ ๊ธฐ๋ก)
Case B โ BsaI ์ฌ์ดํธ ์๊ฑฐ๋ ์ค๋ฒํ ๋ถ์ผ์น
GGTCTCA[OHL][sequence][OHR]TGAGACC
๋ํ ํ ์ ํฉ๋ถ(OHL+seq[:6], seq[-6:]+OHR)์์ ์ฐ๋ฐ์ BsaI ์ฌ์ดํธ ์์ฑ ์ฌ๋ถ ์๋ ๊ฒ์ฌ.
์ค๋ฅ ์ฒ๋ฆฌ
- BsaI ์ฌ์ดํธ 3๊ฐ ์ด์ โ ํด๋น ํํธ ์ ์ธ
- ์ฐ๋ฐ์ ์ ํฉ๋ถ BsaI โ ๊ฒฝ๊ณ + ์กฐ๋ฆฝ ์งํ (๊ฒฐ๊ณผ ๋ถ์ ํ ๊ฐ๋ฅ)
ํ์ผ๋ช
ํ์: {OHL}-{part_name}-{OHR}-withvector.gb
Slot 1: [OHL1-P1-OHR1] โ OHR1 == OHL2 ?
Slot 2: [OHL2-P2-OHR2] โ OHR2 == OHL3 ?
Slot 3: [OHL3-P3-OHR3]
์ธ์ ์ฌ๋กฏ ๊ฐ ์ค๋ฒํ์ด ์ฐ์์ ์ผ๋ก ์ผ์นํ๋ ์กฐํฉ๋ง ํต๊ณผ.
์กฐํฉ ID: {module.id}_{part1}-{part2}-{part3}
๊ฐ ์ ํจ ์กฐํฉ์ ๋ํด:
- ๊ฐ ํํธ
-withvector.gb๋ก๋ โ BsaI ์ ๋จ โ ๊ฐ์ฅ ๊ธด fragment ์ ํ - ๋ฒกํฐ ์ ๊ณต ์:
- ๋ฒกํฐ ๋ด BsaI ์ฌ์ดํธ ์๋ ์นํ (
GGTCTCโGGTCTG,GAGACCโGAGACG) - ๋ฒกํฐ ๋ํ:
GGTCTCA[OHR_last][vector][OHL_first]TGAGACC vector_overhang_left/vector_overhang_right์ง์ ์ ์ค๋ฒํ ์ผ์น ๊ฒ์ฆ ํ ๋ถ์ผ์น ์กฐํฉ ์ ์ธ- BsaI ์ ๋จ โ ๋ฒกํฐ backbone fragment ํ๋
- ์ํ(circular) ์กฐ๋ฆฝ ์ํ
- ๋ฒกํฐ ๋ด BsaI ์ฌ์ดํธ ์๋ ์นํ (
- ๋ฒกํฐ ๋ฏธ์ ๊ณต ์: ์ ํ(linear) ์กฐ๋ฆฝ
- ๊ฒฐ๊ณผ feature ์ ๋ฆฌ: BsaI ๋ง์ปค, ์ค๋ฒํ ๋ ์ด๋ธ, ๋ฒ์ ์ค๋ฅ feature ์ ๊ฑฐ
์ค๋ฒํ ์ฐ๊ฒฐ ๊ตฌ์กฐ
[vector] โโโ OHL_first โโโโบ [Part1] โโโ OHR1/OHL2 โโโโบ [Part2] โโโ OHR_last โโโ [vector]
| ๋ฉ์์ง | ์์ธ | ์ํฅ |
|---|---|---|
๋ฒกํฐ ๋ด BsaI ์ฌ์ดํธ N๊ฐ ๋ฐ๊ฒฌ โ ์๋ฎฌ๋ ์ด์
์ ์ํด ์๋ ์นํ๋จ |
๋ฒกํฐ ์์ด์ BsaI ์ธ์ ์์ด ์กด์ฌ | ์๋ฎฌ๋ ์ด์ ์๋ ๋ณด์ . ์คํ ์ ๋ฒกํฐ ์์ ํ์ |
[๊ฒฝ๊ณ ] {part}: ์ฌ๋กฏ ํ์
'X'์ ํํธ ํ์
'Y'์ด ๋ฐฐ์น๋จ |
์ฌ๋กฏ ํ์ ๊ณผ ํํธ์ ์ค์ ํ์ ๋ถ์ผ์น | ์กฐ๋ฆฝ ๊ณ์ ์งํ. ์ค๊ณ ํ์ธ ๊ถ์ฅ |
[๊ฒฝ๊ณ ] {part}: OHR 'XX' + ์์ด 3' ๋ง๋จ์์ ์๋์น ์์ BsaI ์ฌ์ดํธ N๊ฐ ์์ฑ |
ํํธ ์์ด ๋ง๋จ๊ณผ ์ค๋ฒํ ๊ฒฐํฉ ์ ์ฐ๋ฐ์ GAGACC/GGTCTC ํ์ฑ |
ํด๋น ํํธ๋ฅผ ํฌํจํ ์กฐํฉ ๊ฒฐ๊ณผ ๋ถ์ ํ ๊ฐ๋ฅ. ์ค๋ฒํ ๋ณ๊ฒฝ ๊ถ์ฅ |
{combo}: ๋ฒกํฐ ์ข์ธก/์ฐ์ธก ์ค๋ฒํ ๋ถ์ผ์น |
vector_overhang_left/right๊ฐ ํํธ ์ค์ ์ค๋ฒํ๊ณผ ๋ค๋ฆ |
ํด๋น ์กฐํฉ ์ ์ธ |
{combo}: no BsaI site found in {gbfile} |
BsaI ์ ๋จ ํ fragment ์์ | ํด๋น ์กฐํฉ ์ ์ธ |
{combo}: circular assembly produced no candidates |
pydna assemble_circular() ํ๋ณด ์์ |
ํด๋น ์กฐํฉ ์ ์ธ. ์ค๋ฒํ ์ฐ์์ฑ ์ฌํ์ธ ํ์ |
Part 'X' not found in request |
module.slots[].part_names์ ์๋ ํํธ๊ฐ parts ๋ฐฐ์ด์ ์์ |
ํด๋น ํํธ ์ ์ธ |
AGGAGA๋ก ๋๋๋ ์์ด(์: ์ผ๋ถ RBS) + CC๋ก ์์ํ๋ OHR ์กฐํฉ:
...AGGAGA + CCXX โ AGGAGACC โ GAGACC (BsaI ์ญ๋ฐฉํฅ ์ธ์!)
CC๋ก ์์ํ๋ OHR ๋์ TCAC, GCAG, AATG ๋ฑ ์ฌ์ฉ ๊ถ์ฅ.
๋ฐฑ์๋ ํ๋ก์ ์์น: backend/app/presentation/api/v1/combinatorial.py
๋์ ํ๋ฆ
- ์ฌ์ฉ์ ์์ฒญ์์
part_ids์์ - DB์์ ํํธ ์์ด ์กฐํ (๊ถํ ๊ฒ์ฌ ํฌํจ)
- ์ฌ๋กฏ์
overhang_left/overhang_right๋ฅผ ํด๋น ์ฌ๋กฏ์ ๋ชจ๋ ํํธ์ ์ ์ฉ vector_id์ ๊ณต ์ ๋ฒกํฐ ์์ด DB ์กฐํ- ๋ง์ดํฌ๋ก์๋น์ค
/run์ผ๋ก ํฌ์๋ฉ
Partbank RunRequest ์คํค๋ง
{
"project_name": "my_project",
"assembly_method": "goldengate",
"vector_id": "<vector_db_id>",
"vector_overhang_left": "GGAG",
"vector_overhang_right": "TCAC",
"modules": [
{
"id": "MM1",
"slots": [
{
"type": "Promoter",
"part_ids": ["<partbank_id_1>", "<partbank_id_2>"],
"overhang_left": "GGAG",
"overhang_right": "CTTT"
}
]
}
]
}์ฃผ์: ์ฌ๋กฏ์
overhang_left/overhang_right๋ ํด๋น ์ฌ๋กฏ ๋ด ๋ชจ๋ ํํธ์ ๋์ผํ๊ฒ ์ ์ฉ๋ฉ๋๋ค.
ํํธ๋ณ๋ก ์ค๋ฒํ์ด ๋ค๋ฅธ ๊ฒฝ์ฐ ๋ณ๋ ์ฌ๋กฏ์ผ๋ก ๋ถ๋ฆฌํ์ธ์.
# Docker ์ปจํ
์ด๋ ๋ด์์ ์ ์ฒด ์คํ
docker exec partbank-combinatorial-dev python -m pytest tests/ -v
# ํ
์คํธ ํด๋์ค๋ณ ์คํ
docker exec partbank-combinatorial-dev python -m pytest tests/test_api_integration.py::TestBsaiCutBehavior -v
docker exec partbank-combinatorial-dev python -m pytest tests/test_api_integration.py::TestCircularGoldenGateAssembly -v
docker exec partbank-combinatorial-dev python -m pytest tests/test_api_integration.py::TestPartTypeMismatchWarning -v
docker exec partbank-combinatorial-dev python -m pytest tests/test_api_integration.py::TestVectorOverhangValidation -vํ ์คํธ ํด๋์ค ๋ชฉ๋ก (์ด 28๊ฐ)
| ํด๋์ค | ์ค๋ช |
|---|---|
TestHealthEndpoint |
ํฌ์ค์ฒดํฌ |
TestRunInputValidation |
์ ๋ ฅ ๊ฒ์ฆ (๋น ํํธ, ํ์ ํ๋ ๋ฑ) |
TestRunAssembly |
๊ธฐ๋ณธ ์กฐ๋ฆฝ, 2ร2 ์กฐํฉ ํ์ฅ, ํ๋ผ์ด๋จธ ๊ฒ์ฆ |
TestBsaiCutBehavior |
_wrap_with_bsai, BsaI ์ ๋จ fragment ๊ฒ์ฆ |
TestCircularGoldenGateAssembly |
2ํํธ/4ํํธ ์ํ ์กฐ๋ฆฝ, ๋ฒกํฐ ํฌํจ ์กฐ๋ฆฝ |
TestPartTypeMismatchWarning |
์ฌ๋กฏ-ํํธ ํ์ ๋ถ์ผ์น ๊ฒฝ๊ณ |
TestVectorOverhangValidation |
๋ฒกํฐ ์ค๋ฒํ ๊ฒ์ฆ (์ผ์น/๋ถ์ผ์น/๋ฏธ์ง์ ) |
๊ธฐ์กด Jupyter notebook ๊ธฐ๋ฐ ์คํฌ๋ฆฝํธ๋ฅผ FastAPI REST API๋ก ์ ํ.
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| BsaI ์ฌ์ดํธ ๊ฐ์ง | ๊ธฐ์กด BsaI ์ฌ์ดํธ 2๊ฐ ํํธ ์๋ ์ธ์ ๋ฐ ์ค๋ฒํ ๊ฒ์ฆ |
| ๋ฒกํฐ circular ์กฐ๋ฆฝ | ๋ฒกํฐ backbone ํฌํจ assemble_circular() ์ง์ |
| ๋ด๋ถ BsaI ์๋ ์นํ | ๋ฒกํฐ ๋ด BsaI ์ฌ์ดํธ ์๋ฎฌ๋ ์ด์ ์ฉ ์๋ ์นํ |
| ์ฐ๋ฐ์ ์ ํฉ๋ถ BsaI ๊ฐ์ง | ํํธ ์์ด ๋ง๋จ + OHR ๊ฒฐํฉ ์ BsaI ์์ฑ ์ฌ๋ถ ์๋ ๊ฒ์ฌ |
| ํํธ ํ์ ๋ถ์ผ์น ๊ฒฝ๊ณ | ์ฌ๋กฏ ํ์ vs ํํธ ์ค์ ํ์ ๋น๊ต ๊ฒฝ๊ณ |
| ๋ฒกํฐ ์ค๋ฒํ ๊ฒ์ฆ | vector_overhang_left/right ์ง์ ์ ๋ถ์ผ์น ์กฐํฉ ์ ์ธ |
| feature ์ ๋ฆฌ | ์กฐ๋ฆฝ ํ BsaI ๋ง์ปค, ์ค๋ฒํ ๋ ์ด๋ธ, ๋ฒ์ ์ค๋ฅ feature ์๋ ์ ๊ฑฐ |
| ์กฐํฉ๋ณ ์๋ฌ ๋ถ๋ฆฌ | errors[]์ {combo_key}: prefix๋ก ํ๋ก ํธ์๋ ์นด๋๋ณ ํ์ |
| TDD | 28๊ฐ ํตํฉ ํ ์คํธ (pydna ์ค์ ์คํ, mock ์์) |
์๋๋ v1.0 Jupyter ๊ธฐ๋ฐ ์คํฌ๋ฆฝํธ ์ฌ์ฉ๋ฒ์ ๋๋ค. ํ์ฌ๋ FastAPI ๋ง์ดํฌ๋ก์๋น์ค(
api.py)๊ฐ ์ฃผ ์ธํฐํ์ด์ค์ ๋๋ค.
ํผ์น๊ธฐ
git clone git@github.com:sblabkribb/combinatorial_design.git
cd combinatorial_designprojects/ํ์์ ํ๋ก์ ํธ ํด๋ ์์ฑ (์:haseong_240704)assembly_design.xlsx๋ณต์ฌ ํ ํธ์ง- ์ํธ1: part ๋์์ธ
- ์ํธ2: module ๋์์ธ
- ์ํธ3: multi-module ๋์์ธ
- ์ํธ4: pathway ๋์์ธ
- ํํธ ์ ๋ณด๋
PartDB-kribb.xlsx์ฐธ์กฐ
import part_preparation as pprep
project_dir = "haseong_240704"
pprep.part_insert_goldengate(project_dir, "assembly_design.xlsx")
pprep.part_withvector_gibson(project_dir, "pUC19.gb", "MCS")import part_assembly as pasm
allcomb = pasm.get_all_possible_combinations(project_dir, "assembly_design.xlsx")
module_linear = pasm.part_assembly_goldengate(project_dir, allcomb)
module_withvector = pasm.build_module_withvector_gibson(project_dir, "pUC19.gb", module_linear)import module_assembly as masm
assembly_linear = masm.module_combinatorial_gibson_assembly(project_dir, "assembly_design.xlsx")
assembly_circular = masm.module_comb_withvector_gibson_assembly(project_dir, "pUC19.gb", assembly_linear)
all_pathways = masm.pathway_comb_withvector_gibson_assembly(project_dir, "assembly_design.xlsx", "pUC19.gb", assembly_linear)- ์์์ ํด๋ ์์น์์ ๋ค์ ์ ๋ ฅ (command line)
- git clone git@github.com:sblabkribb/combinatorial_design.git
- combinatorial_design ํด๋ ์ด๋
- ์ํ๋ ํ๋ก์ ํธ ์ด๋ฆ์ผ๋ก projects ํด๋ ์์ ํ์ํด๋๋ฅผ (์๋ฅผ ๋ค์ด
haseong_240704) ๋ง๋ค๊ณassembly_design.xlsxํ์ผ์ ๋ณต์ฌํด์ ํด๋น ํ๋ก์ ํธ ํด๋์ ๋ถ์ฌ๋ฃ์ - ํ๋ก์ ํธ ํด๋์
assembly_design.xlsxํ์ผ์ ์ด๊ณ- ์ฒซ๋ฒ์งธ ์ํธ์ part ๋์์ธ
- ๋๋ฒ์งธ ์ํธ์ module ๋์์ธ (single module)
- ์ธ๋ฒ์งธ ์ํธ์ multi module ๋์์ธ
- ๋ค๋ฒ์งธ ์ํธ์ pathway ๋์์ธ (multi-module + multi-module)
- ์ฐธ๊ณ ๋ก ๋ถํ ์ ๋ณด๋ ์์
ํ์ผ (
PartDB-kribb.xlsx)์ ์์ - ๊ฐ ํ๋ก์ ํธ ํด๋์ ์์ฑ๋๋ genbank ํ์ผ์ ๋ณ๊ฒฝํ์ง ์๋ ๊ฒ์ด ์ข์ผ๋ฉฐ ๋ง์ฝ ์์๋ก ๋ณ๊ฒฝํ์ฌ ์ฌ์ฉํ๊ณ ์ถ์๊ฒฝ์ฐ ๋ณต์ฌํ์ฌ ๋ณ๋ ๋๋ ํ ๋ฆฌ์์ ๊ด๋ฆฌ
- ์ธ๋ถ ์ฌ์ฉ๋ฒ์ ์๋ ์ฐธ๊ณ
- 3-A ๋ถํ์ค๊ณ
- 3-B ๋ชจ๋์ค๊ณ
- 3-C ๋ฉํฐ๋ชจ๋ ์ค๊ณ
- 3-D ๊ฒฝ๋ก์ค๊ณ
- python (ipynb) ์คํ์ ์ํด์๋ conda ํ๊ฒฝ์ ๋ง๋ ํ env.yaml ํ์ผ๋ก ํ๊ฒฝ ๊ตฌ์ถํ ์คํ ๊ฐ๋ฅ
- vscode ํ๊ฒฝ์์ ์ํ ๊ฐ๋ฅ
PartDB-kribb.xlsx- ์์ ์์ด์ ๋ณด๋ง ์ ์ฅ
- Golden gate ์ํ ๊ฐ๋ฅํ ์ํ์ part ๋จ์์ ์ ๋ณด (genbank ํ์ผ) ์ค๋น ๊ณผ์
- ๋ถํ ์ค๋ฌผ์ ๋ณธ ์๋ฎฌ๋ ์ด์ ๊ณผ๋ ๋ค๋ฅด๊ฒ duplex ํํ๋ก ์ ์ฅ๋ ์ ์์
- ํด๋น ์ ๋ณด๋ genbank file๋ก ํ๋ก์ ํธ ํด๋ ํ์ part ํด๋์ ์ ์ฅ
- part ์์ด์ enzyme site์ overhang ๋ฑ์ ๋ถ์ฌ์ golden gate assembly ์ํ ๋๋๋ก ์ค๊ณ
- ์ค๊ณ๋ ํ์ผ์ insert๋ก ๋จผ์ ์ค๋น๋๊ณ ์ด ํ vector์ ์ ์ฅ๋จ
- pUC19 vector์ ์ ์ฅ๋จ์ ๊ฐ์ ํจ (genbank/addgene-plasmid-50005-sequence-222046.gbk)
- ์ค์ ๋ก ๊ฐ ๋ถํ๋ค์ overhang๊ณผ enzyme site๊ฐ ๋ถ์ด์ duplex ํํ๋ก ์ ์ฅ๋๋ฏ๋ก (์ฃผ๋ฌธ ์ฝ 10~30๋ง์, 1000๋ฐฐ ํฌ์, 0.1 microl/ํ ์ฌ์ฉ) ์ด ํ ์๋ฎฌ๋ ์ด์ ๊ณผ์ ์ ์ค์ ๋ก ์ํ๋์ง ์์. ๋ณธ ์๋ฎฌ๋ ์ด์ ์ genbank ํ์ผ์ ์์ฑํ๊ธฐ ์ํ ๊ณผ์ ์ผ๋ก ์ดํด
- ์ค๋น๋ part ์ ๋ณด๋ [id ์ด๋ฆ].gb์ผ๋ก
parts/insert๋๋ ํ ๋ฆฌ์ ์ ์ฅ
- excel file์์ ์ค๊ณ๋ ๋๋ก insert ์์ด์ ๋ง๋ค๋ก genbank ํ์ผ ์์ฑ
project_dir์ ํ๋ก์ ํธ ์ด๋ฆ (์์ ๋ง๋ ํด๋ ์ด๋ฆ) ์ ์ฅ- part_preparation.py ํ์ผ์ ๊ตฌํ
import part_preparation as pprep
from importlib import reload
reload(pprep)
project_dir = "haseong_240704"
design_file = "assembly_design.xlsx"
vector_gbfile = "addgene-plasmid-50005-sequence-222046.gb"
pprep.part_insert_goldengate(project_dir, design_file)Process completed. GenBank files have been created in the folder of c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\parts\insert
- Gibson์ ํ์ฉํ insert - vector์ ํด๋ก๋ (gbfile ์ป๊ธฐ ์ํ ์๋ฎฌ๋ ์ด์ )
parts/insertํด๋์ ์๋ ๋ชจ๋ insert genbank ํ์ผ์ ๋ํด์ ์๋ ์ํ- pUC19์ MCS ์์ด๊ณผ ๊ตํ ์ฝ์
- ๊ตํ ์ฝ์ ์ pydna์์ ์ง์ํ์ง ์์ enzyme cut ํ pcr ์ํํ๋ ๋ฐฉ๋ฒ์ผ๋ก ์งํ
- genbank ํ์ผ์
parts/withvectorํด๋์ ์ ์ฅ - Gibson ์ํ ๊ฐ insert์ฉ primer ์์ด ์๋ ์์ฑ ๋ฐ project ํด๋์ ์ ์ฅ
primers-part-withvector-gibson.csv - pydna์ assemblyํ insert์ feature ์์น๊ฐ ์ ์ ํ ์ ๋ฐ์ดํธ ๋์ง ์๋ ๋ฌธ์ ๋ก ๊ด๋ จ fix ํฌํจ
import part_preparation as pprep
from importlib import reload
reload(pprep)
pprep.part_withvector_gibson(project_dir, vector_gbfile, "MCS")Process completed. GenBank files have been created in the folder of c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\parts\withvector
- ์์ ๋ง๋ part ๋๋ ํ ๋ฆฌ์ ๋ถํ๋ค๋ก ๋ชจ๋ ์ ์ํ๋ ๊ณผ์
- ์์ ๋ง๋ part๋ค๋ก ํ์ ๋จ
- ๋์ผ id์ ์ํ ๋ถํ๋ค์ด ์กฐํฉ๋์ด ํ๋์ linear DNA๋ฅผ ๋ง๋ฆ
- ์กฐ๋ฆฝ๋ ํ๋์ ๋ชจ๋์ insert๋ก์ ๋ฒกํฐ์ ์ ์ฅ๋๋ฉฐ genbank ํ์ผ๋ก ์ ๋ณด ์ ์ฅ
- genbank ํ์ผ์ ์์
ํ์ผ์ ์ง์ ๋ id๋ฅผ ํ์ผ์ด๋ฆ์ผ๋ก
module๋๋ ํ ๋ฆฌ์ ์ ์ฅ - part_assembly.py ์ ๊ตฌํ
- ์ ๋์์ธ ํ์ผ์์ ๋ณด๋ฏ ์ฌ์ฉ์์ ํธ์๋ฅผ ์ํด ๋ถํ๋ค์ ์ด๋ฆ๋ง์ผ๋ก ์ค๊ณ๋ฅผ ์ํํจ
- ๊ทธ๋ฌ๋ ๊ฐ์ ์ด๋ฆ์ ๊ฐ๋ ๋ค๋ฅธ DNA ์์ด์ด ์์ ์ ์์
- ์๋ฅผ ๋ค์ด BBa_J23100์ ๊ฒฝ์ฐ ์ ๋ค ์ค๋ฒํ์ด ๋ค๋ฅด๊ฒ ๋ถ์ ํํ๋ก O1-BBa_J23100-O2-withvector.gb ํ์ผ๊ณผ O2-BBa_J23100-O3-withvector.gb ํ์ผ์ด ๊ฐ์ BBa_J23100 ๋ถํ์ผ๋ก ์ทจ๊ธ๋ ์ ์์
- ์ด๋ฌํ ๋ฌธ์ ๋ก ์ฐ๊ฒฐ๋ถ์์ ๊ณตํต ์ค๋ฒํ์ ๊ฐ๋ ๋ถํ๋ค๋ก๋ง ๊ตฌ์ฑ๋์ด ์๋ ์กฐํฉ์ ํํฐ๋งํ๋ ๊ธฐ๋ฅ์ ์ํ
- ์ด์
๋ธ๋ฆฌ ์๋ฎฌ๋ ์ด์
์ผ๋ก ์ค์ ์ด์
๋ธ๋ฆฌ ์์ธก ๊ฒ์ฆํ๊ณ ์ต์ข
gb ํ์ผ
moduleํด๋ ์ ์ฅ - ์๋ ์์ฑ๋ primer ๋ฆฌ์คํธ๋ project ํด๋์ ์ ์ฅ
import part_assembly as pasm
from importlib import reload
reload(pasm)
allcomb = pasm.get_all_possible_combinations(project_dir, design_file)- ์์ ๋ง๋ค์ด์ง ๋ถํ ์กฐํฉ๋ค์ goldengate assembly๋ก linear dna ๋ง๋ค๊ธฐ
- genbank file ์ ์ฅ
import part_assembly as pasm
import pandas as pd
from importlib import reload
reload(pasm)
from pydna.all import read
## goldengate assembly with the filtered combinations
##
module_linear = pasm.part_assembly_goldengate(project_dir, allcomb)c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\modules\inserts/VA8-BBa_J23106-BBa_B0032-IspA-L2U3H03-VA2.gb
- Assume pUC19 is used for the vector
- project ํด๋์ primer ์ ์ฅ
import part_assembly as pasm
import pandas as pd
from importlib import reload
reload(pasm)
module_withvector_list = pasm.build_module_withvector_gibson(project_dir, vector_gbfile, module_linear)c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\modules\withvector/VA8-BBa_J23106-BBa_B0032-IspA-L2U3H03-VA2_withvector.gb
- ๊ฐ ๋ชจ๋๋ค์ ์กฐํฉ์ ๋ํด์ gibson assembly ์ด์ฉํ linear DNA ๋ง๋ค๊ธฐ
- assembly_design.xlsx ํ์ผ multi-module ํ ์์ ๋์์ธ
- ์๋ ์ด๋ฏธ์ง์ ๊ฐ์ด ID๋ฅผ ์์๋ก ๋ฃ๊ณ ์ํ๋ ์กฐํฉ์ ์ ์ ์(CDS)๋ฅผ ๋ช ์ํจ
- ํด๋น ์ ์ ์๋ค์ด ํฌํจ๋ ๋ชจ๋ ์กฐํฉ์ ๋ํด์ linear DNA ๋จผ์ ์์ฑ
- pathways/insert/[modulename] ์ gbfile ์์ฑ
- module_assembly.py์ ๊ตฌํ
- project folder์ primer ํ์ผ ์ ์ฅ
import module_assembly as masm
from importlib import reload
reload(masm)
assembly_linear_dict = masm.module_combinatorial_gibson_assembly(project_dir, design_file)c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\pathways\inserts\MM2\MM2_0015.gb
- ์ฃผ์ด์ง vector์ gibson์ผ๋ก ์ฝ์ ํ ์ํ์ circular DNA ์ ์
- pathways/withvector/MMxx์ genbank ํ์ผ ์ ์ฅ
import module_assembly as masm
from importlib import reload
reload(masm)
assembly_circular_dict = masm.module_comb_withvector_gibson_assembly(project_dir, vector_gbfile, assembly_linear_dict)c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\pathways\withvector\MM2\MM2_0015_withvector.gb
- ์ ๋ ๊ฐ ์ด์์ ๋ชจ๋์ด ์กฐํฉ๋ ๋์ฌ๊ฒฝ๋ก๋ค์ ๋ํด์ ์๋ก ๋ชจ๋ ์กฐํฉ์ผ๋ก ์กฐ๋ฆฝํ๋ ๊ณผ์
- ๋ฉํฐ ๋ชจ๋์ ์์ ๋ง๋ ๋ชจ๋ ์ด๋ฆ์ผ๋ก ๋์์ธ
- ์ํ ์ ์์
module_combinatorial_gibson_assemblyํจ์์module_comb_withvector_gibson_assembly๋จผ์ ์คํ ํ์ (๋ฉํฐ๋ชจ๋๋ค์ ๋จผ์ ๋ง๋ค์ด ๋์ด์ผ ํจ) - assembly_design.xlsx ํ์ผ์ pathway ์ํธ์์ ๋์์ธ
- pathways/withvector/[module name]์ gbfile ์์ฑ
- module_assembly.py์ ๊ตฌํ
- project folder์ primer ์ ์ฅ
import module_assembly as masm
from importlib import reload
reload(masm)
all_pathway_combination_list = masm.pathway_comb_withvector_gibson_assembly(project_dir, design_file, vector_gbfile, assembly_linear_dict)
c:\mydocs\2024\dev\combinatorial_design\projects\haseong_240704\pathways\withvector\MM3\MM3_0010_withvector.gb
- ์ต์ข 7๊ฐ ์ ์ ์ ์กฐํฉ, 11kbp vector map ์๋ ์์ฑ




