Add option under "Edit" menu, called "generated entailed individuals",
to be called when a class is selected
(See Jim B's obsoletion plugin - could easily be cloned for this)
Selecting this will call
generateNecessaryIndividuals(selectedClass, true)
On a MinimalModelGenerator object. If no such object exists (not sure
how plugins deal with state?), then create one:
MinimalModelGenerator(ontology, ontology, reasoner)
Where 'ontology' is the current ontology. Note that by passing the
same ontology as both arguments, the individuals will be generated in
the same ontology as the "tbox" ontology.
The reasoner should already have been selected.
After calling, the ontology should be populated with new
individuals. It would be nice to highlught these somehow, but this is
optional.
The idea is that users can selected some GO class that is rich in
axioms (see x-cellular.owl for examples) and generate a template lego
model.
See testGeneratePathway and basic-tbox.omn in core for simple
examples.
Additional notes:
Subsequent to the generateNecessaryIndividuals call, the tool should
call:
Set<OWLClass> occs = new HashSet<OWLClass>();
occs.add(getOboClass("GO_0003674"));
occs.add(getOboClass("GO_0008150"));
mmg.anonymizeIndividualsNotIn(occs);
This is necessary to work with the current version of the lego plugin,
which complains if there are individuals not processes or functions.
This will take 2 triples:
Individual: activity_individual_1
Facts: occurs_in named_location_individual_1
Individual: named_location_individual_1
Type: GO:nucleus
And turn it into:
Individual: activity_individual_1
Type: occurs_in SOME named_location_individual_1
However, this code or something analagous should be moved to the lego
visualizer itself. The idea is that you configure that classes you
"care" about the individuals, and then all others are invisible as
nodes but instead rendered as existential Type axioms on other nodes.
Original issue reported on code.google.com by cmung...@gmail.com on 7 Oct 2013 at 6:39
Original issue reported on code.google.com by
cmung...@gmail.com
on 7 Oct 2013 at 6:39