Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Ontology/TermI.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: TermI.pm,v 1.8.2.3 2003/05/27 22:00:52 lapp Exp $ | |
2 # | |
3 # BioPerl module for Bio::Ontology::Term | |
4 # | |
5 # Cared for by Christian M. Zmasek <czmasek@gnf.org> or <cmzmasek@yahoo.com> | |
6 # | |
7 # (c) Christian M. Zmasek, czmasek@gnf.org, 2002. | |
8 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002. | |
9 # | |
10 # You may distribute this module under the same terms as perl itself. | |
11 # Refer to the Perl Artistic License (see the license accompanying this | |
12 # software package, or see http://www.perl.com/language/misc/Artistic.html) | |
13 # for the terms under which you may use, modify, and redistribute this module. | |
14 # | |
15 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED | |
16 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
17 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
18 # | |
19 # You may distribute this module under the same terms as perl itself | |
20 | |
21 # POD documentation - main docs before the code | |
22 | |
23 | |
24 =head1 NAME | |
25 | |
26 TermI - interface for ontology terms | |
27 | |
28 =head1 SYNOPSIS | |
29 | |
30 #get Bio::Ontology::TermI somehow. | |
31 | |
32 print $term->identifier(), "\n"; | |
33 print $term->name(), "\n"; | |
34 print $term->definition(), "\n"; | |
35 print $term->is_obsolete(), "\n"; | |
36 print $term->comment(), "\n"; | |
37 | |
38 foreach my $synonym ( $term->get_synonyms() ) { | |
39 print $synonym, "\n"; | |
40 } | |
41 | |
42 | |
43 =head1 DESCRIPTION | |
44 | |
45 This is "dumb" interface for ontology terms providing basic methods | |
46 (it provides no functionality related to graphs). | |
47 | |
48 =head1 FEEDBACK | |
49 | |
50 =head2 Mailing Lists | |
51 | |
52 User feedback is an integral part of the evolution of this and other | |
53 Bioperl modules. Send your comments and suggestions preferably to one | |
54 of the Bioperl mailing lists. Your participation is much appreciated. | |
55 | |
56 bioperl-l@bioperl.org - General discussion | |
57 http://bio.perl.org/MailList.html - About the mailing lists | |
58 | |
59 =head2 Reporting Bugs | |
60 | |
61 Report bugs to the Bioperl bug tracking system to help us keep track | |
62 the bugs and their resolution. Bug reports can be submitted via email | |
63 or the web: | |
64 | |
65 bioperl-bugs@bio.perl.org | |
66 http://bugzilla.bioperl.org/ | |
67 | |
68 =head1 AUTHOR | |
69 | |
70 Christian M. Zmasek | |
71 | |
72 Email: czmasek@gnf.org or cmzmasek@yahoo.com | |
73 | |
74 WWW: http://www.genetics.wustl.edu/eddy/people/zmasek/ | |
75 | |
76 Address: | |
77 | |
78 Genomics Institute of the Novartis Research Foundation | |
79 10675 John Jay Hopkins Drive | |
80 San Diego, CA 92121 | |
81 | |
82 =head1 APPENDIX | |
83 | |
84 The rest of the documentation details each of the object | |
85 methods. | |
86 | |
87 =cut | |
88 | |
89 | |
90 # Let the code begin... | |
91 | |
92 package Bio::Ontology::TermI; | |
93 use vars qw( @ISA ); | |
94 use strict; | |
95 use Bio::Root::RootI; | |
96 | |
97 @ISA = qw( Bio::Root::RootI ); | |
98 | |
99 | |
100 | |
101 =head2 identifier | |
102 | |
103 Title : identifier | |
104 Usage : $term->identifier( "0003947" ); | |
105 or | |
106 print $term->identifier(); | |
107 Function: Set/get for the identifier of this Term. | |
108 Returns : The identifier [scalar]. | |
109 Args : The identifier [scalar] (optional). | |
110 | |
111 =cut | |
112 | |
113 sub identifier { | |
114 shift->throw_not_implemented(); | |
115 } # identifier | |
116 | |
117 | |
118 | |
119 | |
120 =head2 name | |
121 | |
122 Title : name | |
123 Usage : $term->name( "N-acetylgalactosaminyltransferase" ); | |
124 or | |
125 print $term->name(); | |
126 Function: Set/get for the name of this Term. | |
127 Returns : The name [scalar]. | |
128 Args : The name [scalar] (optional). | |
129 | |
130 =cut | |
131 | |
132 sub name { | |
133 shift->throw_not_implemented(); | |
134 } # name | |
135 | |
136 | |
137 | |
138 | |
139 | |
140 =head2 definition | |
141 | |
142 Title : definition | |
143 Usage : $term->definition( "Catalysis of ..." ); | |
144 or | |
145 print $term->definition(); | |
146 Function: Set/get for the definition of this Term. | |
147 Returns : The definition [scalar]. | |
148 Args : The definition [scalar] (optional). | |
149 | |
150 =cut | |
151 | |
152 sub definition { | |
153 shift->throw_not_implemented(); | |
154 } # definition | |
155 | |
156 | |
157 | |
158 =head2 ontology | |
159 | |
160 Title : ontology | |
161 Usage : $ont = $term->ontology(); | |
162 or | |
163 $term->ontology( $ont ); | |
164 Function: Get the ontology this term is in. | |
165 | |
166 An implementation may not permit the value of this | |
167 attribute to be changed once it is set, since that may have | |
168 serious consequences (note that with the ontology in hand | |
169 you can query for all related terms etc). | |
170 | |
171 Note for implementors: you will almost certainly have to | |
172 take special precaution in order not to create cyclical | |
173 references in memory. | |
174 | |
175 Returns : The ontology of this Term as a L<Bio::Ontology::OntologyI> | |
176 implementing object. | |
177 Args : On set, the ontology of this Term as a L<Bio::Ontology::OntologyI> | |
178 implementing object or a string representing its name. | |
179 | |
180 =cut | |
181 | |
182 sub ontology { | |
183 shift->throw_not_implemented(); | |
184 } # ontology | |
185 | |
186 | |
187 | |
188 =head2 version | |
189 | |
190 Title : version | |
191 Usage : $term->version( "1.00" ); | |
192 or | |
193 print $term->version(); | |
194 Function: Set/get for version information. | |
195 Returns : The version [scalar]. | |
196 Args : The version [scalar] (optional). | |
197 | |
198 =cut | |
199 | |
200 sub version { | |
201 shift->throw_not_implemented(); | |
202 } # version | |
203 | |
204 | |
205 | |
206 | |
207 =head2 is_obsolete | |
208 | |
209 Title : is_obsolete | |
210 Usage : $term->is_obsolete( 1 ); | |
211 or | |
212 if ( $term->is_obsolete() ) | |
213 Function: Set/get for the obsoleteness of this Term. | |
214 Returns : the obsoleteness [0 or 1]. | |
215 Args : the obsoleteness [0 or 1] (optional). | |
216 | |
217 =cut | |
218 | |
219 sub is_obsolete { | |
220 shift->throw_not_implemented(); | |
221 } # is_obsolete | |
222 | |
223 | |
224 | |
225 =head2 comment | |
226 | |
227 Title : comment | |
228 Usage : $term->comment( "Consider the term ..." ); | |
229 or | |
230 print $term->comment(); | |
231 Function: Set/get for an arbitrary comment about this Term. | |
232 Returns : A comment. | |
233 Args : A comment (optional). | |
234 | |
235 =cut | |
236 | |
237 sub comment { | |
238 shift->throw_not_implemented(); | |
239 } # comment | |
240 | |
241 | |
242 | |
243 | |
244 =head2 get_synonyms | |
245 | |
246 Title : get_synonyms | |
247 Usage : @aliases = $term->get_synonyms(); | |
248 Function: Returns a list of aliases of this Term. | |
249 | |
250 If an implementor of this interface permits modification of | |
251 this array property, the class should define at least | |
252 methods add_synonym() and remove_synonyms(), with obvious | |
253 functionality. | |
254 | |
255 Returns : A list of aliases [array of [scalar]]. | |
256 Args : | |
257 | |
258 =cut | |
259 | |
260 sub get_synonyms { | |
261 shift->throw_not_implemented(); | |
262 } # get_synonyms | |
263 | |
264 =head2 get_dblinks | |
265 | |
266 Title : get_dblinks() | |
267 Usage : @ds = $term->get_dblinks(); | |
268 Function: Returns a list of each dblink of this term. | |
269 | |
270 If an implementor of this interface permits modification of | |
271 this array property, the class should define at least | |
272 methods add_dblink() and remove_dblinks(), with obvious | |
273 functionality. | |
274 | |
275 Returns : A list of dblinks [array of [scalars]]. | |
276 Args : | |
277 | |
278 =cut | |
279 | |
280 sub get_dblinks { | |
281 shift->throw_not_implemented(); | |
282 } # get_dblinks | |
283 | |
284 =head2 get_secondary_ids | |
285 | |
286 Title : get_secondary_ids | |
287 Usage : @ids = $term->get_secondary_ids(); | |
288 Function: Returns a list of secondary identifiers of this Term. | |
289 | |
290 Secondary identifiers mostly originate from merging terms, | |
291 or possibly also from splitting terms. | |
292 | |
293 If an implementor of this interface permits modification of | |
294 this array property, the class should define at least | |
295 methods add_secondary_id() and remove_secondary_ids(), with | |
296 obvious functionality. | |
297 | |
298 Returns : A list of secondary identifiers [array of [scalar]] | |
299 Args : | |
300 | |
301 =cut | |
302 | |
303 sub get_secondary_ids { | |
304 shift->throw_not_implemented(); | |
305 } # get_secondary_ids | |
306 | |
307 | |
308 1; |