t/AlignIO/AlignIO.t: fix number of tests in plan (fixup c523e6bed866)
[bioperl-live.git] / Bio / Symbol / SymbolI.pm
blob81682ea1be5820b57f96938bd9df5eee674450f2
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
14 =head1 NAME
16 Bio::Symbol::SymbolI - Interface for a Symbol
18 =head1 SYNOPSIS
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;
26 =head1 DESCRIPTION
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.
39 =head1 FEEDBACK
41 =head2 Mailing Lists
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
50 =head2 Support
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.
61 =head2 Reporting Bugs
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
65 web:
67 https://github.com/bioperl/bioperl-live/issues
69 =head1 AUTHOR - Jason Stajich
71 Email jason@bioperl.org
73 =head1 APPENDIX
75 The rest of the documentation details each of the object methods.
76 Internal methods are usually preceded with a _
78 =cut
81 # Let the code begin...
84 package Bio::Symbol::SymbolI;
85 use strict;
86 use base qw(Bio::Root::RootI);
88 =head2 Bio::Symbol::SymbolI interface methods
90 =cut
92 =head2 name
94 Title : name
95 Usage : my $name = $symbol->name();
96 Function: Get/Set Descriptive name for Symbol
97 Returns : string
98 Args : (optional) string
100 =cut
102 sub name{
103 my ($self,@args) = @_;
104 $self->throw_not_implemented();
107 =head2 token
109 Title : token
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
113 Returns : string
114 Args : (optional) string
116 =cut
118 sub token{
119 my ($self,@args) = @_;
120 $self->throw_not_implemented();
123 =head2 symbols
125 Title : symbols
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
133 =cut
135 sub symbols{
136 my ($self,@args) = @_;
137 $self->throw_not_implemented();
140 =head2 matches
142 Title : matches
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
147 and T)
148 Returns : Bio::Symbol::AlphabetI
149 Args : (optional) Bio::Symbol::AlphabetI
151 =cut
153 sub matches{
154 my ($self,@args) = @_;
155 $self->throw_not_implemented();
158 =head2 equals
160 Title : equals
161 Usage : if( $symbol->equals($symbol2) ) { }
162 Function: Tests if a symbol is equal to another
163 Returns : Boolean
164 Args : Bio::Symbol::SymbolI
166 =cut
168 sub equals{
169 my ($self,@args) = @_;
170 $self->throw_not_implemented();