Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Symbol/SymbolI.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1f6dce3d34e0 |
---|---|
1 # $Id: SymbolI.pm,v 1.6 2002/10/22 07:45:21 lapp Exp $ | |
2 # | |
3 # BioPerl module for Bio::Symbol::SymbolI | |
4 # | |
5 # Cared for by Jason Stajich <jason@bioperl.org> | |
6 # | |
7 # Copyright Jason Stajich | |
8 # | |
9 # You may distribute this module under the same terms as perl itself | |
10 | |
11 # POD documentation - main docs before the code | |
12 | |
13 =head1 NAME | |
14 | |
15 Bio::Symbol::SymbolI - Interface for a Symbol | |
16 | |
17 =head1 SYNOPSIS | |
18 | |
19 # get a Bio::Symbol::SymbolI object somehow | |
20 | |
21 my ($name,$token) = ($symbol->name, $symbol->token); | |
22 my @symbols = $symbol->symbols; | |
23 my $matches = $symbol->matches; | |
24 | |
25 =head1 DESCRIPTION | |
26 | |
27 Symbol represents a single token in the sequence. Symbol can have | |
28 multiple synonyms or matches within the same Alphabet, which | |
29 makes possible to represent ambiguity codes and gaps. | |
30 | |
31 Symbols can be also composed from ordered list other symbols. For | |
32 example, codons can be represented by single Symbol using a | |
33 compound Alphabet made from three DNA Alphabets. | |
34 | |
35 This module was implemented for the purposes of meeting the | |
36 BSANE/BioCORBA spec 0.3 only. | |
37 | |
38 =head1 FEEDBACK | |
39 | |
40 =head2 Mailing Lists | |
41 | |
42 User feedback is an integral part of the evolution of this and other | |
43 Bioperl modules. Send your comments and suggestions preferably to | |
44 the Bioperl mailing list. Your participation is much appreciated. | |
45 | |
46 bioperl-l@bioperl.org - General discussion | |
47 http://bioperl.org/MailList.shtml - About the mailing lists | |
48 | |
49 =head2 Reporting Bugs | |
50 | |
51 Report bugs to the Bioperl bug tracking system to help us keep track | |
52 of the bugs and their resolution. Bug reports can be submitted via | |
53 email or the web: | |
54 | |
55 bioperl-bugs@bioperl.org | |
56 http://bugzilla.bioperl.org/ | |
57 | |
58 =head1 AUTHOR - Jason Stajich | |
59 | |
60 Email jason@bioperl.org | |
61 | |
62 =head1 CONTRIBUTORS | |
63 | |
64 Additional contributors names and emails here | |
65 | |
66 =head1 APPENDIX | |
67 | |
68 The rest of the documentation details each of the object methods. | |
69 Internal methods are usually preceded with a _ | |
70 | |
71 =cut | |
72 | |
73 | |
74 # Let the code begin... | |
75 | |
76 | |
77 package Bio::Symbol::SymbolI; | |
78 use strict; | |
79 use Bio::Root::RootI; | |
80 use vars qw(@ISA); | |
81 @ISA = qw(Bio::Root::RootI); | |
82 | |
83 =head2 Bio::Symbol::SymbolI interface methods | |
84 | |
85 =cut | |
86 | |
87 =head2 name | |
88 | |
89 Title : name | |
90 Usage : my $name = $symbol->name(); | |
91 Function: Get/Set Descriptive name for Symbol | |
92 Returns : string | |
93 Args : (optional) string | |
94 | |
95 =cut | |
96 | |
97 sub name{ | |
98 my ($self,@args) = @_; | |
99 $self->throw_not_implemented(); | |
100 } | |
101 | |
102 =head2 token | |
103 | |
104 Title : token | |
105 Usage : my $token = $self->token(); | |
106 Function: Get/Set token for this symbol | |
107 Example : Letter A,C,G,or T for a DNA alphabet Symbol | |
108 Returns : string | |
109 Args : (optional) string | |
110 | |
111 =cut | |
112 | |
113 sub token{ | |
114 my ($self,@args) = @_; | |
115 $self->throw_not_implemented(); | |
116 } | |
117 | |
118 =head2 symbols | |
119 | |
120 Title : symbols | |
121 Usage : my @symbols = $self->symbols(); | |
122 Function: Get/Set Symbols this Symbol is composed from | |
123 Example : A codon is composed of 3 DNA symbols | |
124 Returns : Array of Bio::Symbol::SymbolI objects | |
125 Args : (optional) Array of Bio::Symbol::SymbolI objects | |
126 | |
127 | |
128 =cut | |
129 | |
130 sub symbols{ | |
131 my ($self,@args) = @_; | |
132 $self->throw_not_implemented(); | |
133 } | |
134 | |
135 =head2 matches | |
136 | |
137 Title : matches | |
138 Usage : my $matchalphabet = $symbol->matches(); | |
139 Function: Get/Set (Sub) alphabet of symbols matched by this symbol | |
140 including the symbol itself (i.e. if symbol is DNA | |
141 ambiguity code W then the matches contains symbols for W | |
142 and T) | |
143 Returns : Bio::Symbol::AlphabetI | |
144 Args : (optional) Bio::Symbol::AlphabetI | |
145 | |
146 =cut | |
147 | |
148 sub matches{ | |
149 my ($self,@args) = @_; | |
150 $self->throw_not_implemented(); | |
151 } | |
152 | |
153 =head2 equals | |
154 | |
155 Title : equals | |
156 Usage : if( $symbol->equals($symbol2) ) { } | |
157 Function: Tests if a symbol is equal to another | |
158 Returns : Boolean | |
159 Args : Bio::Symbol::SymbolI | |
160 | |
161 =cut | |
162 | |
163 sub equals{ | |
164 my ($self,@args) = @_; | |
165 $self->throw_not_implemented(); | |
166 } | |
167 | |
168 1; |