- Notifications
You must be signed in to change notification settings - Fork4
Faultless AST for Open Biomedical Ontologies in Python.
License
fastobo/fastobo-py
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Faultless AST for Open Biomedical Ontologies in Python.
fastobo
is a Rust library implementing areliable parser for the OBO file format 1.4. This extension module exportsidiomatic Python bindings that can be used to load, edit and serialize ontologiesin the OBO format.
If your platform has no pre-built binaries available, you will need to have the Rustcompiler installed. See thedocumentation onrust-lang.org
to learn how to install Rust on your machine.
Installation is then supported throughpip
:
$pip install fastobo --user
AnOboDoc
instance can be instantiated from a path or from a binary file handleusing thefastobo.load
function, or from a string using thefastobo.loads
function.
importfastoboobodoc=fastobo.load("../data/ms.obo")
Loading from agzip
file is supported:
importfastoboimportgzipgzdoc=fastobo.load(gzip.open("../data/cl.obo.gz"))
Comments can be parsed but neither edited nor serialized, because of a limitationwithpyo3
(the library used to generate the Python bindings). They are supportedin the Rust version offastobo
.
Found a bug ? Have an enhancement request ? Head over to theGitHub issue tracker of the project ifyou need to report or ask something. If you are filling in on a bug, please include as muchinformation as you can about the issue, and try to recreate the same bug in a simple, easilyreproducible situation.
The following people have contributed to this project:
- Alex Henrie (@alexhenrie)
- Patrick Kalita (@pkalita-lbl)
This project was developed byMartin Larraldeas part of a Master's Degree internship in theBBOP team of theLawrence Berkeley National Laboratory, under the supervision ofChris Mungall. Cite this project as:
Larralde M.Developing Python and Rust libraries to improve the ontology ecosystem[version 1; not peer reviewed]. F1000Research 2019, 8(ISCB Comm J):1500 (poster)(https://doi.org/10.7490/f1000research.1117405.1)
About
Faultless AST for Open Biomedical Ontologies in Python.