Class PreciseSpeciesSubsetter

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

public class PreciseSpeciesSubsetter extends Object implements ISpeciesSubsetStrategy
A “precise” strategy to create a taxon-specific subset, as an alternative to the strategy implemented in DefaultSpeciesSubsetter.

For each class C of the ontology below the root(s), we test whether the expression C and in_taxon some THE_TAXON is satisfiable; if it is, then the class is included in the subset.

On Uberon, this is about 4 to 5 times slower than the “default” strategy, but has the advantage that it does not require removing the “cross-taxon” relationships beforehand.

On the other hand, this may fail to exclude classes that are linked to a class that is invalid for the considered taxon, if there is a missing property chain over the in_taxon relation. For example, if we have C1 located_in some C2, and C2 is not valid for the taxon, C1 will still be considered valid because there is (as of September 2024) no property chain between in_taxon and located_in.

  • Constructor Details

    • PreciseSpeciesSubsetter

      public PreciseSpeciesSubsetter()
  • 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.