Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synbiodex/pysbol2
A pure Python implementation of the SBOL standard.
https://github.com/synbiodex/pysbol2
Last synced: 4 days ago
JSON representation
A pure Python implementation of the SBOL standard.
- Host: GitHub
- URL: https://github.com/synbiodex/pysbol2
- Owner: SynBioDex
- License: apache-2.0
- Created: 2019-05-03T21:46:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T18:18:24.000Z (9 months ago)
- Last Synced: 2024-04-14T10:00:50.074Z (9 months ago)
- Language: Python
- Size: 9.72 MB
- Stars: 20
- Watchers: 5
- Forks: 6
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# pySBOL2
[![Build Status](https://travis-ci.org/SynBioDex/pySBOL2.svg?branch=master)](https://travis-ci.org/SynBioDex/pySBOL2)
[![Documentation Status](https://readthedocs.org/projects/pysbol/badge/?version=latest)](https://pysbol.readthedocs.io/en/latest/?badge=latest)**pySBOL2** is a pure Python implementation of the
SBOL 2.3.0 standard [Synthetic Biology Open Language (SBOL)](https://sbolstandard.org/) -
an open standard for the representation of *in silico* biological designs. It draws from [libSBOL](https://github.com/SynBioDex/libSBOL)
and [pySBOL](https://github.com/SynBioDex/pySBOL).This native Python library is intended to eventually supplant the original [pySBOL](https://github.com/SynBioDex/pySBOL) based on C++ wrappers.
For developers, please see [CONTRIBUTING.md](CONTRIBUTING.md).
## INSTALLATION
Use [pip](https://pip.pypa.io/) to install pySBOL2:
```shell
pip install sbol2
```If you get a permission error, try using the `--user` flag:
```shell
pip install --user sbol2
```### Java dependency for offline validation/conversion
By default, pySBOL2 executes its validation and conversion with the online validator/converter.
These can also be done offline using the Java JAR file packaged with the library.Java requirements are: openjdk8 or later
Java location defaults to `/usr/bin/java`, and can be adjusted by setting the `JAVA_LOCATION` config option:
```
Config.setOption(ConfigOptions.JAVA_LOCATION, '/my/java/path')
```## CODE EXAMPLE
This short example creates a Document, adds a ComponentDefinition
to the Document, and then writes the resulting Document to an SBOL
file. Other examples are in the [examples](examples) directory.```
import sbol2doc = sbol2.Document()
cd = sbol2.ComponentDefinition('cd1')
doc.add(cd)
doc.write('my-sbol.xml')
```## UNIT TESTS
The unit tests are not included when installing via pip. The unit
tests are included in the source distribution. To access and
run the unit tests without [checking out from git](CONTRIBUTING.md),
download the source distribution, unpack it, and run the unit tests.```shell script
pip download --no-binary sbol2 sbol2
tar zxf sbol2-VERSION.tar.gz
cd sbol2-VERSION
python3 -m unittest discover test
```## DOCUMENTATION
[Full documentation for pySBOL2 is available here](https://pysbol.readthedocs.io).
## ACKNOWLEDGEMENTS
Development of this library has been supported by the
[DARPA Synergistic Discovery and Design (SD2)](https://www.darpa.mil/program/synergistic-discovery-and-design)
program and [Raytheon BBN Technologies](http://bbn.com/).