NAME
Bio::Ontology::SimpleOntologyEngine - Implementation of OntologyEngineI interface
SYNOPSIS
my $soe = Bio::Ontology::SimpleOntologyEngine->new;
DESCRIPTION
This is a "simple" implementation of Bio::Ontology::OntologyEngineI.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Peter Dimitrov
Email [email protected]
CONTRIBUTORS
Hilmar Lapp, hlapp at gmx.net
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : $soe = Bio::Ontology::SimpleOntologyEngine->new;Function: Initializes the ontology engine.Example : $soe = Bio::Ontology::SimpleOntologyEngine->new;Returns : Object of class SimpleOntologyEngine.Args :
_instantiated_terms_store
Title : _instantiated_terms_storeUsage : $obj->_instantiated_terms_store($newval)Function:Example :Returns : hashArgs : empty hash
mark_instantiated
Title : mark_instantiatedUsage : $self->mark_instantiated(TermI terms): TermIFunction: Marks TermI objects as fully instantiated,allowing for proper counting of the number of terms in the term store.The TermI objects has to be already stored in the term store in orderto be marked.Example : $self->mark_instantiated($term);Returns : its argument or throws an exception if a term is notin the term store.Args : array of objects of class TermI.
mark_uninstantiated
Title : mark_uninstantiatedUsage : $self->mark_uninstantiated(TermI terms): TermIFunction: Marks TermI objects as not fully instantiated,Example : $self->mark_uninstantiated($term);Returns : its argument or throws an exception if a term is notin the term store(if the term is not marked it does nothing).Args : array of objects of class TermI.
_term_store
Title : term_storeUsage : $obj->_term_store($newval)Function:Example :Returns : reference to an array of Bio::Ontology::TermI objectsArgs : reference to an array of Bio::Ontology::TermI objects
add_term
Title : add_termUsage : add_term(TermI term): TermIFunction: Adds TermI object to the ontology engine term store.Marks the term fully instantiated by default.Example : $soe->add_term($term)Returns : its argument.Args : object of class TermI.
get_term_by_identifier
Title : get_term_by_identifierUsage : get_term_by_identifier(String id): TermIFunction: Retrieves terms from the term store by their identifierfield, or an empty list if not there.Example : $term = $soe->get_term_by_identifier("IPR000001");Returns : An array of zero or more Bio::Ontology::TermI objects.Args : An array of identifier strings
_get_number_rels
Title : get_number_relsUsage :Function:Example :Returns :Args :
_get_number_terms
Title : _get_number_termsUsage :Function:Example :Returns :Args :
_relationship_store
Title : _storerelationship_storeUsage : $obj->relationship_store($newval)Function:Example :Returns : reference to an array of Bio::Ontology::TermI objectsArgs : reference to an array of Bio::Ontology::TermI objects
_inverted_relationship_store
Title : _inverted_relationship_storeUsage :Function:Example :Returns : reference to an array of Bio::Ontology::TermI objectsArgs : reference to an array of Bio::Ontology::TermI objects
_relationship_type_store
Title : _relationship_type_storeUsage : $obj->_relationship_type_store($newval)Function:Example :Returns : reference to an array of Bio::Ontology::RelationshipType objectsArgs : reference to an array of Bio::Ontology::RelationshipType objects
_add_relationship_simple
Title : _add_relationship_simpleUsage :Function:Example :Returns :Args :
add_relationship
Title : add_relationshipUsage : add_relationship(RelationshipI relationship): RelationshipIFunction: Adds a relationship object to the ontology engine.Example :Returns : Its argument.Args : A RelationshipI object.
get_relationships
Title : get_relationshipsUsage : get_relationships(): RelationshipIFunction: Retrieves all relationship objects.Example :Returns : Array of RelationshipI objectsArgs :
get_all_relationships
Title : get_all_relationshipsUsage : get_all_relationships(): RelationshipIFunction: Retrieves all relationship objects.Example :Returns : Array of RelationshipI objectsArgs :
get_predicate_terms
Title : get_predicate_termsUsage : get_predicate_terms(): TermIFunction: Retrieves all relationship types stored in the engineExample :Returns : reference to an array of Bio::Ontology::RelationshipType objectsArgs :
_is_rel_type
Title : _is_rel_typeUsage :Function:Example :Returns :Args :
_typed_traversal
Title : _typed_traversalUsage :Function:Example :Returns :Args :
get_child_terms
Title : get_child_termsUsage : get_child_terms(TermI term, TermI predicate_terms): TermIget_child_terms(TermI term, RelationshipType predicate_terms): TermIFunction: Retrieves all child terms of a given term, that satisfy arelationship among those that are specified in the secondargument or undef otherwise. get_child_terms is a specialcase of get_descendant_terms, limiting the search to thedirect descendants.Example :Returns : Array of TermI objects.Args : First argument is the term of interest, second is the list ofrelationship type terms.
get_descendant_terms
Title : get_descendant_termsUsage : get_descendant_terms(TermI term, TermI rel_types): TermIget_child_terms(TermI term, RelationshipType predicate_terms): TermIFunction: Retrieves all descendant terms of a given term, thatsatisfy a relationship among those that are specified inthe second argument or undef otherwise. Uses_typed_traversal to find all descendants.Example :Returns : Array of TermI objects.Args : First argument is the term of interest, second is the list ofrelationship type terms.
get_parent_terms
Title : get_parent_termsUsage : get_parent_terms(TermI term, TermI predicate_terms): TermIget_child_terms(TermI term, RelationshipType predicate_terms): TermIFunction: Retrieves all parent terms of a given term, that satisfy arelationship among those that are specified in the secondargument or undef otherwise. get_parent_terms is a specialcase of get_ancestor_terms, limiting the search to thedirect ancestors.Example :Returns : Array of TermI objects.Args : First argument is the term of interest, second is the list of relationship type terms.
get_ancestor_terms
Title : get_ancestor_termsUsage : get_ancestor_terms(TermI term, TermI predicate_terms): TermIget_child_terms(TermI term, RelationshipType predicate_terms): TermIFunction: Retrieves all ancestor terms of a given term, that satisfya relationship among those that are specified in the secondargument or undef otherwise. Uses _typed_traversal to findall ancestors.Example :Returns : Array of TermI objects.Args : First argument is the term of interest, second is the listof relationship type terms.
get_leaf_terms
Title : get_leaf_termsUsage : get_leaf_terms(): TermIFunction: Retrieves all leaf terms from the ontology. Leaf term is a term w/o descendants.Example : @leaf_terms = $obj->get_leaf_terms()Returns : Array of TermI objects.Args :
get_root_terms
Title : get_root_termsUsage : get_root_terms(): TermIFunction: Retrieves all root terms from the ontology. Root term is a term w/o descendants.Example : @root_terms = $obj->get_root_terms()Returns : Array of TermI objects.Args :
_filter_repeated
Title : _filter_repeatedUsage : @lst = $self->_filter_repeated(@old_lst);Function: Removes repeated termsExample :Returns : List of unique TermI objectsArgs : List of TermI objects
get_all_terms
Title : get_all_termsUsage : get_all_terms(): TermIFunction: Retrieves all terms currently stored in the ontology.Example : @all_terms = $obj->get_all_terms()Returns : Array of TermI objects.Args :
find_terms
Title : find_termsUsage : ($term) = $oe->find_terms(-identifier => "SO:0000263");Function: Find term instances matching queries for their attributes.This implementation can efficiently resolve queries byidentifier.Example :Returns : an array of zero or more Bio::Ontology::TermI objectsArgs : Named parameters. The following parameters should be recognizedby any implementations:-identifier query by the given identifier-name query by the given name
relationship_factory
Title : relationship_factoryUsage : $fact = $obj->relationship_factory()Function: Get/set the object factory to be used when relationshipobjects are created by the implementation on-the-fly.Example :Returns : value of relationship_factory (a Bio::Factory::ObjectFactoryIcompliant object)Args : on set, a Bio::Factory::ObjectFactoryI compliant object
term_factory
Title : term_factoryUsage : $fact = $obj->term_factory()Function: Get/set the object factory to be used when term objects arecreated by the implementation on-the-fly.Note that this ontology engine implementation does notcreate term objects on the fly, and therefore setting thisattribute is meaningless.Example :Returns : value of term_factory (a Bio::Factory::ObjectFactoryIcompliant object)Args : on set, a Bio::Factory::ObjectFactoryI compliant object
_filter_unmarked
Title : _filter_unmarkedUsage : _filter_unmarked(TermI terms): TermIFunction: Removes the uninstantiated terms from the list of termsExample :Returns : array of fully instantiated TermI objectsArgs : array of TermI objects
remove_term_by_id
Title : remove_term_by_idUsage : remove_term_by_id(String id): TermIFunction: Removes TermI object from the ontology engine using thestring id as an identifier. Current implementation does notenforce consistency of the relationships using that term.Example : $term = $soe->remove_term_by_id($id);Returns : Object of class TermI or undef if not found.Args : The string identifier of a term.
to_string
Title : to_stringUsage : print $sv->to_string();Function: Currently returns formatted string containing the number ofterms and number of relationships from the ontology engine.Example : print $sv->to_string();Returns :Args :
_unique_termid
Title : _unique_termidUsage :Function: Returns a string that can be used as ID using fail-overapproaches.If the identifier attribute is not set, it uses thecombination of name and ontology name, provided both areset. If they are not, it returns the name alone.Note that this is a private method. Call from inheritingclasses but not from outside.Example :Returns : a stringArgs : a Bio::Ontology::TermI compliant object