Skip to content

DNA-and-Natural-Algorithms-Group/nuskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuskell: a nucleic acid strand displacement compiler

GitHub tag (latest by date) GitHub release (latest by date) build Codecov

Nuskell is a compiler framework to translate formal chemical reaction networks (CRNs) into domain-level strand displacement (DSD) systems. To support the diversity of proposed CRN-to-DSD translation methods from literature, as well as potential new CRN-to-DSD translation methods that are yet to be developed, Nuskell provides a domain-specific programming language. In this language, CRN-to-DSD translations can be formulated as algorithms: so-called translation schemes. We provide a library of selected existing translation schemes that users can use without understanding the details of the Nuskell programming language.

A notion of correctness for a particular translation is established on a case-by-case basis using the domain-level reaction enumeration package Peppercorn [Badelt et al. (2020)] and the CRN verification package crnverifier, which implements the rate-independent, stochastic-level theories of pathway decomposition equivalence [Shin et al. (2019)] and/or CRN bisimulation [Johnson et al. (2019)].

Peppercorn first finds intended and potentially unintended reaction pathways, then the crnverifier checks if the implementation CRN is a correct implementation of the formal CRN. Nuskell is a first step to integrate biophysical modeling of nucleic acids with rigorous abstraction hierarchies of modern compilers to design and characterize DSD systems. For more details, see [Badelt et al. (2017)].

Installation

Nuskell must be installed directly from this repository, we recommend clining the repository and then using:

pip install .

For debugging, or if you are planning a contribution to the repository, please install the development version and make sure all tests pass:

pip install .[dev]
pytest 

Quickstart: the nuskell executable

Upon installation, the package provides an executable nuskell, which is the main interface combining CRN-to-DSD translation, DSD enumeration and CRN verification. For example, to implement the formal CRN

A + B <=> X + Y
X -> A

using the translation-scheme from Srinivas (2015), and to verify that the translation is correct with CRN bisimulation, use the command line call:

echo "A + B <=> X + Y; X -> A" | nuskell --ts srinivas2015.ts --verify crn-bisimulation

New users may also appreciate the -v flag to get more detailed information on the individual compilation steps, as well as the option --pilfile to print the DNA complexes generated in different stages of the compilation. Detailed information about existing translation schemes can be found in the translation schemes directory.

For more options see:

nuskell --help

Nuskell documentation

A (preliminary) documentation can be found online: documentation. Most importantly, the documentation provides more details on what kind of translation schemes are supported and how to write them. Suggestions and contributions that improve the documentation are very welcome.

Version

0.8 -- basically a complete rewrite, python>=3.8 only.

  • nuskell.dsdcompiler is now a subpackage to compile from CRN to DSD.
  • crnverifier is now an independent package and therefore a dependency.
  • enumeration interface updated to peppercornenumerator-v1.1.
  • nuskell now uses the prototype objects provided by the dsdobjects library.

Authors

  • Stefan Badelt
  • Seung Woo Shin
  • Hope Amber Johnson
  • Qing Dong
  • Erik Winfree

Cite

Stefan Badelt, Seung Woo Shin, Robert F. Johnson, Qing Dong, Chris Thachuk, and Erik Winfree (2017) "A General-Purpose CRN-to-DSD Compiler with Formal Verification, Optimization, and Simulation Capabilities" [Badelt et al. (2017)].