A Python command line utility that retrieves information from an ontology tree (.obo) file.
You can download the contents of this git
repository by running:
git clone https://github.com/baileythegreen/PyOntoQuery.git
This assumes you have git
installed. Or, you can click on the Code button in the top right-ish part of this page, next to the About section and choose Download ZIP, which does not.
obonet — Read OBO-formatted ontologies in Python.
networkx — NetworkX is a dependency of obonet.
The necessary packages and libraries are given in environment.yml
. They may be installed with the conda package manager by running:
$ conda env create --prefix ontology --file environment.yml
creates an 'ontology' environment in the current directory, or
$ conda env create --prefix /path/to/another/location/ontology --file environment.yml
creates the environment in another location.
You can activate this environment with:
$ conda activate ./ontology
if the environment is in your current directory, or
$ conda activate <path to where ever you created it>/ontology
if it is not.
Or to add the dependencies to a different (already extant) conda environment:
$ conda install -c biobuilds obonet
(This line will install obonet and all of its dependencies, which will then be everything you need.)
Install the latest release of obonet from PyPI:
$ pip install obonet
Install the latest version of NetworkX:
$ pip install networkx
Install with all optional dependencies:
$ pip install networkx[all]