Faultless AST for Open Biomedical Ontologies in Python.
Project description
fastobo-py
![Star me](https://pypi-camo.freetls.fastly.net/5bd6670d97a90f695e363566fa0127075becfaac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f666173746f626f2f666173746f626f2d70792e7376673f7374796c653d736f6369616c266c6162656c3d53746172266d61784167653d33363030)
Faultless AST for Open Biomedical Ontologies in Python.
Overview
fastobo
is a Rust library implementing a
reliable parser for the OBO file format 1.4. This extension module exports
idiomatic Python bindings that can be used to load, edit and serialize ontologies
in the OBO format.
Installation
If your platform has no pre-built binaries available, you will need to have the Rust
compiler installed. See the documentation on rust-lang.org
to learn how to install Rust on your machine.
Installation is then supported through pip
:
$ pip install fastobo --user
Usage
An OboDoc
instance can be instantiated from a file-handle or from a binary file handle
using the fastobo.load
function, or from a string using the fastobo.loads
function.
import fastobo
obodoc = fastobo.load("../data/ms.obo")
Loading from a gzip
file is supported:
import fastobo
import gzip
gzdoc = fastobo.load(gzip.open("../data/cl.obo.gz"))
Comments can be parsed but neither edited nor serialized, because of a limitation
with pyo3
(the library used to generate the Python bindings). They are supported
in the Rust version of fastobo
.
Feedback
Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker of the project if you need to report or ask something. If you are filling in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.
About
This project is currently being developed by Martin Larralde as part of a Master's Degree internship in the BBOP team of the Lawrence Berkeley National Laboratory, under the supervision of Chris Mungall.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for fastobo-0.1.0.dev9-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0894d0e82f8ec07fca2b9e254c9030b1fe271aa4bdd3fde1c6d28d8b22ac7b5c |
|
MD5 | 8af80ca58a9f108a9a9f2c35aa37eddd |
|
BLAKE2b-256 | fcce4022d44242b148bae63838064792ef61f7a1e145b92ccf3dc7e3f4a9dda4 |
Hashes for fastobo-0.1.0.dev9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64906752ae75df77d2d87118c3b4ebe7b53268e07a9e2744f9f4e959110f4748 |
|
MD5 | bf381add46b522f6604c655b983c79ee |
|
BLAKE2b-256 | f610e6148f7d0c87efcd063a9fa92da077057439a1a3ae9cffaa45cc21fe1762 |
Hashes for fastobo-0.1.0.dev9-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c181c65625a30febbf94a7a97494c19aea390dd25a9ab7085787164eff481113 |
|
MD5 | f2d564080898611323fc7c2a5d9b4e18 |
|
BLAKE2b-256 | 90adb0da828ca22b932d984c4307420e36247b83d4222b559c632b75ca2ab78d |