Bio::T...leNode(3pm)

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

πŸ’– Bio::Tree::AnnotatableNode πŸ’–

okay bestie, welcome to the Bio::Tree::AnnotatableNode page β€” it's a chunk of User Contributed Perl Documentation and honestly? it's giving tree-node-with-extras. it's the one where your node can also hold vibes (by which i mean annotations). let's go πŸ¦‹


✨ NAME ✨

Bio::Tree::AnnotatableNode β€” a Tree Node with support for annotation πŸ’…


🌸 SYNOPSIS 🌸

use Bio::Tree::AnnotatableNode;
my $nodeA = Bio::Tree::AnnotatableNode->new();
my $nodeL = Bio::Tree::AnnotatableNode->new();
my $nodeR = Bio::Tree::AnnotatableNode->new();

my $node = Bio::Tree::AnnotatableNode->new();
$node->add_Descendents($nodeL);
$node->add_Descendents($nodeR);

print "node is not a leaf \n" if( $node->is_leaf);

# $node is-a Bio::AnnotatableI, hence:
my $ann_coll = $node->annotation();
# $ann_coll is-a Bio::AnnotationCollectionI, hence:
my @all_anns = $ann_coll->get_Annotations();
# do something with the annotation objects

no cap, that last part is the whole point β€” you grab the collection, you grab the annotations, you do whatever you want with the annotation objects ✨


πŸŽ€ DESCRIPTION πŸŽ€

it makes a Tree Node with Annotations, and it's suitable for building a Tree. if you want the full list of functionality, go look at Bio::Tree::Node β€” that's where the rest of the moves live 🫢


🫢 FEEDBACK 🫢

Mailing Lists πŸ’Œ

user feedback is, like, an integral part of the evolution of this and other Bioperl modules. so send your comments and suggestions β€” preferably to the Bioperl mailing list. 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. why? because many experienced and reponsive experts will be able look at the problem and quickly address it πŸ‘‘ and please include a thorough description of the problem with code and data examples if at all possible β€” the more detail 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:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHOR - Mira Han πŸ‘‘

email mirhan@indiana.edu


🧚 APPENDIX 🧚

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ (iykyk) πŸ’€

new ⭐

  • Title β€” new
  • Usage β€” my $obj = Bio::Tree::AnnotatableNode->new();
  • Function β€” Builds a new Bio::Tree::AnnotatableNode object
  • Returns β€” Bio::Tree::AnnotatableNode
  • Args β€” -tostring => code reference to the tostring callback function (optional)

Methods for implementing Bio::AnnotatableI πŸ’œ

annotation πŸŽ€

  • Title β€” annotation
  • Usage β€” $ann = $node->annotation or $node->annotation($ann)
  • Function β€” Gets or sets the annotation
  • Returns β€” Bio::AnnotationCollectionI object
  • Args β€” None or Bio::AnnotationCollectionI object

see Bio::AnnotationCollectionI and Bio::Annotation::Collection for more information πŸ‘€


Methods for implementing tag access through Annotation::SimpleValue πŸ“

add_tag_value 🏷️

  • Title β€” add_tag_value
  • Usage β€” $node->add_tag_value($tag,$value)
  • Function β€” Adds a tag value to a node
  • Returns β€” number of values stored for this tag
  • Args β€” $tag β€” tag name; $value β€” value to store for the tag

remove_tag βœ‚οΈ

  • Title β€” remove_tag
  • Usage β€” $node->remove_tag($tag)
  • Function β€” Remove the tag and all values for this tag
  • Returns β€” boolean representing success (0 if tag does not exist)
  • Args β€” $tag β€” tagname to remove

remove_all_tags πŸ’₯

  • Title β€” remove_all_tags
  • Usage β€” $node->remove_all_tags()
  • Function β€” Removes all tags
  • Returns β€” None
  • Args β€” None

get_all_tags πŸ“‹

  • Title β€” get_all_tags
  • Usage β€” my @tags = $node->get_all_tags()
  • Function β€” Gets all the tag names for this Node
  • Returns β€” Array of tagnames
  • Args β€” None

get_tag_values πŸ”

  • Title β€” get_tag_values
  • Usage β€” my @values = $node->get_tag_value($tag)
  • Function β€” Gets the values for given tag ($tag)
  • Returns β€” Array of values or empty list if tag does not exist
  • Args β€” $tag β€” tag name

has_tag βœ…

  • Title β€” has_tag
  • Usage β€” $node->has_tag($tag)
  • Function β€” Boolean test if tag exists in the Node
  • Returns β€” Boolean
  • Args β€” $tag β€” tagname

Methods for implementing to_string πŸͺ„

to_string_callback 🎯

  • Title β€” to_string_callback
  • Usage β€” $node->to_string_callback(\&func)
  • Function β€” get/set callback for to_string
  • Returns β€” code reference for the to_string callback function
  • Args β€” \&func β€” code reference to be set as the callback function

Methods for accessing Bio::Seq 🧬

sequence 🌸

  • Title β€” sequence
  • Usage β€” $ann = $node->sequence or $node->sequence($seq)
  • Function β€” Gets or sets the sequence
  • Returns β€” array reference of Bio::SeqI objects
  • Args β€” None or Bio::SeqI object

see Bio::SeqI and Bio::Seq for more information πŸ’–

has_sequence 🌟

  • Title β€” has_sequence
  • Usage β€” if( $node->has_sequence) { # do something }
  • Function β€” tells if node has sequence attached
  • Returns β€” Boolean for whether or not node has Bio::SeqI attached.
  • Args β€” None

and that's the whole page, bestie β€” you ate it UP πŸ’…βœ¨

this was served to you straight outta User Contributed Perl Documentation, perl v5.32.1, dated 2021-08-15. go build a tree that knows things, queen πŸ‘‘πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from