File Coverage

Bio/Symbol/SymbolI.pm
Criterion Covered Total %
statement 6 16 37.5
branch n/a
condition n/a
subroutine 2 7 28.5
pod 5 5 100.0
total 13 28 46.4


line stmt bran cond sub pod time code
1             #
2             # BioPerl module for Bio::Symbol::SymbolI
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::SymbolI - Interface for a Symbol
17              
18             =head1 SYNOPSIS
19              
20             # get a Bio::Symbol::SymbolI object somehow
21              
22             my ($name,$token) = ($symbol->name, $symbol->token);
23             my @symbols = $symbol->symbols;
24             my $matches = $symbol->matches;
25              
26             =head1 DESCRIPTION
27              
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.
31              
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.
35              
36             This module was implemented for the purposes of meeting the
37             BSANE/BioCORBA spec 0.3 only.
38              
39             =head1 FEEDBACK
40              
41             =head2 Mailing Lists
42              
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.
46              
47             bioperl-l@bioperl.org - General discussion
48             http://bioperl.org/wiki/Mailing_lists - About the mailing lists
49              
50             =head2 Support
51              
52             Please direct usage questions or support issues to the mailing list:
53              
54             I
55              
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.
60              
61             =head2 Reporting Bugs
62              
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:
66              
67             https://github.com/bioperl/bioperl-live/issues
68              
69             =head1 AUTHOR - Jason Stajich
70              
71             Email jason@bioperl.org
72              
73             =head1 APPENDIX
74              
75             The rest of the documentation details each of the object methods.
76             Internal methods are usually preceded with a _
77              
78             =cut
79              
80              
81             # Let the code begin...
82              
83              
84             package Bio::Symbol::SymbolI;
85 2     2   9 use strict;
  2         3  
  2         46  
86 2     2   8 use base qw(Bio::Root::RootI);
  2         2  
  2         283  
87              
88             =head2 Bio::Symbol::SymbolI interface methods
89              
90             =cut
91              
92             =head2 name
93              
94             Title : name
95             Usage : my $name = $symbol->name();
96             Function: Get/Set Descriptive name for Symbol
97             Returns : string
98             Args : (optional) string
99              
100             =cut
101              
102             sub name{
103 0     0 1   my ($self,@args) = @_;
104 0           $self->throw_not_implemented();
105             }
106              
107             =head2 token
108              
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
115              
116             =cut
117              
118             sub token{
119 0     0 1   my ($self,@args) = @_;
120 0           $self->throw_not_implemented();
121             }
122              
123             =head2 symbols
124              
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
131              
132              
133             =cut
134              
135             sub symbols{
136 0     0 1   my ($self,@args) = @_;
137 0           $self->throw_not_implemented();
138             }
139              
140             =head2 matches
141              
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
150              
151             =cut
152              
153             sub matches{
154 0     0 1   my ($self,@args) = @_;
155 0           $self->throw_not_implemented();
156             }
157              
158             =head2 equals
159              
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
165              
166             =cut
167              
168             sub equals{
169 0     0 1   my ($self,@args) = @_;
170 0           $self->throw_not_implemented();
171             }
172              
173             1;