2 # BioPerl module for Bio::Symbol::SymbolI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Jason Stajich <jason@bioperl.org>
8 # Copyright Jason Stajich
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Symbol::SymbolI - Interface for a Symbol
20 # get a Bio::Symbol::SymbolI object somehow
22 my ($name,$token) = ($symbol->name, $symbol->token);
23 my @symbols = $symbol->symbols;
24 my $matches = $symbol->matches;
28 Symbol represents a single token in the sequence. Symbol can have
29 multiple synonyms or matches within the same Alphabet, which
30 makes possible to represent ambiguity codes and gaps.
32 Symbols can be also composed from ordered list other symbols. For
33 example, codons can be represented by single Symbol using a
34 compound Alphabet made from three DNA Alphabets.
36 This module was implemented for the purposes of meeting the
37 BSANE/BioCORBA spec 0.3 only.
43 User feedback is an integral part of the evolution of this and other
44 Bioperl modules. Send your comments and suggestions preferably to
45 the Bioperl mailing list. Your participation is much appreciated.
47 bioperl-l@bioperl.org - General discussion
48 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
52 Please direct usage questions or support issues to the mailing list:
54 I<bioperl-l@bioperl.org>
56 rather than to the module maintainer directly. Many experienced and
57 reponsive experts will be able look at the problem and quickly
58 address it. Please include a thorough description of the problem
59 with code and data examples if at all possible.
63 Report bugs to the Bioperl bug tracking system to help us keep track
64 of the bugs and their resolution. Bug reports can be submitted via the
67 https://github.com/bioperl/bioperl-live/issues
69 =head1 AUTHOR - Jason Stajich
71 Email jason@bioperl.org
75 The rest of the documentation details each of the object methods.
76 Internal methods are usually preceded with a _
81 # Let the code begin...
84 package Bio
::Symbol
::SymbolI
;
86 use base
qw(Bio::Root::RootI);
88 =head2 Bio::Symbol::SymbolI interface methods
95 Usage : my $name = $symbol->name();
96 Function: Get/Set Descriptive name for Symbol
98 Args : (optional) string
103 my ($self,@args) = @_;
104 $self->throw_not_implemented();
110 Usage : my $token = $self->token();
111 Function: Get/Set token for this symbol
112 Example : Letter A,C,G,or T for a DNA alphabet Symbol
114 Args : (optional) string
119 my ($self,@args) = @_;
120 $self->throw_not_implemented();
126 Usage : my @symbols = $self->symbols();
127 Function: Get/Set Symbols this Symbol is composed from
128 Example : A codon is composed of 3 DNA symbols
129 Returns : Array of Bio::Symbol::SymbolI objects
130 Args : (optional) Array of Bio::Symbol::SymbolI objects
136 my ($self,@args) = @_;
137 $self->throw_not_implemented();
143 Usage : my $matchalphabet = $symbol->matches();
144 Function: Get/Set (Sub) alphabet of symbols matched by this symbol
145 including the symbol itself (i.e. if symbol is DNA
146 ambiguity code W then the matches contains symbols for W
148 Returns : Bio::Symbol::AlphabetI
149 Args : (optional) Bio::Symbol::AlphabetI
154 my ($self,@args) = @_;
155 $self->throw_not_implemented();
161 Usage : if( $symbol->equals($symbol2) ) { }
162 Function: Tests if a symbol is equal to another
164 Args : Bio::Symbol::SymbolI
169 my ($self,@args) = @_;
170 $self->throw_not_implemented();