Class DefaultSpeciesSubsetter

java.lang.Object
org.incenp.obofoundry.uberon.util.DefaultSpeciesSubsetter
All Implemented Interfaces:
ISpeciesSubsetStrategy

public class DefaultSpeciesSubsetter extends Object implements ISpeciesSubsetStrategy
The “default” strategy to create a taxon-specific subset.

This strategy is the same as the one implemented by OWLTools’ SpeciesSubsetterUtil class.

Basically, we assert THE_ROOT(s) in_taxon some THE_TAXON, and exclude from the subset all classes that are unsatisfiable because of that assertion.

This may cause some classes to be excluded because they are linked to an unsatisfiable class, even though the link between the two classes does not convey that one cannot exist in a given taxon if the other does not. For example, if C1 shares_ancestor_with some C2 and C2 is unsatisfiable in the considered taxon, then C1 will be unsatisfiable as well, even though it may very well be valid in that taxon. To avoid this, we forcibly remove a handful of “cross-taxon” relationships from the ontology before proceeding.

  • Constructor Details

    • DefaultSpeciesSubsetter

      public DefaultSpeciesSubsetter()
  • Method Details

    • getSubset

      public Set<org.semanticweb.owlapi.model.OWLClass> getSubset(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, Collection<org.semanticweb.owlapi.model.IRI> roots, org.semanticweb.owlapi.model.IRI taxon)
      Description copied from interface: ISpeciesSubsetStrategy
      Creates a taxon-specific subset of the given ontology.
      Specified by:
      getSubset in interface ISpeciesSubsetStrategy
      Parameters:
      ontology - The ontology to create a subset of.
      reasoner - The reasoner to use.
      roots - The root classes from which to create the subset; only those classes and their descendants will be considered to create the subset, all ancestors will be ignored; if null, defaults to owl:Thing.
      taxon - The ID of the taxon to create the subset for.
      Returns:
      The set of classes that belong to the subset.