Bio::O...y::Term(3pm)
π NAME π
Bio::Ontology::Term β bestie, it's the implementation of the interface for ontology terms π
This page is Bio::O...y::Term(3pm) from the User Contributed Perl Documentation, and it's giving very "I contain multitudes but also graphs are not my problem" energy. Periodt.
β¨ SYNOPSIS β¨
Okay so first things first, you gotta get yourself a Bio::Ontology::TermI somehow β that's on you, not on this module, no cap:
#get Bio::Ontology::TermI somehow.
print $term->identifier(), "\n";
print $term->name(), "\n";
print $term->definition(), "\n";
print $term->is_obsolete(), "\n";
print $term->comment(), "\n";
foreach my $synonym ( $term->each_synonym() ) {
print $synonym, "\n";
}
Like. Look at that. Prints the identifier, the name, the definition, whether it's obsolete, the comment, and then loops through every single synonym and prints each one. Iconic behavior honestly. π¦
πΈ DESCRIPTION πΈ
So what is this thing? It's a simple implementation for ontology terms, providing basic methods. That's the vibe. It's lowkey humble about it too, because β and I need you to hear this β it provides no functionality related to graphs. None. Zero. Not its job, not its problem, don't @ it. π
What it does do is implement the Bio::Ontology::TermI interface. Slay.
And plot twist, bestie, it's also out here implementing Bio::IdentifiableI and Bio::DescribableI. Three interfaces. Main character energy fr fr. π
π FEEDBACK π
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules, and that's just facts. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated, genuinely, they mean it:
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
Not to the module maintainer directly, bestie. I know, I know, you wanna slide into their DMs, but no. Many experienced and reponsive experts will be able look at the problem and quickly address it. If at all possible, please include a thorough description of the problem with code and data examples β the more receipts the better. π«Ά
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track 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
okay that's the whole top half of the page, and there's more where that came from β options and everything, so stay tuned π
β¨ APPENDIX β¨
okay bestie so the rest of this doc is gonna go method by method, deep dive style. every single one. no skips, no shortcuts, we're doing the whole thing π
new
- Title:
new - Usage:
$term = Bio::Ontology::Term->new(
-identifier => "16847",
-name => "1-aminocyclopropane-1-carboxylate synthase",
-definition => "Catalysis of ...",
-is_obsolete => 0,
-comment => "" );
- Function: builds you a shiny new
Bio::Ontology::Term. - Returns: a brand new
Bio::Ontology::Termobject. periodt. β¨ - Args:
-identifier=> the identifier of this term[scalar]-name=> the name of this term[scalar]-definition=> the definition of this term[scalar]-ontology=> the ontology this term lives in (aBio::Ontology::OntologyIobject)-version=> version information[scalar]-is_obsolete=> the obsoleteness of this term[0 or 1]-comment=> a comment[scalar]-dblinks=>Bio::Annotation::DBLinkobjects[reference to array]-references=>Bio::Annotation::Referenceobjects[reference to array]
See Bio::Ontology::OntologyI, Bio::Annotation::Reference, Bio::Annotation::DBLink.
identifier
- Title:
identifier - Usage:
$term->identifier( "GO:0003947" );
or
print $term->identifier();
- Function: set/get the identifier of this Term. classic little getter-setter combo π«Ά
- Returns: the identifier
[scalar]. - Args: the identifier
[scalar](optional).
name
- Title:
name - Usage:
$term->name( "N-acetylgalactosaminyltransferase" );
or
print $term->name();
- Function: set/get the name of this Term.
- Returns: the name
[scalar]. - Args: the name
[scalar](optional).
definition
- Title:
definition - Usage:
$term->definition( "Catalysis of ..." );
or
print $term->definition();
- Function: set/get the definition of this Term.
- Returns: the definition
[scalar]. - Args: the definition
[scalar](optional).
ontology
- Title:
ontology - Usage:
$ont = $term->ontology();
or
$term->ontology( $ont );
- Function: grab the ontology this term is in.
ngl, this one's kinda powerful β once you have the ontology in hand you can go query for all the related terms and stuff. main character access fr. π
- Returns: the ontology of this Term as a
Bio::Ontology::OntologyIimplementing object. - Args: on set, the ontology of this Term as a
Bio::Ontology::OntologyIimplementing object, or a string representing its name.
See Bio::Ontology::OntologyI.
version
- Title:
version - Usage:
$term->version( "1.00" );
or
print $term->version();
- Function: set/get for 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 obsoleteness of this Term.
- Returns: the obsoleteness
[0 or 1]. - Args: the obsoleteness
[0 or 1](optional).
comment
- Title:
comment - Usage:
$term->comment( "Consider the term ..." );
or
print $term->comment();
- Function: set/get for an arbitrary comment about this Term. just vibes, whatever you wanna say π
- Returns: a comment.
- Args: a comment (optional).
get_synonyms
- Title:
get_synonyms - Usage:
@aliases = $term->get_synonyms;
- Function: hands you back a list of aliases of this Term.
- Returns: a list of aliases
[array of [scalar]]. - Args: (none)
add_synonym
- Title:
add_synonym - Usage:
$term->add_synonym( @asynonyms );
or
$term->add_synonym( $synonym );
- Function: pushes one or more synonyms into the list of synonyms.
- Returns: (nothing)
- Args: one synonym
[scalar], or a list of synonyms[array of [scalar]].
remove_synonyms
- Title:
remove_synonyms() - Usage:
$term->remove_synonyms();
- Function: deletes (and returns) the synonyms of this Term. so it takes them away and hands them to you, chaotic but generous π
- Returns: a list of synonyms
[array of [scalar]]. - Args: (none)
get_dblinks
- Title:
get_dblinks() - Usage:
@ds = $term->get_dblinks();
- Function: returns a list of each dblinks of this GO term.
- Returns: a list of dblinks
[array of [scalars]]. - Args: a scalar indicating the context (optional). if you leave it out, all dblinks will be returned.
Note: deprecated method due to past use of mixed data types; useget_dbxrefs()instead, which handles both strings andDBLinkinstances. β οΈ
get_dbxrefs
- Title:
get_dbxrefs() - Usage:
@ds = $term->get_dbxrefs();
- Function: returns a list of each link for this term.
and heads up β if whoever implements this interface lets you modify this array property, the class should define at least the methods add_dbxref() and remove_dbxrefs(), with obvious functionality.
- Returns: a list of
Bio::Annotation::DBLinkinstances. - Args:
[optional]string which specifies context (default : returns all dbxrefs).
get_dblink_context
- Title:
get_dblink_context - Usage:
@context = $term->get_dblink_context;
- Function: return all context existing in Term.
- Returns: a list of scalar.
- Args:
[none]
Note: deprecated method due to past use of mixed data types; use get_dbxref_context() instead. β οΈ
get_dbxref_context
- Title:
get_dbxref_context - Usage:
@context = $term->get_dbxref_context;
- Function: return all context strings existing in Term.
- Returns: a list of scalars.
- Args:
[none]
add_dblink
- Title:
add_dblink - Usage:
$term->add_dblink( @dbls );
or
$term->add_dblink( $dbl );
- Function: pushes one or more dblinks onto the list of dblinks.
- Returns: (nothing)
- Args: one or more
Bio::Annotation::DBLinkinstances.
Note: deprecated method due to past use of mixed data types; useadd_dbxref()instead, which handles both strings andDBLinkinstances. β οΈ
add_dbxref
- Title:
add_dbxref - Usage:
$term->add_dbxref( @dbls );
or
$term->add_dbxref( $dbl );
- Function: pushes one or more dblinks onto the list of dblinks.
- Returns: (nothing)
- Args:
-dbxrefs: array ref ofBio::Annotation::DBLinkinstances-context: string designating the context for the DBLink (default :'_default'- contextless)
has_dblink
- Title:
has_dblink - Usage:
$term->has_dblink($dblink);
- Function: checks if a DBXref is already existing in the OBOterm object.
- Return: TRUE/FALSE
- Args:
[arg1]a DBxref identifier.
Note: deprecated method due to past use of mixed data types; usehas_dbxref()instead, which handles both strings andDBLinkinstances. β οΈ
has_dbxref
- Title:
has_dbxref - Usage:
$term->has_dbxref($dbxref);
- Function: checks if a dbxref string is already existing in the OBOterm object.
- Return: TRUE/FALSE
- Args:
[arg1]a DBxref identifier (string).Bio::Annotation::DBLink::display_text()is used for comparison against the string.
add_dblink_context
- Title:
add_dblink_context - Usage:
$term->add_dblink_context($db, $context);
- Function: add a dblink with its context.
- Return:
[none] - Args:
[arg1]aBio::Annotation::DBLinkinstance[arg2]a string for context; if omitted, the default/context-less one will be used.
Note: deprecated method due to past use of mixed data types; use add_dbxref() instead. β οΈ
remove_dblinks
- Title:
remove_dblinks() - Usage:
$term->remove_dblinks();
- Function: deletes (and returns) the definition references of this GO term.
- Returns: a list of definition references
[array of [scalars]]. - Args: context. if omitted or equal to
'all', all dblinks will be removed.
Note: deprecated method due to past use of mixed data types; useremove_dblinks()instead, which handles both strings andDBLinkinstances. β οΈ
remove_dbxrefs
- Title:
remove_dbxrefs() - Usage:
$term->remove_dbxrefs();
- Function: deletes (and returns) the definition references of this GO term.
- Returns: a list of definition references
[array of [scalars]]. - Args: context. if omitted or equal to
'all', all dblinks will be removed.
get_references
- Title:
get_references - Usage:
@references = $self->get_references
- Function: returns a list of references.
- Return: a list of objects.
- Args:
[none]
add_reference
- Title:
add_reference - Usage:
$self->add_reference($reference);
$self->add_reference($reference1, $reference2);
- Function: add one or more references.
- Returns:
[none]
remove_references
- Title:
remove_references - Usage:
$self->remove_references;
- Function: deletes (and returns) all references.
- Returns: a list of references.
- Args:
[none]
get_secondary_ids
- Title:
get_secondary_ids - Usage:
@ids = $term->get_secondary_ids();
- Function: returns a list of secondary identifiers of this Term.
lowkey lore drop: secondary identifiers mostly originate from merging terms, or possibly also from splitting terms. π¦
- Returns: a list of secondary identifiers
[array of [scalar]]. - Args: (none)
add_secondary_id
- Title:
add_secondary_id - Usage:
$term->add_secondary_id( @ids );
or
$term->add_secondary_id( $id );
- Function: adds one or more secondary identifiers to this term.
- Returns: (nothing)
- Args: one or more secondary identifiers
[scalars].
remove_secondary_ids
- Title:
remove_secondary_ids - Usage:
$term->remove_secondary_ids();
- Function: deletes (and returns) the secondary identifiers of this Term.
- Returns: the previous list of secondary identifiers
[array of [scalars]]. - Args: (none)
π object_id π
- Title:
object_id - Usage:
$string = $obj->object_id() - Function: a string which represents the stable primary identifier in this namespace of this object.
This is a synonym for identifier().
- Returns: A scalar
πΈ authority πΈ
- Title:
authority - Usage:
$authority = $obj->authority() - Function: a string which represents the organisation which granted the namespace, written as the DNS name for organisation (eg,
wormbase.org)
This forwards to ontology()->authority(). Note that you cannot set the authority before having set the ontology or the namespace (which will set the ontology).
bestie pls read that twice π set the ontology or namespace FIRST, the authority is not gonna manifest out of thin air, fr fr
- Returns: A scalar
- Args: on set, the new value (a scalar)
π¦ namespace π¦
- Title:
namespace - Usage:
$string = $obj->namespace() - Function: A string representing the name space this identifier is valid in, often the database name or the name describing the collection.
This forwards to ontology() (set mode) and ontology()->name() (get mode). I.e., setting the namespace will set the ontology to one matching that name in the ontology store, or to one newly created.
- Returns: A scalar
- Args: on set, the new value (a scalar)
the way that setting this also sets your ontology is giving two-for-one deal energy π iykyk
β¨ display_name β¨
- Title:
display_name - Usage:
$string = $obj->display_name() - Function: A string which is what should be displayed to the user.
The definition in Bio::DescribableI states that the string should not contain spaces. As this is not very sensible for ontology terms, we relax this here. The implementation just forwards to name().
- Returns: A scalar
- Args: on set, the new value (a scalar)
π description π
- Title:
description - Usage:
$string = $obj->description() - Function: A text string suitable for displaying to the user a description. This string is likely to have spaces, but should not have any newlines or formatting - just plain text.
This forwards to definition(). The caveat is that the text will often be longer for ontology term definitions than the 255 characters stated in the definition in Bio::DescribableI.
- Returns: A scalar
- Args: on set, the new value (a scalar)
plain text only, no newlines, no formatting, no frills β it's giving minimalist queen π§ but also the 255-char thing from Bio::DescribableI? yeah we're lowkey ignoring that for ontology terms, that's the caveat, don't come for me π
π Deprecated methods π
Used for looking up the methods that supersedes them.
they're deprecated, bestie β don't build your whole personality on them, they're just here so you can find whatever replaced them π
and that's a wrap on part 3, my love π«Ά this page is from perl v5.32.1, dated 2021-08-15, and it's the Bio::O...y::Term(3pm) page in the User Contributed Perl Documentation. slay, go annotate something πβ
π¦ 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