https://github.com/incatools/relation-graph
Materialize OWL existential relations
https://github.com/incatools/relation-graph
obofoundry ontology owl rdf
Last synced: about 2 months ago
JSON representation
Materialize OWL existential relations
- Host: GitHub
- URL: https://github.com/incatools/relation-graph
- Owner: INCATools
- License: mit
- Created: 2020-08-16T01:52:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-26T19:06:27.000Z (7 months ago)
- Last Synced: 2025-02-08T10:47:04.591Z (2 months ago)
- Topics: obofoundry, ontology, owl, rdf
- Language: Scala
- Homepage:
- Size: 595 KB
- Stars: 15
- Watchers: 5
- Forks: 4
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# relation-graph
Materialize OWL existential relations
## Run
```bash
relation-graph --ontology-file uberon.owl --output-file relations.ttl --mode rdf --property 'http://purl.obolibrary.org/obo/BFO_0000050' --property 'http://purl.obolibrary.org/obo/BFO_0000051' --properties-file more_properties.txt
```You can leave off the `property` and `properties-file` arguments; in that case all OWL object properties are used. The default mode is `rdf`;
alternatively, the `owl` mode will output RDF, but as a valid OWL structure. The `properties-file` should look like this:```
http://purl.obolibrary.org/obo/BFO_0000050
http://purl.obolibrary.org/obo/BFO_0000051
```
**Note:** Before running, you may need to increase the amount of memory available for Java. On UNIX style systems, this is done by setting the `JAVA_OPTS` environment variable. For example, to set the amount of memory to `16G`, you would use this command: `export JAVA_OPTS=-Xmx16G`.### Full options
```
Usage: relation-graph [options]
--usage
Print usage and exit
--help | -h
Print help message and exit
--ontology-file
Input OWL ontology
--output-file
File to stream output triples to.
--mode
Configure style of triples to be output. RDF mode is the default; each existential relation is collapsed to a single direct triple. TSV mode outputs the same triples as RDF mode, but as TSV, compacting IRIs using an optional prefixes file.
--property
Property to restrict output relations to. Provide option multiple times for multiple properties. If no properties are provided (via CLI or file), then all properties found in the ontology will be used.
--properties-file
File containing line-separated property IRIs to restrict output relations to. If no properties are provided (via CLI or file), then all properties found in the ontology will be used.
--output-subclasses
Include entailed rdfs:subClassOf or owl:equivalentClass relations in output (default false)
--reflexive-subclasses
When outputting rdfs:subClassOf, include relations to self for every class (default true)
--equivalence-as-subclass
When outputting equivalent classes, output reciprocal rdfs:subClassOf triples instead of owl:equivalentClass triples (default true)
--output-classes
Output any triples where classes are subjects (default true)
--output-individuals
Output triples where individuals are subjects, with classes as objects (default false)
--disable-owl-nothing
Disable inference of unsatisfiable classes by the whelk reasoner (default false)
--prefixes
Prefix mappings to use for TSV output (YAML dictionary
--obo-prefixes
Compact OBO-style IRIs regardless of inclusion in prefixes file
--verbose
Set log level to INFO
```## Build
Install `sbt` (Scala Build Tool) on your system. For Mac OS X, it is easily done using [Homebrew](http://brew.sh): `brew install sbt`. `sbt` requires a working Java installation, but you do not need to otherwise install Scala.After `sbt` is installed, run `sbt stage` to create the executable. The executable is created in your `cli/target/universal/stage/bin` directory.