linkml / linkml-owl

Extension of LinkML runtime for converting instances of LinkML classes to OWL (classes or instances)
https://linkml.io/linkml-owl
11 stars 1 forks source link

converting linkml-owl data to rdf #28

Closed capsulecorplab closed 1 year ago

capsulecorplab commented 1 year ago

In lieu of #25, I tried running linkml-convert on the pizza data to see if it'd be possible to convert the data to turtle, but encountered the following traceback error

$ linkml-convert -s pizza01-toppings-model.yaml pizza02-toppings-data.yaml -t ttl
Traceback (most recent call last):
  File "/usr/local/bin/linkml-convert", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/linkml/utils/converter.py", line 118, in cli
    raise Exception(f"target class not specified and could not be inferred")
Exception: target class not specified and could not be inferred

Any ideas or suggestions as to how one might go about converting the pizza data from linkml to an RDF expression, preferably one that's SPARQL-querable?

capsulecorplab commented 1 year ago

As a work around, the robot (OBO tool) works for converting .ofn to .ttl using the --format flag. For example, to convert pizza01.ofn from Part 1 to Turtle: robot convert -i pizza01.ofn --format ttl -o pizza01.ttl