t/SeqFeature/Generic.t: fix typo on required module for testing
[bioperl-live.git] / lib / Bio / Symbol / AlphabetI.pm
blobda0f15530a189896132f241620498b86236969f7
2 # BioPerl module for Bio::Symbol::AlphabetI
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::AlphabetI - A Symbol Alphabet
18 =head1 SYNOPSIS
20 # get a Bio::Symbol::AlphabetI object somehow
21 my @symbols = $alphabet->symbols;
22 my @subalphas = $alphabet->alphabets;
23 if( $alphabet->contains($symbol) ) {
24 # do something
27 =head1 DESCRIPTION
29 Alphabet contains set of symbols, which can be concatenated to form
30 symbol lists. Sequence string, for example, is stringified
31 representation of the symbol list (tokens of symbols).
33 This module was implemented for the purposes of meeting the
34 BSANE/BioCORBA spec 0.3 only.
36 =head1 FEEDBACK
38 =head2 Mailing Lists
40 User feedback is an integral part of the evolution of this and other
41 Bioperl modules. Send your comments and suggestions preferably to
42 the Bioperl mailing list. Your participation is much appreciated.
44 bioperl-l@bioperl.org - General discussion
45 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
47 =head2 Support
49 Please direct usage questions or support issues to the mailing list:
51 I<bioperl-l@bioperl.org>
53 rather than to the module maintainer directly. Many experienced and
54 reponsive experts will be able look at the problem and quickly
55 address it. Please include a thorough description of the problem
56 with code and data examples if at all possible.
58 =head2 Reporting Bugs
60 Report bugs to the Bioperl bug tracking system to help us keep track
61 of the bugs and their resolution. Bug reports can be submitted via the
62 web:
64 https://github.com/bioperl/bioperl-live/issues
66 =head1 AUTHOR - Jason Stajich
68 Email jason@bioperl.org
70 =head1 APPENDIX
72 The rest of the documentation details each of the object methods.
73 Internal methods are usually preceded with a _
75 =cut
77 # Let the code begin...
79 package Bio::Symbol::AlphabetI;
80 use strict;
81 use Bio::Root::RootI;
83 =head2 AlphabetI Interface methods
85 =cut
87 =head2 symbols
89 Title : symbols
90 Usage : my @symbols = $alphabet->symbols();
91 Function: Get/Set Symbol list for an alphabet
92 List of symbols, which make up this alphabet.
93 Returns : Array of L<Bio::Symbol::SymbolI> objects
94 Args : (optional) Array of L<Bio::Symbol::SymbolI> objects
96 =cut
98 sub symbols{
99 my ($self,@args) = @_;
100 $self->throw_not_implemented();
103 =head2 alphabets
105 Title : alphabets
106 Usage : my @alphabets = $alphabet->alphabets();
107 Function: Get/Set Sub Alphabet list for an alphabet
108 Sub-alphabets. E.g. codons made from DNAxDNAxDNA alphabets
109 Returns : Array of L<Bio::Symbol::AlphabetI> objects
110 Args : (optional) Array of L<Bio::Symbol::AlphabetI> objects
112 =cut
114 sub alphabets{
115 my ($self,@args) = @_;
116 $self->throw_not_implemented();
119 =head2 contains
121 Title : contains
122 Usage : if($alphabet->contains($symbol)) { }
123 Function: Tests of Symbol is contained in this alphabet
124 Returns : Boolean
125 Args : L<Bio::Symbol::SymbolI>
127 =cut
129 sub contains{
130 my ($self,@args) = @_;
131 $self->throw_not_implemented();
134 # Other methods from BSANE - not sure if we will implement here or only in
135 # BioCORBA implementation
137 # Resolve symbols from the token string.
138 # SymbolList to_symbol(in string tokens) raises ( IllegalSymbolException) ;
140 # Convinience method, which returns gap symbol that do not
141 # match with any other symbols in the alphabet.
142 # Symbol get_gap_symbol() raises ( DoesNotExist) ;
145 # Returns a ambiguity symbol, which represent list of
146 # symbols. All symbols in a list must be members of
147 # this alphabet otherwise IllegalSymbolException is
148 # thrown.
149 # Symbol get_ambiguity( in SymbolList symbols) raises( IllegalSymbolException);
152 # Returns a Symbol, which represents ordered list of symbols
153 # given as a parameter. Each symbol in the list must be member of
154 # different sub-alphabet in the order defined by the alphabets
155 # attribute. For example, codons can be represented by a compound
156 # Alphabet of three DNA Alphabets, in which case the get_symbol(
157 # SymbolList[ a,g,t]) method of the Alphabet returns Symbol for
158 # the codon agt.<p>
160 # IllegalSymbolException is raised if members of symbols
161 # are not Symbols over the alphabet defined by
162 # get_alphabets()-method
163 # Symbol get_symbol(in SymbolList symbols) raises(IllegalSymbolException) ;