Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Ontology/PathI.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: PathI.pm,v 1.1.2.2 2003/03/27 10:07:56 lapp Exp $ | |
2 # | |
3 # BioPerl module for PathI | |
4 # | |
5 # Cared for by Hilmar Lapp <hlapp at gmx.net> | |
6 # | |
7 # (c) Hilmar Lapp, hlapp at gmx.net, 2003. | |
8 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2003. | |
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 =head1 NAME | |
24 | |
25 PathI - Interface for a path between ontology terms | |
26 | |
27 =head1 SYNOPSIS | |
28 | |
29 # see documentation of methods and an implementation, e.g., | |
30 # Bio::Ontology::Path | |
31 | |
32 =head1 DESCRIPTION | |
33 | |
34 This is the minimal interface for a path between two terms in | |
35 an ontology. Ontology engines may use this. | |
36 | |
37 Essentially this is a very thin extension of the | |
38 L<Bio::Ontology::RelationshipI> interface. It basically adds an | |
39 attribute distance(). For a RelationshipI, you can think of distance as | |
40 equal to zero (subject == object) or 1 (subject != object). | |
41 | |
42 =head1 FEEDBACK | |
43 | |
44 =head2 Mailing Lists | |
45 | |
46 User feedback is an integral part of the evolution of this and other | |
47 Bioperl modules. Send your comments and suggestions preferably to | |
48 the Bioperl mailing list. Your participation is much appreciated. | |
49 | |
50 bioperl-l@bioperl.org - General discussion | |
51 http://bioperl.org/MailList.shtml - About the mailing lists | |
52 | |
53 =head2 Reporting Bugs | |
54 | |
55 Report bugs to the Bioperl bug tracking system to help us keep track | |
56 of the bugs and their resolution. Bug reports can be submitted via | |
57 email or the web: | |
58 | |
59 bioperl-bugs@bioperl.org | |
60 http://bugzilla.bioperl.org/ | |
61 | |
62 =head1 AUTHOR - Hilmar Lapp | |
63 | |
64 Email hlapp at gmx.net | |
65 | |
66 =head1 CONTRIBUTORS | |
67 | |
68 Additional contributors names and emails here | |
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 | |
78 # Let the code begin... | |
79 | |
80 | |
81 package Bio::Ontology::PathI; | |
82 use vars qw(@ISA); | |
83 use strict; | |
84 use Bio::Ontology::RelationshipI; | |
85 | |
86 @ISA = qw( Bio::Ontology::RelationshipI ); | |
87 | |
88 | |
89 =head2 distance | |
90 | |
91 Title : distance | |
92 Usage : $obj->distance($newval) | |
93 Function: Get (and set if the implementation allows it) the distance | |
94 between the two terms connected by this path. | |
95 | |
96 Example : | |
97 Returns : value of distance (a scalar) | |
98 Args : on set, new value (a scalar or undef, optional) | |
99 | |
100 | |
101 =cut | |
102 | |
103 sub distance{ | |
104 return shift->throw_not_implemented(); | |
105 } | |
106 | |
107 =head1 Bio::Ontology::RelationshipI Methods | |
108 | |
109 =cut | |
110 | |
111 =head2 subject_term | |
112 | |
113 Title : subject_term | |
114 Usage : $subj = $rel->subject_term(); | |
115 Function: Set/get for the subject term of this Relationship. | |
116 | |
117 The common convention for ontologies is to express | |
118 relationships between terms as triples (subject, predicate, | |
119 object). | |
120 | |
121 Returns : The subject term [Bio::Ontology::TermI]. | |
122 Args : | |
123 | |
124 =cut | |
125 | |
126 =head2 object_term | |
127 | |
128 Title : object_term | |
129 Usage : $object = $rel->object_term(); | |
130 Function: Set/get for the object term of this Relationship. | |
131 | |
132 The common convention for ontologies is to express | |
133 relationships between terms as triples (subject, predicate, | |
134 object). | |
135 | |
136 Returns : The object term [Bio::Ontology::TermI]. | |
137 Args : | |
138 | |
139 =cut | |
140 | |
141 =head2 predicate_term | |
142 | |
143 Title : predicate_term | |
144 Usage : $type = $rel->predicate_term(); | |
145 Function: Set/get for the predicate of this relationship. | |
146 | |
147 For a path the predicate (relationship type) is defined as | |
148 the greatest common denominator of all predicates | |
149 (relationship types) encountered along the path. I.e., if | |
150 predicate A is-a predicate B, the greatest common | |
151 denominator for a path containing both predicates A and B is B | |
152 | |
153 Returns : The predicate term [Bio::Ontology::TermI]. | |
154 Args : | |
155 | |
156 =cut | |
157 | |
158 =head2 ontology | |
159 | |
160 Title : ontology | |
161 Usage : $ont = $obj->ontology() | |
162 Function: Get the ontology that defined this relationship. | |
163 Example : | |
164 Returns : an object implementing L<Bio::Ontology::OntologyI> | |
165 Args : | |
166 | |
167 | |
168 =cut | |
169 | |
170 1; |