Getting started .... using Python¶
In this example, we are going to open an SBOL file containing the expression casette for a single protein: [http://sbolstandard.org/examples/example_minimal.sbol.rdf]
We are going to use pySBOL to extract the sequence of the full construct. We will then piece together a new construct which replaces the ribosomal binding site between promoter and protein-coding sequence. We then save the new construct in a new SBOL record.
Install dependencies¶
You will need Python (v. 2.7 or 3.x.) and pySBOL.
Detailed installation instructions can be found here. With python and pip installed, the following should work:
Note take out the virtualenv stuff; pip install pySBOL is the minimal
requirement
sudo pip install virtualenv // if you haven't set up virtualenv before
mkdir sboltesting; cd sboltesting
virtualenv venv
pip install pySBOL
You can now any time switch on your sbol development environment with:
source venv/bin/activate
and leave it with:
deactivate
Import and use SBOL files¶
- Load an SBOL file into Python
- Extract the full DNA sequence from SBOL
- List the sub-components of a DNA construct
- Extract the sequence and annotation of a sub-component
Export SBOL¶
- Create a new construct from two old and one new sub-components
- Export the new Component (everything)
- Export the new Component (only what has changed)