🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
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
PyPI
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