TFBS Word
SummaryIncluded librariesPackage variablesDescriptionGeneral documentationMethods
Summary
TFBS::Word - base class for word-based patterns
Package variables
No package variables defined.
Included modules
TFBS::PatternI
Inherit
TFBS::PatternI
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
lengthDescriptionCode
newDescriptionCode
search_alnDescriptionCode
search_seqDescriptionCode
validate_wordDescriptionCode
wordDescriptionCode
Methods description
lengthcode    nextTop
newcodeprevnextTop
search_alncodeprevnextTop
search_seqcodeprevnextTop
validate_wordcodeprevnextTop
Required in all subclasses
wordcodeprevnextTop
Methods code
lengthdescriptionprevnextTop
sub length {
    # wird length does not have to be defined, but its subroutine does
shift->throw("Error: method 'length' not implemented");
}
newdescriptionprevnextTop
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;
}
search_alndescriptionprevnextTop
sub search_aln {
    shift->throw("Error: method search_aln not implemented");
}


1;
}
search_seqdescriptionprevnextTop
sub search_seq {
    shift->throw("Error: method search_seq not implemented");
}
validate_worddescriptionprevnextTop
sub validate_word {
    shift->throw("Error: method 'validate_word' not implemented");
}
worddescriptionprevnextTop
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
FEEDBACKTop
Please send bug reports and other comments to the author.
AUTHOR - Boris LenhardTop
Boris Lenhard <Boris.Lenhard@cgb.ki.se>
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are preceded with an underscore.