Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Symbol/AlphabetI.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: AlphabetI.pm,v 1.5 2002/10/22 07:45:21 lapp Exp $ | |
2 # | |
3 # BioPerl module for Bio::Symbol::AlphabetI | |
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::AlphabetI - A Symbol Alphabet | |
16 | |
17 =head1 SYNOPSIS | |
18 | |
19 # get a Bio::Symbol::AlphabetI object somehow | |
20 my @symbols = $alphabet->symbols; | |
21 my @subalphas = $alphabet->alphabets; | |
22 if( $alphabet->contains($symbol) ) { | |
23 # do something | |
24 } | |
25 | |
26 =head1 DESCRIPTION | |
27 | |
28 Alphabet contains set of symbols, which can be concatenated to form | |
29 symbol lists. Sequence string, for example, is stringified | |
30 representation of the symbol list (tokens of symbols). | |
31 | |
32 This module was implemented for the purposes of meeting the | |
33 BSANE/BioCORBA spec 0.3 only. | |
34 | |
35 =head1 FEEDBACK | |
36 | |
37 =head2 Mailing Lists | |
38 | |
39 User feedback is an integral part of the evolution of this and other | |
40 Bioperl modules. Send your comments and suggestions preferably to | |
41 the Bioperl mailing list. Your participation is much appreciated. | |
42 | |
43 bioperl-l@bioperl.org - General discussion | |
44 http://bioperl.org/MailList.shtml - About the mailing lists | |
45 | |
46 =head2 Reporting Bugs | |
47 | |
48 Report bugs to the Bioperl bug tracking system to help us keep track | |
49 of the bugs and their resolution. Bug reports can be submitted via | |
50 email or the web: | |
51 | |
52 bioperl-bugs@bioperl.org | |
53 http://bugzilla.bioperl.org/ | |
54 | |
55 =head1 AUTHOR - Jason Stajich | |
56 | |
57 Email jason@bioperl.org | |
58 | |
59 Describe contact details here | |
60 | |
61 =head1 CONTRIBUTORS | |
62 | |
63 Additional contributors names and emails here | |
64 | |
65 =head1 APPENDIX | |
66 | |
67 The rest of the documentation details each of the object methods. | |
68 Internal methods are usually preceded with a _ | |
69 | |
70 =cut | |
71 | |
72 # Let the code begin... | |
73 | |
74 package Bio::Symbol::AlphabetI; | |
75 use strict; | |
76 use Bio::Root::RootI; | |
77 | |
78 =head2 AlphabetI Interface methods | |
79 | |
80 =cut | |
81 | |
82 =head2 symbols | |
83 | |
84 Title : symbols | |
85 Usage : my @symbols = $alphabet->symbols(); | |
86 Function: Get/Set Symbol list for an alphabet | |
87 List of symbols, which make up this alphabet. | |
88 Returns : Array of L<Bio::Symbol::SymbolI> objects | |
89 Args : (optional) Array of L<Bio::Symbol::SymbolI> objects | |
90 | |
91 =cut | |
92 | |
93 sub symbols{ | |
94 my ($self,@args) = @_; | |
95 $self->throw_not_implemented(); | |
96 } | |
97 | |
98 =head2 alphabets | |
99 | |
100 Title : alphabets | |
101 Usage : my @alphabets = $alphabet->alphabets(); | |
102 Function: Get/Set Sub Alphabet list for an alphabet | |
103 Sub-alphabets. E.g. codons made from DNAxDNAxDNA alphabets | |
104 Returns : Array of L<Bio::Symbol::AlphabetI> objects | |
105 Args : (optional) Array of L<Bio::Symbol::AlphabetI> objects | |
106 | |
107 =cut | |
108 | |
109 sub alphabets{ | |
110 my ($self,@args) = @_; | |
111 $self->throw_not_implemented(); | |
112 } | |
113 | |
114 =head2 contains | |
115 | |
116 Title : contains | |
117 Usage : if($alphabet->contains($symbol)) { } | |
118 Function: Tests of Symbol is contained in this alphabet | |
119 Returns : Boolean | |
120 Args : L<Bio::Symbol::SymbolI> | |
121 | |
122 =cut | |
123 | |
124 sub contains{ | |
125 my ($self,@args) = @_; | |
126 $self->throw_not_implemented(); | |
127 } | |
128 | |
129 # Other methods from BSANE - not sure if we will implement here or only in | |
130 # BioCORBA implementation | |
131 | |
132 # Resolve symbols from the token string. | |
133 # SymbolList to_symbol(in string tokens) raises ( IllegalSymbolException) ; | |
134 | |
135 # Convinience method, which returns gap symbol that do not | |
136 # match with any other symbols in the alphabet. | |
137 # Symbol get_gap_symbol() raises ( DoesNotExist) ; | |
138 | |
139 | |
140 # Returns a ambiguity symbol, which represent list of | |
141 # symbols. All symbols in a list must be members of | |
142 # this alphabet otherwise IllegalSymbolException is | |
143 # thrown. | |
144 # Symbol get_ambiguity( in SymbolList symbols) raises( IllegalSymbolException); | |
145 | |
146 | |
147 # Returns a Symbol, which represents ordered list of symbols | |
148 # given as a parameter. Each symbol in the list must be member of | |
149 # different sub-alphabet in the order defined by the alphabets | |
150 # attribute. For example, codons can be represented by a compound | |
151 # Alphabet of three DNA Alphabets, in which case the get_symbol( | |
152 # SymbolList[ a,g,t]) method of the Alphabet returns Symbol for | |
153 # the codon agt.<p> | |
154 | |
155 # IllegalSymbolException is raised if members of symbols | |
156 # are not Symbols over the alphabet defined by | |
157 # get_alphabets()-method | |
158 # Symbol get_symbol(in SymbolList symbols) raises(IllegalSymbolException) ; | |
159 | |
160 1; |