Skip to main content

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))

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obo_parser-1.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for obo_parser-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ebb97a0bcfcc66e75133b188fec77da427b24acdb787f83787a2789618b74623
MD5 b1a635a1dadbc7db0d52843f34a328b7
BLAKE2b-256 b1412d0800546f03f3c650e5bd152f02084ca859b8aaa790800ad905cb7146c2

See more details on using hashes here.

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

Hashes for obo_parser-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 97a34ff34f534ae12f788e3c29bcacb3fb1e67c7d777f49b6edbcd89b462959f
MD5 46aa69a838717728a395dcd3f054826f
BLAKE2b-256 ab996d65f8930e7dc1ff19fe319242f5ac2f347360c44bbff688b04a5baadf03

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page