INCATools / semantic-sql

SQL and SQLite builds of OWL ontologies
https://incatools.github.io/semantic-sql/
BSD 3-Clause "New" or "Revised" License
38 stars 3 forks source link

relation-graph errors when creating db #87

Closed wdduncan closed 5 months ago

wdduncan commented 5 months ago

I have created an mireot of the kidney epithelial cell branch from the cell ontology. Here is the robot command if interested:

robot extract --method mireot \
    --input cl.owl \
    --branch-from-term obo:CL_0002518 \
    --output cl-mireot.owl

When I run semsql make cl-mireot.db, I receive the following errors which seem to be related to calling relation-graph:

semsql make cl-mireot.db 
>>>
      remove -i cl-mireot.owl --axioms "equivalent disjoint annotation abox type" \
      filter --exclude-terms /opt/homebrew/lib/python3.11/site-packages/semsql/builder//exclude-terms.txt \
      -o cl-mireot-min.owl
touch cl-mireot-properties.txt
grep -v ^prefix, /opt/homebrew/lib/python3.11/site-packages/semsql/builder/prefixes/prefixes.csv | grep -v ^obo, | perl -npe 's@,(.*)@: "$1"@'  > cl-mireot-prefixes.yaml.tmp && mv cl-mireot-prefixes.yaml.tmp cl-mireot-prefixes.yaml
relation-graph --disable-owl-nothing true \
                       --ontology-file cl-mireot-min.owl\
                \
                       --output-file cl-mireot-relation-graph.tsv.tmp \
                       --equivalence-as-subclass true \
                       --mode TSV \
               --prefixes cl-mireot-prefixes.yaml \
                   --output-individuals true \
                   --output-subclasses true \
                       --reflexive-subclasses true && \
    mv cl-mireot-relation-graph.tsv.tmp cl-mireot-relation-graph.tsv
Unrecognized argument: --disable-owl-nothing
Argument --mode: Malformed output mode: TSV
Unrecognized argument: --prefixes
Unrecognized argument: --output-individuals
make: *** [cl-mireot-relation-graph.tsv] Error 1
rm cl-mireot-properties.txt cl-mireot-min.owl cl-mireot-prefixes.yaml

FWIW, I can use rdftab like so:

sqlite3 cl-miriot.db < prefix.sql  # note: needs copy of prefixes.sql
rdftab cl-mireot.db < cl-mireot.owl  

cc @balhoff @jamesaoverton

cmungall commented 5 months ago

No need to cc James, he doesn't maintain semantic-sql

The error happens when you run relation-graph. It looks like you're running an older version that doesn't support --prefixes or --output-individuals.

You can check the version like this:

relation-graph --version
name: relation-graph-cli, version: 2.3.1, scalaVersion: 2.13.10, sbtVersion: 1.8.2, gitCommit: a5365567f712eff4f3454decb757b4c41504dbb8

Of course, it's annoying for to have to coordinate all these separate installs, the plan is to have everything be installable from PyPI:

But for now, make sure your relation-graph is up to date, I'll update the docs

wdduncan commented 5 months ago

Thanks @cmungall :)
Works now!