Package: pyontutils
pyontutilspython utilities for working with ontologiesInstallationpyontutilsis 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 it into your environment
(virtual or otherwise) usingpip install --user --editable .[dev,test]run from
from your local copy of this repo.Configurationpyontutilsmakes use of 3 configuration files:~/.config/pyontutils/config.yaml.
This file can be used to augment the varibles defined inauth-config.py.
For more details about the config see theorthauth guide.secrets.yamlthat you can put wherever
you want by editing theauth-stores: secrets: path:entry inconfig.yaml.
The file mode needs to be set to0600so that only you can read and write it.
It is also advisable to place it inside a folder with a mode set to0700since
some editors do not preserve file modes.orthauthwill fail loudly if this happens../nifstd/scigraph/curie_map.yamlor~/.config/pyontutils/curie_map.yamlif apyontutilsgit repository is not found.pyontutilswill retrieve the
latest version of this file from github on first run if it cannot find a local copy.
The full list of locations that are searched forcurie_map.yamlare specified inauth-config.py.If you are going to use the SciCrunch SciGraph production instance follow theinstructionsin the sparc curation setup guide to obtain an API key and put it in the right place.
In short you can set the key in your secrets file and specify the path to it inconfig.yamlunder the =scigraph-api-key= variable.
Alternately you can set the key using theSCICRUNCH_API_KEYenvironment variable
(e.g., by runningexport SCICRUNCH_API_KEY=$(cat path/to/my/apikey)) or by whatever
means you prefer for managing your keys.Development InstallationFrom the directory that contains this readme run the following.
Refer to.travis.ymlfor full details.forfin{librdflib,htmlfn,ttlser,.,neurondm,nifstd};dopushd$f;pipinstall--user--pre--editable.;popd;doneIf you need even more information there is fairly exhaustive doccumentation
located in the sparc curationsetup doc.RequirementsThis repo requires PyPy3 or >=Python3.6.
See and setup.py and Pipfile for additional requirements.ontloadrequires Java8 and >=maven3.3 in order to build SciGraph.parcellationrequiresFSLto be installed or you need to obtain theatlasesin
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 forlibxmlinstalled. To build the development dependencies you will also need the
development packages forpostgresql, andprotobufinstalled on your system.
Building the documentation for the ontology requirespandocandemacsalong
withorgstrap. See.travis.ymlfor an example of how to bootstrap a working dev environment. Alternately seepyontutils-9999.ebuildandnifstd-tools-9999.ebuildintgbugs-overlay.Utility Scriptspyontutils 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 toln -sTthe scripts to your preferred bin folder.
For the full list please see thedocumentation.ttlfmtReserialize ontology files using deterministic turtle (spec).ontutilsVarious useful and frequently needed commands for ontology processes as well as less frequent refactorings.ontloadLoad an ontology managed by git into SciGraph for easy deployment of services.qnamefixSet qnames based on the curies defined for a given ontology.necromancyFind dead ids in an ontology and raise them to be owl:Classes again.scigraph-codegenGenerate a rest client against a SciGraph services endpoint.scigRun queries against a SciGraph endpoint from the command line.graphml_to_ttlConvert yEd graphml files to ttl.ontreeRun a webserver to query and view hierarchies from the ontology.NIF-OntologyMany of these scripts are written for working on the NIF standard ontology
foundhere.SciGraphscigraph_codegen.pyis code geneator for creating a python client library against aSciGraphREST endpoint.scigraph_client.pyis the client library generated against the nif development scigraph instance.ontloadcan be used to load your ontology into SciGraph for local use.Building releasesSeerelease.org.