File Coverage

Bio/Symbol/AlphabetI.pm
Criterion Covered Total %
statement 6 12 50.0
branch n/a
condition n/a
subroutine 2 5 40.0
pod 3 3 100.0
total 11 20 55.0


line stmt bran cond sub pod time code
1             #
2             # BioPerl module for Bio::Symbol::AlphabetI
3             #
4             # Please direct questions and support issues to
5             #
6             # Cared for by Jason Stajich
7             #
8             # Copyright Jason Stajich
9             #
10             # You may distribute this module under the same terms as perl itself
11              
12             # POD documentation - main docs before the code
13              
14             =head1 NAME
15              
16             Bio::Symbol::AlphabetI - A Symbol Alphabet
17              
18             =head1 SYNOPSIS
19              
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
25             }
26              
27             =head1 DESCRIPTION
28              
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).
32              
33             This module was implemented for the purposes of meeting the
34             BSANE/BioCORBA spec 0.3 only.
35              
36             =head1 FEEDBACK
37              
38             =head2 Mailing Lists
39              
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.
43              
44             bioperl-l@bioperl.org - General discussion
45             http://bioperl.org/wiki/Mailing_lists - About the mailing lists
46              
47             =head2 Support
48              
49             Please direct usage questions or support issues to the mailing list:
50              
51             I
52              
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.
57              
58             =head2 Reporting Bugs
59              
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:
63              
64             https://github.com/bioperl/bioperl-live/issues
65              
66             =head1 AUTHOR - Jason Stajich
67              
68             Email jason@bioperl.org
69              
70             =head1 APPENDIX
71              
72             The rest of the documentation details each of the object methods.
73             Internal methods are usually preceded with a _
74              
75             =cut
76              
77             # Let the code begin...
78              
79             package Bio::Symbol::AlphabetI;
80 2     2   12 use strict;
  2         4  
  2         48  
81 2     2   8 use Bio::Root::RootI;
  2         4  
  2         175  
82              
83             =head2 AlphabetI Interface methods
84              
85             =cut
86              
87             =head2 symbols
88              
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 objects
94             Args : (optional) Array of L objects
95              
96             =cut
97              
98             sub symbols{
99 0     0 1   my ($self,@args) = @_;
100 0           $self->throw_not_implemented();
101             }
102              
103             =head2 alphabets
104              
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 objects
110             Args : (optional) Array of L objects
111              
112             =cut
113              
114             sub alphabets{
115 0     0 1   my ($self,@args) = @_;
116 0           $self->throw_not_implemented();
117             }
118              
119             =head2 contains
120              
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
126              
127             =cut
128              
129             sub contains{
130 0     0 1   my ($self,@args) = @_;
131 0           $self->throw_not_implemented();
132             }
133              
134             # Other methods from BSANE - not sure if we will implement here or only in
135             # BioCORBA implementation
136              
137             # Resolve symbols from the token string.
138             # SymbolList to_symbol(in string tokens) raises ( IllegalSymbolException) ;
139              
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) ;
143              
144              
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);
150              
151              
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.

159              
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) ;
164              
165             1;