Bio::O...Engine(3pm)
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::RelationshipTypeobject for "is-a" relationships - Returns:
Bio::Ontology::RelationshipTypeset to"IS_A" - Args: (none)
π
part_of_relationship π
- Title:
part_of_relationship() - Usage:
$PART_OF = $engine->part_of_relationship(); - Function: Returns a
Bio::Ontology::RelationshipTypeobject for "part-of" relationships - Returns:
Bio::Ontology::RelationshipTypeset to"PART_OF" - Args: (none)
π
related_to_relationship π
- Title:
related_to_relationship() - Usage:
$RELATED_TO = $engine->related_to_relationship(); - Function: Returns a
Bio::Ontology::RelationshipTypeobject for "related-to" relationships - Returns:
Bio::Ontology::RelationshipTypeset to"RELATED_TO" - Args: (none)
π
regulates_relationship π
- Title:
regulates_relationship() - Usage:
$REGULATES = $engine->regulates_relationship(); - Function: Returns a
Bio::Ontology::RelationshipTypeobject for "regulates" relationships - Returns:
Bio::Ontology::RelationshipTypeset to"REGULATES" - Args: (none)
π
positively_regulates_relationship π
- Title:
positively_regulates_relationship() - Usage:
$REGULATES = $engine->positively_regulates_relationship(); - Function: Returns a
Bio::Ontology::RelationshipTypeobject for "positively_regulates" relationships - Returns:
Bio::Ontology::RelationshipTypeset to"POSITIVELY_REGULATES" - Args: (none)
π
negatively_regulates_relationship π
- Title:
negatively_regulates_relationship() - Usage:
$REGULATES = $engine->negatively_regulates_relationship(); - Function: Returns a
Bio::Ontology::RelationshipTypeobject for "negatively_regulates" relationships - Returns:
Bio::Ontology::RelationshipTypeset 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::TermIto 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::TermIor 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::RelationshipIobject corresponding to$type_name - Returns: a
Bio::Ontology::RelationshipIobject - 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
- a) subject (or child) term id,
or
- b) subject
Bio::Ontology::TermI, predicateBio::Ontology::TermI(rel.type), objectBio::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::RelationshipTypeor 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::RelationshipTypeor 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::RelationshipTypeor 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::RelationshipTypeor 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::TermIobjects - 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::TermIobjects - Args: a
Bio::Ontology::TermIobject
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::TermIobjects - Args: a
Bio::Ontology::TermIobject
π¦ 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::TermIobjects - Args: a
Bio::Ontology::TermIobject
π 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(aBio::Factory::ObjectFactoryIcompliant object) - Args: on set, a
Bio::Factory::ObjectFactoryIcompliant 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(aBio::Factory::ObjectFactoryIcompliant object) - Args: on set, a
Bio::Factory::ObjectFactoryIcompliant 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
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms