utilities for working with the NIF ontology, SciGraph, and turtle
Project description
pyontutils
python utilities for working with ontologies
Requirements
This repo requires PyPy3 or >=Python3.6.
See and setup.py and Pipfile for additional requirements.
ontload
requires Java8 and >=maven3.3 in order to build SciGraph.
parcellation.py requires FSL
to be installed or you need to obtain the atlases in
some other way. In order to build the packages required by this repo you will need
gcc (and toolchain) installed and will need to have the development packages for
libxml
installed. To build the development dependencies you will also need the
development packages for postgresql
, and protobuf
installed on your system.
Building the documentation for the ontology requires pandoc
and emacs
along
with orgstrap. See .travis.yml
for an example of how to bootstrap a working dev environment.
Installation
Pyontutils is slowly approaching stability. You can obtain it and other related
packages from pypi and install them as you see fit (e.g. pip install --user pyontutils
).
If you need a bleeding edge version I reccomend installing into whatever environment
(virtual or otherwise) using pip install --user --editable .[dev,test]
from your local copy of this repo.
Development Installation
From the directory that contains this readme run the following. Refer to .travis.yml for full details.
for f in {librdflib,htmlfn,ttlser,.,neurondm,nifstd}; do pushd $f; pip install --user --pre --editable . ; popd; done
If you need even more information there is fairly exhaustive doccumentation located in the sparc curation setup doc.
Utility Scripts
pyontutils provides a set of scripts that are useful for maintaining and managing ontologies
using git, and making them available via SciGraph. Note that if you choose the development
installation option you will need to ln -sT
the scripts to your preferred bin folder.
For the full list please see the documentation.
- ttlfmt Reserialize ontology files using deterministic turtle (spec).
- ontutils Various useful and frequently needed commands for ontology processes as well as less frequent refactorings.
- ontload Load an ontology managed by git into SciGraph for easy deployment of services.
- qnamefix Set qnames based on the curies defined for a given ontology.
- necromancy Find dead ids in an ontology and raise them to be owl:Classes again.
- scigraph-codegen Generate a rest client against a SciGraph services endpoint.
- scig Run queries against a SciGraph endpoint from the command line.
- graphml_to_ttl Convert yEd graphml files to ttl.
- ontree Run a webserver to query and view hierarchies from the ontology.
NIF-Ontology
Many of these scripts are written for working on the NIF standard ontology found here.
SciGraph
scigraph.py is code geneator for creating a python client library against a SciGraph REST endpoint. scigraph_client.py is the client library generated against the nif development scigraph instance. ontload can be used to load your ontology into SciGraph for local use.
Building releases
Test sdist packaging
for f in {htmlfn,ttlser,.,neurondm,nifstd}; do pushd $f; python setup.py sdist; popd; done
Build wheels from the sdist NOT straight from the repo because wheels ignore the manifest file. Make sure to clean any previous builds first.
for f in {htmlfn,ttlser,neurondm,nifstd}; do
pushd $f/dist;
tar xvzf *.tar.gz;
pushd $f*/;
python setup.py bdist_wheel;
mv dist/*.whl ../;
popd;
rm ./$f*/ -r;
popd;
done
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyontutils-0.1.0.tar.gz
.
File metadata
- Download URL: pyontutils-0.1.0.tar.gz
- Upload date:
- Size: 181.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 293fc6e63bea8170487e03adcf0ab3d625c7c1e1ef5b43cea23d9137601152b4 |
|
MD5 | 8cd06daf659b8b0c86b97f68f36fb52a |
|
BLAKE2b-256 | 4e4559511d6022a9506ed2873df49874a566c8f2af9495a4b8e054a2409bf3d1 |
File details
Details for the file pyontutils-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pyontutils-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 129.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee39b4bdfccc653461729391cae07c3eabfd2cdeb4e032f2ec6669bcb484f018 |
|
MD5 | 7aec76727ae802fb7da7a69a06af948a |
|
BLAKE2b-256 | 3da073e9a40ba0d17d8a97798573f336b10d1dbf2e056b25e865766135ba40cf |