Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions docs/API_Reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
API Reference
=============

.. automodule:: sbol2build.sbol2build
:members:
:undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/Installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Installation
======================================
3 changes: 3 additions & 0 deletions docs/Tutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Tutorials
======================================
Let's get started with creating DNA assembly plans. First we will demonstrate a workflow using plasmid files from `SBOLCanvas <https://sbolcanvas.org/>`_:
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@

html_theme = 'furo'
html_static_path = ['_static']

html_theme_options = {
"light_css_variables": {},
"dark_css_variables": {},
"default_color_mode": "light",
"color_mode_toggle": True,
}
10 changes: 4 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ It was developed to support build functionality and workflows in `SynBioSuite <h
.. toctree::
:maxdepth: 2
:caption: Contents:

Installation
Tutorials
API_Reference

API Reference
=============

.. automodule:: sbol2build.sbol2build
:members:
:undoc-members:
:show-inheritance:

14 changes: 9 additions & 5 deletions src/sbol2build/sbol2build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#Put code here
import sbol2
from Bio import Restriction
from Bio.Seq import Seq
Expand Down Expand Up @@ -53,7 +52,7 @@ def part_in_backbone_from_sbol(identity: Union[str, None], sbol_comp: sbol2.Com
:param part_location: List of 2 integers that indicates the start and the end of the unitary part. Note that the index of the first location is 1, as is typical practice in biology, rather than 0, as is typical practice in computer science.
:param part_roles: List of strings that indicates the roles to add on the part.
:param fusion_site_length: Integer of the length of the fusion sites (eg. BsaI fusion site lenght is 4, SapI fusion site lenght is 3)
:param linear: Boolean than indicates if the backbone is linear, by default it is seted to Flase which means that it has a circular topology.
:param linear: Boolean than indicates if the backbone is linear, defaults to False (cicular topology).
:param kwargs: Keyword arguments of any other Component attribute.
:return: ModuleDefinition in the form that sbolcanvas would output
"""
Expand Down Expand Up @@ -505,7 +504,7 @@ def ligation(reactants:List[sbol2.ComponentDefinition], assembly_plan: sbol2.Mod
:param reactants: DNA parts to be ligated as SBOL ModuleDefinition.
:param assembly_plan: SBOL ModuleDefinition to contain the functional components, interactions, and participants
:param document: SBOL2 document containing all reactant ComponentDefinitions.
:param ligase: as SBOL ComponentDefinition
:param ligase: as SBOL ComponentDefinition, optional (defaults to T4 ligase)
:return: List of all composites generated, in the form of tuples of ComponentDefinition and Sequence.
"""
if ligase == None:
Expand Down Expand Up @@ -707,6 +706,7 @@ def append_extracts_to_doc(extract_tuples: List[Tuple[sbol2.ComponentDefinition,

class golden_gate_assembly_plan():
"""Creates an Assembly Plan.

:param name: Name of the assembly plan ModuleDefinition.
:param parts_in_backbone: Parts in backbone to be assembled.
:param plasmid_acceptor_backbone: Backbone in which parts are inserted on the assembly.
Expand All @@ -726,9 +726,13 @@ def __init__(self, name: str, parts_in_backbone: List[sbol2.Document], plasmid_a
self.document.add(self.restriction_enzyme)
self.composites = []

def run(self):
"""Runs assembly simulation.
def run(self) -> List[Tuple[sbol2.ComponentDefinition, sbol2.Sequence]]:
"""Runs full assembly simulation.

`document` parameter of golden_gate_assembly_plan object is updated by reference to include assembly plan ModuleDefinition and all related information.

Runs :func:`part_digestion` for all `parts_in_backbone` and :func:`backbone_digestion` for `plasmid_acceptor_backbone` with `restriction_enzyme`. Then runs :func:`ligation` with these parts to form composites.

:return: List of all composites generated, in the form of tuples of ComponentDefinition and Sequence.
"""
for part_doc in self.parts_in_backbone:
Expand Down