Bio::O...Engine(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

Bio::Ontology::OBOEngine πŸ’–βœ¨

okay bestie, so this is a page from the User Contributed Perl Documentation, and its manual name is Bio::O...Engine(3pm) β€” yes the header literally truncates it like that, it's giving mysterious. It's the doc for a whole ontology engine that eats OBO-style flat files. Buckle up, this one's a whole meal. πŸ“


🌸 NAME 🌸

Bio::Ontology::OBOEngine β€” an Ontology Engine for the OBO style flat file format, straight from the Gene Ontology Consortium. no cap. πŸ’…


✨ SYNOPSIS ✨

use Bio::Ontology::OBOEngine;

my $parser = Bio::Ontology::OBOEngine->new
      ( -file => "gene_ontology.obo" );

my $engine = $parser->parse();

like... make one with a file, parse it, boom, you got an engine. iconic behavior honestly. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

Heads up: you need Graph.pm from CPAN. that's the vibe check, and if it's not installed you're not passing it. 😭

Also, this module replaces SimpleGOEngine.pm, which is deprecated. so like... move on, bestie, SimpleGOEngine.pm is giving last season. πŸ’€


πŸ’– FEEDBACK πŸ’–

🌈 Mailing Lists 🌈

fr fr, user feedback is an integral part of the evolution of this and every other Bioperl module. Send your comments and suggestions to the Bioperl mailing lists, and know that your participation is very much appreciated. 🫢

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

🌸 Support 🌸

okay listen. For usage questions and support issues, please direct them to the mailing list:

bioperl-l@bioperl.org

...and NOT straight to the module maintainer. The way that there are so many experienced, responsive experts on that list who will look at your problem and address it quickly β€” use them!! πŸ‘‘

πŸ’Œ Please include a thorough description of the problem, plus code and data examples if at all possible. the more receipts the better, bestie.

πŸ¦‹ Reporting Bugs πŸ¦‹

Report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution. Bug reports can be submitted via the web at:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHOR πŸ‘‘

Sohel Merchant

Email: s-merchant@northwestern.edu

Address:

Northwestern University
Center for Genetic Medicine (CGM), dictyBase
Suite 1206,
676 St. Clair st
Chicago IL 60611

πŸ’œ CONTRIBUTOR πŸ’œ

 Hilmar Lapp, hlapp at gmx.net
 Chris Mungall,   cjm at fruitfly.org

⭐ APPENDIX ⭐

The rest of this doc details each of the object methods one by one, no skips. Internal methods are usually preceded with a _, so if you see that underscore, mind your business, it's housekeeping. πŸ™ˆ


🧚 new 🧚

  • Title: new
  • Usage: $engine = Bio::Ontology::OBOEngine->new()
  • Function: Creates a new OBOEngine
  • Returns: A new OBOEngine object
  • Args: (none)

like, this is the main character constructor. ✨


🧚 init 🧚

  • Title: init()
  • Usage: $engine->init();
  • Function: Initializes this Engine.
  • Returns: (none)
  • Args: (none)

πŸ’… is_a_relationship πŸ’…

  • Title: is_a_relationship()
  • Usage: $IS_A = $engine->is_a_relationship();
  • Function: Returns a Bio::Ontology::RelationshipType object for "is-a" relationships
  • Returns: Bio::Ontology::RelationshipType set to "IS_A"
  • Args: (none)

πŸ’… part_of_relationship πŸ’…

  • Title: part_of_relationship()
  • Usage: $PART_OF = $engine->part_of_relationship();
  • Function: Returns a Bio::Ontology::RelationshipType object for "part-of" relationships
  • Returns: Bio::Ontology::RelationshipType set to "PART_OF"
  • Args: (none)

  • Title: related_to_relationship()
  • Usage: $RELATED_TO = $engine->related_to_relationship();
  • Function: Returns a Bio::Ontology::RelationshipType object for "related-to" relationships
  • Returns: Bio::Ontology::RelationshipType set to "RELATED_TO"
  • Args: (none)

πŸ’… regulates_relationship πŸ’…

  • Title: regulates_relationship()
  • Usage: $REGULATES = $engine->regulates_relationship();
  • Function: Returns a Bio::Ontology::RelationshipType object for "regulates" relationships
  • Returns: Bio::Ontology::RelationshipType set to "REGULATES"
  • Args: (none)

πŸ’… positively_regulates_relationship πŸ’…

  • Title: positively_regulates_relationship()
  • Usage: $REGULATES = $engine->positively_regulates_relationship();
  • Function: Returns a Bio::Ontology::RelationshipType object for "positively_regulates" relationships
  • Returns: Bio::Ontology::RelationshipType set to "POSITIVELY_REGULATES"
  • Args: (none)

πŸ’… negatively_regulates_relationship πŸ’…

  • Title: negatively_regulates_relationship()
  • Usage: $REGULATES = $engine->negatively_regulates_relationship();
  • Function: Returns a Bio::Ontology::RelationshipType object for "negatively_regulates" relationships
  • Returns: Bio::Ontology::RelationshipType set to "POSITIVELY_REGULATES"
  • Args: (none)
😭 bestie, yes, the docs really do say this one returns "POSITIVELY_REGULATES" even though it's the negatively one. That is literally what the page says. I'm not editing it, I'm just reporting it. iykyk.

πŸ“ add_term πŸ“

  • Title: add_term
  • Usage: $engine->add_term( $term_obj );
  • Function: Adds a Bio::Ontology::TermI to this engine
  • Returns: true if the term was added and false otherwise (e.g., if the term already existed in the ontology engine)
  • Args: Bio::Ontology::TermI

πŸ“ has_term πŸ“

  • Title: has_term
  • Usage: $engine->has_term( $term );
  • Function: Checks whether this engine contains a particular term
  • Returns: true or false
  • Args: Bio::Ontology::TermI or a term identifier (e.g. "GO:0012345")

like a little vibe check for whether a term is in there. πŸ”


πŸ“ add_relationship_type πŸ“

  • Title: add_relationship_type
  • Usage: $engine->add_relationship_type( $type_name, $ont );
  • Function: Adds a new relationship type to the engine. Use get_relationship_type($type_name) to retrieve it later.
  • Returns: true if successfully added, false otherwise
  • Args: relationship type name to add (scalar), and the ontology to which to assign the relationship type

πŸ“ get_relationship_type πŸ“

  • Title: get_relationship_type
  • Usage: $engine->get_relationship_type( $type_name );
  • Function: Gets a Bio::Ontology::RelationshipI object corresponding to $type_name
  • Returns: a Bio::Ontology::RelationshipI object
  • Args: (none)

πŸ¦‹ add_relationship πŸ¦‹

  • Title: add_relationship
  • Usage:
$engine->add_relationship( $relationship );
$engine->add_relatioship( $subject_term, $predicate_term,
                          $object_term, $ontology );
$engine->add_relatioship( $subject_id, $predicate_id,
                          $object_id, $ontology);
  • Function: Adds a relationship to this engine
  • Returns: true if successfully added, false otherwise
  • Args: The relationship, in one of three ways:
    • a) subject (or child) term id, Bio::Ontology::TermI (rel.type), object (or parent) term id, ontology

or

  • b) subject Bio::Ontology::TermI, predicate Bio::Ontology::TermI (rel.type), object Bio::Ontology::TermI, ontology

or

  • c) a Bio::Ontology::RelationshipI-compliant object
πŸ™ˆ and yeah, the usage lines literally spell it add_relatioship. that's the page's spelling, not mine, so I'm keeping it exactly. no touchy.

πŸ¦‹ get_relationships πŸ¦‹

  • Title: get_relationships
  • Usage: $engine->get_relationships( $term );
  • Function: Returns all relationships of a term, or all relationships in the graph if no term is specified.
  • Returns: Relationship
  • Args: term id or Bio::Ontology::TermI

πŸ¦‹ get_all_relationships πŸ¦‹

  • Title: get_all_relationships
  • Usage: @rels = $engine->get_all_relationships();
  • Function: Returns all relationships in the graph.
  • Returns: Relationship
  • Args: (none)

🌈 get_predicate_terms 🌈

  • Title: get_predicate_terms
  • Usage: $engine->get_predicate_terms();
  • Function: Returns the types of relationships this engine contains
  • Returns: Bio::Ontology::RelationshipType
  • Args: (none)

🌈 get_child_terms 🌈

  • Title: get_child_terms
  • Usage:
$engine->get_child_terms( $term_obj, @rel_types );
$engine->get_child_terms( $term_id, @rel_types );
  • Function: Returns the children of this term
  • Returns: Bio::Ontology::TermI
  • Args: Bio::Ontology::TermI, Bio::Ontology::RelationshipType or term id, Bio::Ontology::RelationshipType

if NO Bio::Ontology::RelationshipType is indicated: children of ALL types are returned 🫢


🌈 get_descendant_terms 🌈

  • Title: get_descendant_terms
  • Usage:
$engine->get_descendant_terms( $term_obj, @rel_types );
$engine->get_descendant_terms( $term_id, @rel_types );
  • Function: Returns the descendants of this term
  • Returns: Bio::Ontology::TermI
  • Args: Bio::Ontology::TermI, Bio::Ontology::RelationshipType or term id, Bio::Ontology::RelationshipType

if NO Bio::Ontology::RelationshipType is indicated: descendants of ALL types are returned


🌈 get_parent_terms 🌈

  • Title: get_parent_terms
  • Usage:
$engine->get_parent_terms( $term_obj, @rel_types );
$engine->get_parent_terms( $term_id, @rel_types );
  • Function: Returns the parents of this term
  • Returns: Bio::Ontology::TermI
  • Args: Bio::Ontology::TermI, Bio::Ontology::RelationshipType or term id, Bio::Ontology::RelationshipType

if NO Bio::Ontology::RelationshipType is indicated: parents of ALL types are returned


🌈 get_ancestor_terms 🌈

  • Title: get_ancestor_terms
  • Usage:
$engine->get_ancestor_terms( $term_obj, @rel_types );
$engine->get_ancestor_terms( $term_id, @rel_types );
  • Function: Returns the ancestors of this term
  • Returns: Bio::Ontology::TermI
  • Args: Bio::Ontology::TermI, Bio::Ontology::RelationshipType or term id, Bio::Ontology::RelationshipType

if NO Bio::Ontology::RelationshipType is indicated: ancestors of ALL types are returned


⭐ get_leaf_terms ⭐

  • Title: get_leaf_terms
  • Usage: $engine->get_leaf_terms();
  • Function: Returns the leaf terms
  • Returns: Bio::Ontology::TermI
  • Args: (none)

⭐ get_root_terms() ⭐

  • Title: get_root_terms
  • Usage: $engine->get_root_terms();
  • Function: Returns the root terms
  • Returns: Bio::Ontology::TermI
  • Args: (none)

⭐ get_terms ⭐

  • Title: get_terms
  • Usage: @terms = $engine->get_terms( "GO:1234567", "GO:2234567" );
  • Function: Returns term objects with given identifiers
  • Returns: Bio::Ontology::TermI, or the term corresponding to the first identifier if called in scalar context
  • Args: term ids

⭐ get_all_terms ⭐

  • Title: get_all_terms
  • Usage: $engine->get_all_terms();
  • Function: Returns all terms in this engine
  • Returns: Bio::Ontology::TermI
  • Args: (none)

🧚 find_terms 🧚

  • Title: find_terms
  • Usage: ($term) = $oe->find_terms(-identifier => "SO:0000263");
  • Function: Find term instances matching queries for their attributes.

This implementation can efficiently resolve queries by identifier.

  • Example: (none)
  • Returns: an array of zero or more Bio::Ontology::TermI objects
  • Args: Named parameters. The following parameters should be recognized by any implementations:
    • -identifier β€” query by the given identifier
    • -name β€” query by the given name

🧚 find_identically_named_terms 🧚

  • Title: find_identically_named_terms
  • Usage: ($term) = $oe->find_identically_named_terms($term0);
  • Function: Find term instances where names match the query term name exactly
  • Example: (none)
  • Returns: an array of zero or more Bio::Ontology::TermI objects
  • Args: a Bio::Ontology::TermI object

and bestie... that's not even the whole thing. there's MORE coming. don't go anywhere πŸ’–

✨ find_identical_terms ✨

  • Title: find_identical_terms
  • Usage: ($term) = $oe->find_identical_terms($term0);
  • Function: hunts down every term instance where the name or a synonym matches your query exactly β€” no fuzz, no vibes, just a perfect match. πŸ”βœ¨
  • Example: (yeah bestie, this one's empty in the original too πŸ™ˆ)
  • Returns: an array of zero or more Bio::Ontology::TermI objects
  • Args: a Bio::Ontology::TermI object

πŸ¦‹ find_similar_terms πŸ¦‹

  • Title: find_similar_terms
  • Usage: ($term) = $oe->find_similar_terms($term0);
  • Function: the chill, non-exact sibling of the one above πŸ’… β€” it finds term instances where the name or synonym, or even just part of one, matches your query. So like, partial credit counts here, periodt.
  • Example: (also blank in the original, not me inventing stuff 😭)
  • Returns: an array of zero or more Bio::Ontology::TermI objects
  • Args: a Bio::Ontology::TermI object

πŸŽ€ relationship_factory πŸŽ€

  • Title: relationship_factory
  • Usage: $fact = $obj->relationship_factory()
  • Function: get/set the object factory that gets used whenever relationship objects are created by the implementation on-the-fly. It's giving "who's making my relationships for me" energy 🫢
  • Example: (nope, empty here too πŸ“)
  • Returns: value of relationship_factory (a Bio::Factory::ObjectFactoryI compliant object)
  • Args: on set, a Bio::Factory::ObjectFactoryI compliant object

🌸 term_factory 🌸

  • Title: term_factory
  • Usage: $fact = $obj->term_factory()
  • Function: get/set the object factory used when term objects are created by the implementation on-the-fly.
⚠️ Okay bestie, important heads-up: this ontology engine implementation does not create term objects on the fly, so setting this attribute is meaningless. Like, you can set it, but it will not do a single thing. Not me warning you twice. πŸ’€
  • Example: (empty, iconic, consistent πŸ’œ)
  • Returns: value of term_factory (a Bio::Factory::ObjectFactoryI compliant object)
  • Args: on set, a Bio::Factory::ObjectFactoryI compliant object

πŸ‘‘ graph πŸ‘‘

  • Title: graph()
  • Usage: $engine->graph();
  • Function: hands you back the Graph that this engine is based on. The whole thing. The blueprint. The main character. 🌈
  • Returns: Graph
  • Args: (nothing, she takes no arguments and needs no arguments ✨)

and that's a wrap on this one, bestie 🫢 you just read the perl v5.32.1 version, dated 2021-08-15, filed under Bio::O...Engine(3pm) β€” go forth and query those ontologies, no cap πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from