ontodev / robot

ROBOT is an OBO Tool
http://robot.obolibrary.org
BSD 3-Clause "New" or "Revised" License
259 stars 73 forks source link

Question: Add reasoner option to diff? #171

Open cmungall opened 7 years ago

cmungall commented 7 years ago

Motivation: we want to be able to see the effect of making changes on inferences. This would be accomplished by diffing the inferences between two ontologies.

This operation would be trivially the same as:

robot reason -i a.owl -o ai.owl
robot reason -i b.owl -o bi.owl
robot diff ai.owl bi.owl

It can't be expressed as a chain since it's not a linear chain of operations.

There is a strong argument against complicating robot by doing this and instead just providing a dumb shell wrapper.

jamesaoverton commented 7 years ago

I'm ok with it.

dougli1sqrd commented 7 years ago

Or what about a diff option to the reason subcommand?

cmungall commented 6 years ago

Or what about a diff option to the reason subcommand?

no, the purpose of the two commands are completely different

cmungall commented 6 years ago

A common scenario is diffing between the same file in different branches, looking in particular at the entailment diff

one hacky script I use is:

#!/bin/sh
robot reason -r elk -i $1 -o /tmp/MAIN.obo
git co $2
robot reason -r elk -i $1 -o /tmp/BRANCH.obo
obo-simple-diff.pl -l /tmp/MAIN.obo /tmp/BRANCH.obo 

While this kind of thing could be brought into the robot diff command, it feels wrong for robot to be messing around with git. This feels like something that could be distributed in a separate 'ontology hacks' repo? Or maybe with the OSK?

See also https://github.com/OBOFoundry/OBOFoundry.github.io/issues/500

jamesaoverton commented 6 years ago

I agree that it would be really convenient to be able to diff and reason between branches (or staged changes), and I also agree that it would get messy to build this into ROBOT. If we could assume the the OSK conventions then it would all be easier, but none of my projects fit that pattern exactly (yet).

Maybe we should think of this in layers:

beckyjackson commented 5 years ago

Diffing between branches seems outside of the scope of ROBOT, like @cmungall said. That said, do we still want to add a --reasoner option to diff?

cmungall commented 5 years ago

+1

cmungall commented 3 years ago

Just chatting about this with @matentzn. We think the branch case may be solvable elegantly with gh-actions (similar to @balhoff's ontobot). But just having a simple reasoner diff that operates on two files still super-useful

balhoff commented 3 years ago

Here is the gh-actions workflow that does this for GO: https://github.com/geneontology/go-ontology/blob/master/.github/workflows/inference_diff.yml

balhoff commented 3 years ago

Tool-level improvements would be marking/filtering which changes are not really changes because they were formerly indirect subsumptions (for example).