Skip to main content

Ontolopy is a package for working with ontology (.obo) files from Python.

Project description

Ontolopy a python package for working with .obo files

:construction: This package is in development :construction:

Please see the docs for the most up-to-date information: You can access versioned docs at /versions/{version} like this

Installation

Ontolopy is available on pip, and can be installed using:

pip install ontolopy

Usage

Example usage:

import ontolopy

# read an ontology in obo format
obo = ontolopy.Obo('path_to_file/uberon_ext.obo')

# find relationships between terms of interest:
# (in this case, are any of the source_terms, is_a or part_of the brain?)
source_terms = ['UBERON:0003290', 'UBERON:0003369', 'UBERON:0003703'] 
target_terms = ['UBERON:0000955'] #  brain term
relations_of_interest  = ['is_a', 'part_of']
relations = ontolopy.Relations(
    source_terms, 
    target_terms, 
    relations_of_interest, 
    obo.ont
).relations

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

ontolopy-1.1.1b0.tar.gz (14.1 kB view hashes)

Uploaded Source

Built Distribution

ontolopy-1.1.1b0-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page