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

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

πŸ’– Bio::Ontology::RelationshipType πŸ’–

okay so bestie, this is a page from the User Contributed Perl Documentation collection, and it's literally all about Bio::Ontology::RelationshipType β€” a relationship type for an ontology. yes. that's the whole vibe. let's get into it πŸ¦‹


✨ NAME ✨

Bio::Ontology::RelationshipType β€” it's a relationship type for an ontology, no cap πŸ’…


🌸 SYNOPSIS 🌸

#

that's it. that's the synopsis. iconic minimalism honestly πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so this class is your girl for modelling alllll the different kinds of relationships β€” think "IS_A", "PART_OF", "CONTAINS", "FOUND_IN", "RELATED_TO". the whole friend group 🫢

and here's the tea: this class extends Bio::Ontology::Term, so it essentially is-a Bio::Ontology::TermI. but ALSO β€” plot twist β€” every single method is overridden so the object becomes immutable. once it's set, it's set. no take-backs, periodt πŸ”’βœ¨


πŸŽ€ FEEDBACK πŸŽ€

πŸ“¬ Mailing Lists

user feedback is an integral part of the evolution of this and other Bioperl modules, fr fr. send your comments and suggestions preferably to the Bioperl mailing lists β€” your participation is much appreciated πŸ’–

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

🫢 Support

please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

...rather than to the module maintainer directly, okay bestie? there are so many experienced and responsive experts who will be able to 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 β€” the more deets the better πŸ™ˆ

πŸ› 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 πŸ‘‘

Christian M. Zmasek

Email: czmasek-at-burnham.org or cmzmasek@yahoo.com

WWW: http://monochrome-effect.net/

Address:

Genomics Institute of the Novartis Research Foundation
10675 John Jay Hopkins Drive
San Diego, CA 92121

🌈 APPENDIX 🌈

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ β€” iykyk πŸ‘€

⭐ get_instance

  • Title: get_instance
  • Usage:
$IS_A       = Bio::Ontology::RelationshipType->get_instance( "IS_A" );
$PART_OF    = Bio::Ontology::RelationshipType->get_instance( "PART_OF" );
$RELATED_TO = Bio::Ontology::RelationshipType->get_instance( "RELATED_TO" );
$CONTAINS   = Bio::Ontology::RelationshipType->get_instance( "CONTAINS" );
$FOUND_IN   = Bio::Ontology::RelationshipType->get_instance( "FOUND_IN" );
  • Function: factory method to create instances of RelationshipType 🏭
  • Returns: [Bio::Ontology::RelationshipType]
  • Args: "IS_A" or "PART_OF" or "CONTAINS" or "FOUND_IN" or "RELATED_TO" [scalar] the ontology [Bio::Ontology::OntologyI] (optional)

🧚 init

  • Title: init()
  • Usage: $type->init();
  • Function: initializes this to all undef and empty lists 🫧
  • Returns:
  • Args:

πŸ’« equals

  • Title: equals
  • Usage: if ( $type->equals( $other_type ) ) { ...
  • Function: compares this type to another one, based on string "eq" of the "identifier" field, if at least one of the two types has the identifier set, or string eq of the name otherwise πŸ”
  • Returns: true or false
  • Args: [Bio::Ontology::RelationshipType]

πŸ“ identifier

  • Title: identifier
  • Usage: $term->identifier( "IS_A" ); or print $term->identifier();
  • Function: set/get for the immutable identifier of this Type πŸ”’
  • Returns: the identifier [scalar].
  • Args: the identifier [scalar] (optional).

πŸ¦‹ name

  • Title: name
  • Usage: $term->name( "is a type" ); or print $term->name();
  • Function: set/get for the immutable name of this Type πŸ’–
  • Returns: the name [scalar].
  • Args: the name [scalar] (optional).

🌸 definition

  • Title: definition
  • Usage: $term->definition( "" ); or print $term->definition();
  • Function: set/get for the immutable definition of this Type πŸ“–
  • Returns: the definition [scalar].
  • Args: the definition [scalar] (optional).

🌟 ontology

  • Title: ontology
  • Usage: $term->ontology( $top ); or $top = $term->ontology();
  • Function: set/get for the ontology this relationship type lives in 🏠
  • Returns: the ontology [Bio::Ontology::OntologyI].
  • Args: on set, the ontology [Bio::Ontology::OntologyI] (optional).

πŸ’… version

  • Title: version
  • Usage: $term->version( "1.00" ); or print $term->version();
  • Function: set/get for immutable version information πŸ”’
  • Returns: the version [scalar].
  • Args: the version [scalar] (optional).

πŸ’€ is_obsolete

  • Title: is_obsolete
  • Usage: $term->is_obsolete( 1 ); or if ( $term->is_obsolete() )
  • Function: set/get for the immutable obsoleteness of this Type πŸ‘»
  • Returns: the obsoleteness [0 or 1].
  • Args: the obsoleteness [0 or 1] (optional).

πŸ’¬ comment

  • Title: comment
  • Usage: $term->comment( "..." ); or print $term->comment();
  • Function: set/get for an arbitrary immutable comment about this Type πŸ’­
  • Returns: a comment.
  • Args: a comment (optional).

πŸ”’ Private methods

may be overridden in a derived class, but should never be called from outside. no touching, bestie πŸ™…β€β™€οΈ

πŸ™ˆ veto_change

  • Title: veto_change
  • Usage:
  • Function: called if an attribute is changed. setting an attribute is considered a change if it had a value before and the attempt to set it would change the value.

this method returns the message to be printed in the exception ⚠️

  • Example:
  • Returns: a string
  • Args: the name of the attribute that was attempted to change. optionally, the old value and the new value for reporting purposes only.

and that's the whole page, bestie!! πŸŽ€ this one's perl v5.32.1, dated 2021-08-15, and it's a Bio::O...hipType(3pm) moment β€” love that for us. go forth and be immutable βœ¨πŸ’–πŸ¦‹

πŸ“¦ where this page comes from