GO::Model::Root(3pm)

πŸ“¦
version 0.15 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

GO::Model::Root β€” the base class for all GO::Model objects 🫢


🌸 DESCRIPTION 🌸

okay so bestie, this is the base class for literally every GO::Model object. it's the mother, the blueprint, the main character that all the other little classes inherit their whole vibe from πŸ’…


πŸŽ€ Constructors πŸŽ€

πŸ’– new πŸ’–

constructor!! it's basically just calling _initialize(), no cap. most subclasses should not override new β€” nah, leave new alone and go override _initialize() instead, that's the move ✨

if _initialize() fails, the procedure will die πŸ’€

⚠️ WARNING: this procedure will die if initialization is unsuccessful. wrap it in an eval statement to catch those exceptions, periodt. no catching = crash city πŸ™ˆ

πŸ¦‹ obj_factory πŸ¦‹

Usage   - $obj->obj_factory->create_new_term_object($h);
Alias   - apph
Returns - L<GO::ObjFactory>
Args    - none

🌈 sprint_self 🌈

prints out a description of the object to a string ✨


πŸ“ dump πŸ“

dumps the object β€” and yes, you can read it back in with eval πŸ‘‘


πŸ’œ namespace πŸ’œ

Usage   - print $term->namespace();     # getting the type
Usage   - $term->namespace("molecular_function"); # setting the type
Alias   - type
Alias   - term_type
Alias   - category
Alias   - ontology
Returns - string representing type
Args    - string represnting type [optional]

this gives you the OBO namespace for the GO::Model::Term or GO::Model::Relationship 🧚


🌸 _cleanup 🌸

called at object destruction time πŸͺ¦ should be overridden to perform cleanup tasks. it's giving "final goodbyes but make it code" 😭


and that's the whole page bestie, you ate it πŸ’–

this lil doc came from perl v5.36.0, dated 2023-12-18, and lives as GO::Model::Root(3pm) in the User Contributed Perl Documentation ✨ slay ✨

πŸ“¦ where this page comes from