Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7f06304
mocloplasmid->plasmid
doublergreer Feb 4, 2026
788f3d1
buildcompiler index collections draft
doublergreer Feb 4, 2026
d1094f8
indexing implementation collection. should work with new representati…
doublergreer Feb 4, 2026
a21d5d1
backbone and antibiotic resistance differentiation
doublergreer Feb 5, 2026
01f944d
moving roles to constants & dropping redundant backbone class
doublergreer Feb 10, 2026
6bc95a5
antibiotic resistance w/ regex characterization of subcomponents
doublergreer Feb 10, 2026
560ea01
class refactor + plasmid & backbone differentiation
doublergreer Feb 10, 2026
5280cf6
Merge branch 'main' into index_plasmids
doublergreer Feb 16, 2026
001ed09
notebook->file + lint
doublergreer Feb 16, 2026
575e6c4
helper functions
doublergreer Feb 16, 2026
a1c4e20
error raise for plasmid not found for particular part
doublergreer Feb 17, 2026
c8811a2
get backbone and single part checking
doublergreer Feb 17, 2026
1c537df
cleaned notebook, now imports from buildcompiler.py
doublergreer Feb 17, 2026
8989031
single part and antibiotic resistance checks into dictionary creation
doublergreer Feb 17, 2026
13be557
antibiotic resistance & test
doublergreer Feb 18, 2026
1f6eb2e
plasmid representation adjustment + index collections now stores all …
doublergreer Feb 24, 2026
8ab606a
added implementation tracking for plasmids and strains inside index_c…
doublergreer Feb 24, 2026
7e577e6
bp011->activity repr draft
doublergreer Feb 26, 2026
ae19f41
constants for types and roles + digestion function conversions
doublergreer Mar 3, 2026
1694fb5
adding reactants to activity
doublergreer Mar 3, 2026
3ec22bd
ligation w/ two documents 90% functional. running into sbol str/uri v…
doublergreer Mar 4, 2026
25e3258
write works now, valid.
doublergreer Mar 5, 2026
7530646
updated nb
doublergreer Mar 5, 2026
ea95e57
basic transformation function
doublergreer Mar 10, 2026
738896d
assembly.run() now returns plasmid objects generated by ligation
doublergreer Mar 10, 2026
66bfc6b
draft adding implementation i/o to transformation
doublergreer Mar 10, 2026
e017403
collection with implementation of a chassis
doublergreer Mar 10, 2026
b16d379
added include_extracted_parts flag to run to control inclusion of ext…
doublergreer Mar 10, 2026
164a7c6
transformation activity & assembly associations
doublergreer Mar 12, 2026
2934d77
strain impl
doublergreer Mar 12, 2026
78b16eb
Delete notebooks/test.xml
doublergreer Mar 12, 2026
b150051
added precedes constraints to ligation
doublergreer Mar 16, 2026
640e097
refactored scar naming scheme to match on sequence instead of index
doublergreer Mar 16, 2026
15755ed
created protein impl collection
doublergreer Mar 16, 2026
ba6b17d
moved plasmid class to its own file
doublergreer Mar 17, 2026
8027e0c
lvl 1 refactor + ligase and re list class attributes
doublergreer Mar 17, 2026
a9e3aac
lvl1 working
doublergreer Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 175 additions & 0 deletions notebooks/build_compiler_test.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "87bdb42e",
"metadata": {},
"outputs": [],
"source": [
"import sbol2\n",
"from buildcompiler.buildcompiler import BuildCompiler\n",
"from buildcompiler.abstract_translator import extract_toplevel_definition"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "e60a9c84",
"metadata": {},
"outputs": [],
"source": [
"design_doc = sbol2.Document()\n",
"design_doc.read(\"../tests/test_files/moclo_parts_circuit.xml\")\n",
"design = extract_toplevel_definition(design_doc)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "90648527",
"metadata": {},
"outputs": [],
"source": [
"auth = \"51102d98-f852-4386-9ae8-7c5814d679c1\"\n",
"collections = [\n",
" \"https://synbiohub.org/user/Gon/impl_test/impl_test_collection/1\",\n",
" \"https://synbiohub.org/user/Gon/Enzyme_Implementations/Enzyme_Implementations_collection/1\",\n",
"]\n",
"buildcompiler = BuildCompiler(collections, \"https://synbiohub.org\", auth, None)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c12e504",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[<sbol2.implementation.Implementation object at 0x10d99bf20>, <sbol2.implementation.Implementation object at 0x10dadc230>]\n",
"[<sbol2.implementation.Implementation object at 0x10dadc140>]\n",
"matched pJ23100_AB_A_B with DVK_AE_A_E on fusion site A!\n",
"matched pB0034_BC_B_C with pJ23100_AB_A_B on fusion site B!\n",
"matched pE0030_CD_C_D with pB0034_BC_B_C on fusion site C!\n",
"matched final component pB0015_DE_D_E with pE0030_CD_C_D and DVK_AE_A_E on fusion sites (D, E)!\n",
"Success with backbone: DVK_AE_A_E and plasmids: ['pJ23100_AB_A_B', 'pB0034_BC_B_C', 'pE0030_CD_C_D', 'pB0015_DE_D_E']\n",
"[Plasmid:\n",
" Name: composite_1_A_B_C_D_E\n",
" Plasmid Definition: https://SBOL2Build.org/composite_1/1\n",
" Strain Definitions: [None]\n",
" Plasmid Implementations: ['https://SBOL2Build.org/composite_1_impl/1']\n",
" Strain Implementations: [None]\n",
" Fusion Sites: ['A', 'B', 'C', 'D', 'E']\n",
" Antibiotic Resistance: Kanamycin\n",
"]\n"
]
}
],
"source": [
"print(buildcompiler.restriction_enzyme_implementations)\n",
"print(buildcompiler.ligase_implementations)\n",
"\n",
"composite_plasmids = buildcompiler.assembly_lvl1(design, None)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "79fd0cb5",
"metadata": {},
"outputs": [],
"source": [
"# Pull chassis from sbh\n",
"chassis_doc = sbol2.Document()\n",
"\n",
"buildcompiler.sbh.pull(\n",
" \"https://synbiohub.org/user/Gon/Chassis/Ecoli_DH5a/1/52b575c09496ebb3e2ef9e4c272c9e733134a874/share\",\n",
" chassis_doc,\n",
")\n",
"\n",
"\n",
"chassis = chassis_doc.moduleDefinitions[0]\n",
"\n",
"dummy_activity = sbol2.Activity(\"chassis_domestication\")\n",
"dummy_activity.name = \"acquisistion of chassis strain\"\n",
"dummy_activity.types = \"http://sbols.org/v2#build\"\n",
"\n",
"chassis_implementation = sbol2.Implementation(f\"{chassis.name}_impl\")\n",
"chassis_implementation.built = chassis.identity\n",
"chassis_implementation.wasGeneratedBy = dummy_activity\n",
"\n",
"chassis_doc.add(chassis_implementation)\n",
"chassis_doc.add(dummy_activity)\n",
"\n",
"# chassis_doc.write(\"chassis_impl.xml\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8f4ea67c",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'composite_plasmids' is not defined",
"output_type": "error",
"traceback": [
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mNameError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[6]\u001b[39m\u001b[32m, line 1\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m1\u001b[39m bacterial_transformation(\u001b[43mcomposite_plasmids\u001b[49m, chassis_implementation, chassis, final_doc)\n",
"\u001b[31mNameError\u001b[39m: name 'composite_plasmids' is not defined"
]
}
],
"source": [
"# bacterial_transformation(composite_plasmids, chassis_implementation, chassis, final_doc)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5553bfc3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Valid.'"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# final_doc.write(\"fullbuild.xml\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python (buildplanner)",
"language": "python",
"name": "buildplanner"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading
Loading