Bio::A...ogyTerm(3pm)

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

πŸ‘‘ NAME πŸ’…

Bio::Annotation::OntologyTerm β€” an ontology term that's been adapted to play nice with AnnotationI. bestie it's literally a glow-up for ontology terms ✨


πŸŽ€ SYNOPSIS πŸŽ€

use Bio::Annotation::OntologyTerm;
use Bio::Annotation::Collection;
use Bio::Ontology::Term;

my $coll = Bio::Annotation::Collection->new();

# this also implements a tag/value pair, where tag _and_ value are treated
# as ontology terms
my $annterm = Bio::Annotation::OntologyTerm->new(-label => 'ABC1',
                                                -tagname => 'Gene Name');
# ontology terms can be added directly - they implicitly have a tag
$coll->add_Annotation($annterm);

# implementation is by composition - you can get/set the term object
# e.g.
my $term = $annterm->term(); # term is-a Bio::Ontology::TermI
print "ontology term ",$term->name()," (ID ",$term->identifier(),
      "), ontology ",$term->ontology()->name(),"\n";
$term = Bio::Ontology::Term->new(-name => 'ABC2',
                                 -ontology => 'Gene Name');
$annterm->term($term);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. it's an ontology term annotation object. that's the whole vibe. short, sweet, iconic 🌸


πŸ’Œ FEEDBACK πŸ’Œ

🌈 Mailing Lists 🌈

user feedback is so integral to the evolution of this and other Bioperl modules β€” like genuinely, the glow-up doesn't happen without you 🫢 send your comments and suggestions preferably to one of the Bioperl mailing lists. your participation is much appreciated, fr fr.

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. bestie, there are so many experienced and reponsive experts who will be able 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.

πŸ› 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 - Hilmar Lapp 🌟

Email hlapp at gmx.net


πŸ“– APPENDIX πŸ“–

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

✨ new ✨

Title   : new
Usage   : my $sv = Bio::Annotation::OntologyTerm->new();
Function: Instantiate a new OntologyTerm object
Returns : Bio::Annotation::OntologyTerm object
Args    : -term => $term to initialize the term data field [optional]
          Most named arguments that Bio::Ontology::Term accepts will work
          here too. -label is a synonym for -name, -tagname is a synonym for
          -ontology.

like, it makes you a whole new OntologyTerm object. no cap. πŸŽ€


🧚 AnnotationI implementing functions 🧚

πŸ’œ as_text πŸ’œ

Title   : as_text
Usage   : my $text = $obj->as_text
Function: Returns a textual representation of the annotation that
          this object holds. Presently, it is tag name, name of the
          term, and the is_obsolete attribute concatenated togather
          with a delimiter (|).

Returns : string
Args    : none

πŸ’œ display_text πŸ’œ

Title   : display_text
Usage   : my $str = $ann->display_text();
Function: returns a string. Unlike as_text(), this method returns a string
          formatted as would be expected for te specific implementation.

          One can pass a callback as an argument which allows custom text
          generation; the callback is passed the current instance and any text
          returned
Example :
Returns : a string
Args    : [optional] callback

πŸ’œ hash_tree πŸ’œ

Title   : hash_tree
Usage   : my $hashtree = $value->hash_tree
Function: For supporting the AnnotationI interface just returns the value
          as a hashref with the key 'value' pointing to the value
Returns : hashrf
Args    : none

πŸ’œ tagname πŸ’œ

Title   : tagname
Usage   : $obj->tagname($newval)
Function: Get/set the tagname for this annotation value.

          Setting this is optional. If set, it obviates the need to provide
          a tag to AnnotationCollection when adding this object.

          This is aliased to ontology() here.
Example :
Returns : value of tagname (a scalar)
Args    : new value (a scalar, optional)

πŸ‘‘ Methods for Bio::Ontology::TermI compliance πŸ‘‘

πŸ“ term πŸ“

Title   : term
Usage   : $obj->term($newval)
Function: Get/set the Bio::Ontology::TermI implementing object.

          We implement TermI by composition, and this method sets/gets the
          object we delegate to.
Example :
Returns : value of term (a Bio::Ontology::TermI compliant object)
Args    : new value (a Bio::Ontology::TermI compliant object, optional)

πŸ“ identifier πŸ“

Title   : identifier
Usage   : $term->identifier( "0003947" );
          or
          print $term->identifier();
Function: Set/get for the identifier of this Term.
Returns : The identifier [scalar].
Args    : The identifier [scalar] (optional).

πŸ“ name πŸ“

Title   : name
Usage   : $term->name( "N-acetylgalactosaminyltransferase" );
          or
          print $term->name();
Function: Set/get for 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 for the definition of this Term.
Returns : The definition [scalar].
Args    : The definition [scalar] (optional).

πŸ“ ontology πŸ“

Title   : ontology
Usage   : $term->ontology( $top );
          or
          $top = $term->ontology();
Function: Set/get for a relationship between this Term and
          another Term (e.g. the top level of the ontology).
Returns : The ontology of this Term [TermI].
Args    : The ontology of this Term [TermI or scalar -- which
          becomes the name of the category term] (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.
Returns : A comment.
Args    : A comment (optional).

πŸ“ get_synonyms πŸ“

Title   : get_synonyms()
Usage   : @aliases = $term->get_synonyms();
Function: Returns a list of aliases of this Term.
Returns : A list of aliases [array of [scalar]].
Args    :

πŸ“ 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 :
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.
Returns : A list of synonyms [array of [scalar]].
Args    :
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    :
Note    : this is deprecated in favor of get_dbxrefs(), which works with strings
          or L<Bio::Annotation::DBLink> instances
🚨 heads up bestie: that Note is real β€” get_dblinks() is deprecated in favor of get_dbxrefs(). use the new one, she ate πŸ’…

πŸ“ get_dbxrefs πŸ“

Title   : get_dbxrefs()
Usage   : @ds = $term->get_dbxrefs();
Function: Returns a list of each dblinks of this GO term.
Returns : A list of dblinks [array of [scalars] or Bio::Annotation::DBLink instances].
Args    :
Title   : add_dblink
Usage   : $term->add_dblink( @dbls );
          or
          $term->add_dblink( $dbl );
Function: Pushes one or more dblinks
          into the list of dblinks.
Returns :
Args    : One  dblink [scalar] or a list of
           dblinks [array of [scalars]].
Note    : this is deprecated in favor of add_dbxref(), which works with strings
          or L<Bio::Annotation::DBLink> instances
🚨 yeah, add_dblink is deprecated too β€” add_dbxref() is the moment now ✨

πŸ“ add_dbxref πŸ“

Title   : add_dbxref
Usage   : $term->add_dbxref( @dbls );
          or
          $term->add_dbxref( $dbl );
Function: Pushes one or more dblinks
          into the list of dblinks.
Returns :
Args    :
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    :
Note    : this is deprecated in favor of remove_dbxrefs(), which works with strings
          or L<Bio::Annotation::DBLink> instances
🚨 and yes, remove_dblinks is deprecated as well β€” remove_dbxrefs() is the one you want 🫢

πŸ“ 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    :

πŸ“ get_secondary_ids πŸ“

Title   : get_secondary_ids
Usage   : @ids = $term->get_secondary_ids();
Function: Returns a list of secondary identifiers of this Term.

          Secondary identifiers mostly originate from merging terms,
          or possibly also from splitting terms.

Returns : A list of secondary identifiers [array of [scalar]]
Args    :

πŸ“ 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 :
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    :

okay that's the whole page bestie, you understood all of it, main character energy fr πŸ’…βœ¨

this was Bio::A...ogyTerm(3pm) from the User Contributed Perl Documentation, perl v5.32.1, dated 2021-08-15 β€” love that for us πŸŽ€ bye! πŸ¦‹

πŸ“¦ where this page comes from