Class PreciseSpeciesSubsetter
- All Implemented Interfaces:
ISpeciesSubsetStrategy
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.
-
Field Summary
Fields inherited from interface org.incenp.obofoundry.uberon.util.ISpeciesSubsetStrategy
IN_TAXON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<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) Creates a taxon-specific subset of the given ontology.
-
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:ISpeciesSubsetStrategyCreates a taxon-specific subset of the given ontology.- Specified by:
getSubsetin interfaceISpeciesSubsetStrategy- 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; ifnull, defaults toowl:Thing.taxon- The ID of the taxon to create the subset for.- Returns:
- The set of classes that belong to the subset.
-