A Python library for parsing OBO (Open Biological and Biomedical Ontologies) files.
Project description
A Python library for parsing OBO(Open Biological and Biomedical Ontologies) files.
Installation
pip install obo_parser
Usage
Use in Command Line
obo_parser headers -f path/to/obo_file.obo
obo_parser headers -f path/to/obo_file.obo -o headers.json
obo_parser terms -f path/to/obo_file.obo
obo_parser terms -f path/to/obo_file.obo -o terms.jl
Use in Python
from obo_parser.parser import OBO_Parser
obo = OBO_Parser('./hp.obo')
print(obo.headers)
for term in obo.terms:
print(term)
# accessing term attribute
print(term.id, term.name)
print(term['id'], term['name'])
print(term.get('id'), term.get('name'))
# accessing term dict
print(term._data)
print(dict(term))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
obo_parser-1.0.3.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obo_parser-1.0.3.tar.gz.
File metadata
- Download URL: obo_parser-1.0.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebb97a0bcfcc66e75133b188fec77da427b24acdb787f83787a2789618b74623
|
|
| MD5 |
b1a635a1dadbc7db0d52843f34a328b7
|
|
| BLAKE2b-256 |
b1412d0800546f03f3c650e5bd152f02084ca859b8aaa790800ad905cb7146c2
|
File details
Details for the file obo_parser-1.0.3-py3-none-any.whl.
File metadata
- Download URL: obo_parser-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97a34ff34f534ae12f788e3c29bcacb3fb1e67c7d777f49b6edbcd89b462959f
|
|
| MD5 |
46aa69a838717728a395dcd3f054826f
|
|
| BLAKE2b-256 |
ab996d65f8930e7dc1ff19fe319242f5ac2f347360c44bbff688b04a5baadf03
|