Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 3.07 KB

README.md

File metadata and controls

59 lines (36 loc) · 3.07 KB

ShortBOL

A scripting language for creating Synthetic Biology Open Language (SBOL).

  • Craft SBOL without coding or using a CAD tool
  • Develop synthetic biology designs that you can share with tools and people

Get Started

Dependencies

ShortBOL requires Python 3.x. and Python package dependencies are listed in setup.py.

Install

  1. Download or clone repository. git clone https://github.com/intbio-ncl/shortbol.git

  2. Navigate to your install directory

  3. Install dependancies with python setup.py install --user

Example usage

  1. initial_example.shb in the /examples folder is a design for a single promoter with its associated sequence

  2. Compile the initial_example.shb file with: python run.py /examples/initial_example.shb

  3. A more extensive tutorial can be found in the examples/tutorials/ directory. 3.1. With newer versions of ShortBOL new abstraction layers have been released. 3.2. It is advised that you work through the tutorials with higher abstraction numbers (currently abstraction_layer_2) 3.3. Unless you understand and are happy with longer ShortBOL script that follow the SBOL data model closely.

  4. Some behaviour of the tool can be changed by providing flags to the tool for example: 4.1. python run.py /examples/initial_example.shb -p /path/to/templates This tells the tool about some external templates that are not native to the tool. 4.2. python run.py /examples/initial_example.shb -o output.xml This overrides the output file name (The output filename will be naed "output.xml"). 4.3. python run.py /examples/initial_example.shb -no This stops the output from being written to a file and just prints to console.
    4.4. python run.py /examples/initial_example.shb -s rdfxml This changes how the ShortBOL code is serialised options are (rdfxml,n3,turtle,sbolxml,nt) 4.4.1. It is advised you do not change this unless you understand the inner workings of the tool as you're no longer writing valid SBOL. 4.4.2 Furthermore the SBOL validator will not even run as it is impossible to be valid SBOL.

SBOL 2 ShortBOL

Contained within ShortBOL is a secondary tool which allows a user to Create a ShortBOL script from a SBOL design. This allows users to modify SBOL designs in ShortBOL even if they don't have the ShortBOL file. This ShortBOL file can be generated from SBOL created by any source (ShortBOL or not). To Run this tool:

  1. python3 SBOL2ShortBOL.py sbol_file.rdf Will print out the generated ShortBOL file from the provided sbol rdf.
  2. python3 SBOL2ShortBOL.py sbol_file.rdf -o output.shb Will write the generated ShortBOL file to the output.shb file.
  3. python3 SBOL2ShortBOL.py -h Provides help on any other parameters you can input to the tool.

Extensions

Extensions provide a way to execute Python code to do additional, more complex processing of the RDF triples generated by expanding templates.

Extensions intended as built-ins should be added to the extensions package. 'Third party' extensions can also be added at the command line, as long as they are in the Python PATH.