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

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

πŸ’¬ NAME

Bio::Annotation::Comment β€” bestie it's literally just a comment object, it holds text πŸ’–


✨ SYNOPSIS ✨

$comment = Bio::Annotation::Comment->new();
$comment->text("This is the text of this comment");
$annotation->add_Annotation('comment', $comment);

πŸŽ€ DESCRIPTION πŸŽ€

So like, it's a holder for comments in annotations. Plain text. That's the whole thing. It is a very simple object, and honestly? justifiably so. She's not trying to be complicated, she's just here to hold your string and look cute doing it πŸ¦‹


🌸 AUTHOR - Ewan Birney 🌸

Email: birney@ebi.ac.uk


πŸ‘‘ APPENDIX πŸ‘‘

The rest of the docs go deep on every single object method, one by one. Heads up: internal methods usually get a _ in front of them, iykyk πŸ’…

🧚 new

Title   : new
Usage   : $comment = Bio::Annotation::Comment->new( '-text' => 'some text for this comment');
Function: This returns a new comment object, optionally with
          text filed
Example :
Returns : a Bio::Annotation::Comment object
Args    : a hash with -text optionally set

Not me creating a whole new comment object with optional text already filled in 🫢


🌈 AnnotationI implementing functions

⭐ as_text

Title   : as_text
Usage   :
Function:
Example :
Returns :
Args    :

Yeah bestie, the docs genuinely left this one blank. No cap.

πŸ’œ 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

Returns a string, and lowkey it's different from as_text() because this one comes formatted the way you'd expect for the specific implementation. You can also pass a callback as an arg for custom text generation β€” the callback gets handed the current instance and whatever text got returned ✨

πŸ¦‹ hash_tree

Title   : hash_tree
Usage   :
Function:
Example :
Returns :
Args    :

Also empty. She's mysterious like that πŸ’€

🌸 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 Bio::AnnotationCollectionI when adding
          this object. When obtaining an AnnotationI object from the
          collection, the collection will set the value to the tag
          under which it was stored unless the object has a tag
          stored already.

Example :
Returns : value of tagname (a scalar)
Args    : new value (a scalar, optional)

Get/set the tagname for this annotation value. Setting it is optional, but if you do set it, you no longer need to hand a tag to Bio::AnnotationCollectionI when adding this object. And when you pull an AnnotationI object out of the collection, the collection sets the value to the tag it was stored under β€” unless the object already had a tag stored. Periodt.


πŸŽ€ Specific accessors for Comments

πŸ’– text

Title   : text
Usage   : $value = $self->text($newval)
Function: get/set for the text field. A comment object
          just holds a single string which is accessible through
          this method
Example :
Returns : value of text
Args    : newvalue (optional)

Get/set for the text field. A comment object just holds one single string and this is the method that gets you to it. Iconic behaviour honestly.

πŸ“ value

Title   : value
Usage   : $value = $self->value($newval)
Function: Alias of the 'text' method
Example :
Returns : value of text
Args    : newvalue (optional)

It's an alias of the 'text' method. Same vibe, different name πŸ’…

πŸ’œ type

Title   : type
Usage   : $value = $self->type($newval)
Function: get/set for the comment type field.  The comment type
          is normally found as a subfield within comment sections
          in some files, such as SwissProt
Example :
Returns : value of text
Args    : newvalue (optional)

Get/set for the comment type field. The comment type is normally found as a subfield inside comment sections in some files, like SwissProt.


Real talk: nothing here is dangerous, deprecated or undefined β€” it's just a text holder. Go off πŸ’–

Okay bestie, that's the whole page, we ate and left no crumbs 🫢 This was Bio::A...omment(3pm) from perl v5.32.1, dated 2021-08-15, straight out of the User Contributed Perl Documentation. Mwah πŸ’‹

πŸ“¦ where this page comes from