robot icon indicating copy to clipboard operation
robot copied to clipboard

new extract command method: subset

Open hkir-dev opened this issue 3 years ago • 6 comments

Resolves [#497, resolves #497]

  • [ ] docs/ have been added/updated
  • [ ] tests have been added/updated
  • [ ] mvn verify says all tests pass
  • [ ] mvn site says all JavaDocs correct
  • [ ] CHANGELOG.md has been updated

Adds new subset method to the extract operation: robot extract --method subset Logic of the method is as follows:

  1. Materialized Axioms= Relation Graph(O)
  2. OM = ADD(O, Materialized Axioms)
  3. OF = RobotFilter(T, OM)
  4. OR = RobotReduce(OF)

To achieve this relation-graph dependency added to the ROBOT. Owl-api version increased to 4.5.9. Following files updated to fix the errors raised after the owl-api version upgrade:

  • docs/examples/example.obo
  • docs/examples/metrics_all.json
  • robot-core/src/main/java/org/obolibrary/robot/metrics/OntologyMetrics.java
  • robot-core/src/test/java/org/obolibrary/robot/MeasureOperationTest.java

hkir-dev avatar May 11 '22 20:05 hkir-dev

I think this now has the behaviour we expect, but I'm a bit worried about the efficiency of the approach used and what that might mean for scaling.

  • Huseyin has confirmed to me that the RG step currently materialises all inferred existential restrictions, rather than just those on object properties in the seed. This is potentially a massive number of triples. Presumably this has some effect on speed, but I'm rather more worried about the memory requirements. As I understand it, RG can take a list of objectProperties to materialise => a much small number of triples than the current step.
  • I also wonder whether pushing filtering to ROBOT is less efficient than a simple filter on triples following the RG step. Might be less of a concern though.

@balhoff - can you comment on this?

dosumis avatar May 12 '22 09:05 dosumis

@dosumis I commented about selecting object properties here: https://github.com/ontodev/robot/pull/1000/files#r871427940

balhoff avatar May 12 '22 14:05 balhoff

@hkir-dev I would suggest making a separate PR for the OWL API upgrade.

balhoff avatar May 12 '22 21:05 balhoff

Here is the PR: https://github.com/ontodev/robot/pull/891/files

Needs to be tested! High priority - I want to try to push this through by the end of the month..

matentzn avatar May 16 '22 08:05 matentzn

@hkir-dev Where are we with this? Are there still blockers? Looks like was waiting for separate OWL-API update but this is now done?

dosumis avatar Jun 14 '22 10:06 dosumis

  • [x] This needs to be merged: https://github.com/ontodev/robot/pull/1005

matentzn avatar Jun 14 '22 10:06 matentzn

so it looks like a chain of dependencies - this requires a new owlapi version which depends on a new protege (if we want to continue syncing) - is there any way to progress independent of these

cmungall avatar Oct 28 '22 19:10 cmungall

Apparently in relation-graph I am using a method added in a newer OWL API compared to the current ROBOT release. I can work around that and make a new RG release. I think we got hung up because RG needs 4.5.9 (which is what I think Protege 5.5 is on) and that was the original change in this PR, but the open PR #1005 is for 4.5.22, which is the target for the next Protege release.

balhoff avatar Oct 28 '22 20:10 balhoff

Protege is using Owl-API 4.5.19 in its latest version. I can prepare a new PR to upgrade Robot to this version.

There are some significant improvements in Owl-API 4.5.22, so we are trying to migrate both Protege and Robot to this version all together. However, we are still working to make a new stable Protege release and seems it will take some more time.

hkir-dev avatar Oct 31 '22 15:10 hkir-dev

Everything needs to go to 4.5.22 or later no matter what - no need to bother with 4.5.19. Protege should be upgraded.

matentzn avatar Oct 31 '22 17:10 matentzn

OWL API upgrade merged to this branch.

hkir-dev avatar Feb 10 '23 15:02 hkir-dev

Thanks @hkir-dev, this looks great. I made some small changes. I'll merge it.

In the future, you are welcome to make branches on this repository rather than your fork. It make life a little easier for me.

jamesaoverton avatar Feb 15 '23 15:02 jamesaoverton