Skip to content
Python frontend to Ontologies
Branch: master
Clone or download
Latest commit a768adc Mar 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
pronto Fix `deepcopy` and `==` for `pronto.Term` Mar 20, 2019
tests Remove rogue print in `tests.test_term` Mar 20, 2019
.gitattributes Ignore test resources when trying to detect repository language May 20, 2017
.gitignore Corrected an infinite recursion issue in obo imports. Added support f… Jul 5, 2016
.travis.yml Release v0.12.2 Mar 22, 2019
COPYING Relicense to MIT and include license to sdist and wheel Oct 23, 2017
Makefile Add better screen cleaning for make monitor Jan 9, 2017
setup.cfg Release v0.12.2 Mar 22, 2019


pronto : Python frontend to Ontologies

PyPI Conda Py versions Build Status Dev repo Codacy Grade License DOI coverage Documentation Status


Pronto is a python module to parse, create, browse and export ontologies from some popular formats. For now, obo and owl/xml are available, but more formats are to be added in the future (you can even add your own to work with the current API).


Installing with pip is the easiest:

pip install pronto          # if you have the admin rights
pip install pronto --user   # if you want to install it for only one user

There is also a conda recipe in the bioconda channel:

conda install -c bioconda pronto

If for some reason you do not like pip, you can also clone the repository and install it with the setup script (still requires setuptools):

git clone
cd pronto
python install    # may also require admin rights


The Ontology class is the main entrypoint of pronto. It can be instantiated with a given ontology file (.owl, .ont or .obo) or from scratch, without any existing terms.

Open an ontology and get a term by accession:

import pronto
ont = pronto.Ontology('path/to/file.obo')
term = ont['REF:ACCESSION']

Display an ontology in obo format and in json format:

import pronto
ont = pronto.Ontology('https://net.path.should/work/too.owl')

Merge two ontologies:

Example here uses the NMR controlled vocabulary and the HUPO-PSI MS controlled vocabulary

import pronto
nmr = pronto.Ontology('')
ms  = pronto.Ontology('')
>>> 'NMR:1000004' in ms
>>> ms.meta['coverage']
'Mass spectrometer output files and spectra interpretation'

Find ontology terms with children

import pronto
ont = pronto.Ontology('path/to/file.obo')
for term in ont:
    if term.children:

Get all the transitive children of an ontology term

import pronto
ont = pronto.Ontology('path/to/file.obo')


If you wish to use this library in a scientific publication, please cite it ! (see the Zenodo record to get a DOI or a BibTEX record).

You can’t perform that action at this time.