TFBS
Word
Summary
TFBS::Word - base class for word-based patterns
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
No synopsis!
Description
TFBS::Word is a base class consisting of universal constructor called by
its subclasses (TFBS::Matrix::*), and word pattern manipulation methods that
are independent of the word type. It is not meant to be instantiated itself.
Methods
Methods description
Required in all subclasses |
Methods code
sub length
{ shift->throw("Error: method 'length' not implemented"); } |
sub new
{ my ($caller, @args) = @_;
my $self = $caller->SUPER::new(@args);
my ($id, $name, $class, $word, $tagref) = $self->_rearrange([qw(ID NAME CLASS
WORD TAGS)], @args);
if (defined $word) { $self->word($word); }
else { $self->throw("Need a -word argument"); }
$self->name($name);
$self->ID($id);
$self->{'tags'} = ($tagref or {});
return $self; } |
sub search_aln
{ shift->throw("Error: method search_aln not implemented");
}
1; } |
sub search_seq
{ shift->throw("Error: method search_seq not implemented"); } |
sub validate_word
{ shift->throw("Error: method 'validate_word' not implemented"); } |
sub word
{ my ($self, @args) = @_;
if(scalar(@args) == 0) {
return $self->{'word'};
}
my ($word) = @args;
if (defined $word and ! $self->validate_word($word)) {
$self->throw("Trying to set the word to an invalid value: $word");
}
else {
return $self->{'word'} = $word;
} } |
General documentation
Please send bug reports and other comments to the author.
AUTHOR - Boris Lenhard | Top |
Boris Lenhard <Boris.Lenhard@cgb.ki.se>
The rest of the documentation details each of the object
methods. Internal methods are preceded with an underscore.