You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

obo-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obo-parser

A Python library for parsing OBO (Open Biological and Biomedical Ontologies) files.

1.0.3
pipPyPI
Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.