NAME
Bio::Annotation::Comment - A comment object, holding text
SYNOPSIS
$comment = Bio::Annotation::Comment->new();$comment->text("This is the text of this comment");$annotation->add_Annotation('comment', $comment);
DESCRIPTION
A holder for comments in annotations, just plain text. This is a very simple object, and justifiably so.
AUTHOR - Ewan Birney
Email [email protected]
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : $comment = Bio::Annotation::Comment->new( '-text' => 'some text for this comment');Function: This returns a new comment object, optionally withtext filedExample :Returns : a Bio::Annotation::Comment objectArgs : a hash with -text optionally set
AnnotationI implementing functions
as_text
Title : as_textUsage :Function:Example :Returns :Args :
display_text
Title : display_textUsage : my $str = $ann->display_text();Function: returns a string. Unlike as_text(), this method returns a stringformatted as would be expected for te specific implementation.One can pass a callback as an argument which allows custom textgeneration; the callback is passed the current instance and any textreturnedExample :Returns : a stringArgs : [optional] callback
hash_tree
Title : hash_treeUsage :Function:Example :Returns :Args :
tagname
Title : tagnameUsage : $obj->tagname($newval)Function: Get/set the tagname for this annotation value.Setting this is optional. If set, it obviates the need toprovide a tag to Bio::AnnotationCollectionI when addingthis object. When obtaining an AnnotationI object from thecollection, the collection will set the value to the tagunder which it was stored unless the object has a tagstored already.Example :Returns : value of tagname (a scalar)Args : new value (a scalar, optional)
Specific accessors for Comments
text
Title : textUsage : $value = $self->text($newval)Function: get/set for the text field. A comment objectjust holds a single string which is accessible throughthis methodExample :Returns : value of textArgs : newvalue (optional)
value
Title : valueUsage : $value = $self->value($newval)Function: Alias of the 'text' methodExample :Returns : value of textArgs : newvalue (optional)
type
Title : typeUsage : $value = $self->type($newval)Function: get/set for the comment type field. The comment typeis normally found as a subfield within comment sectionsin some files, such as SwissProtExample :Returns : value of textArgs : newvalue (optional)