0
|
1 # $Id: RelationshipI.pm,v 1.2.2.2 2003/03/27 10:07:56 lapp Exp $
|
|
2 #
|
|
3 # BioPerl module for RelationshipI
|
|
4 #
|
|
5 # Cared for by Peter Dimitrov <dimitrov@gnf.org>
|
|
6 #
|
|
7 # (c) Peter Dimitrov
|
|
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 =head1 NAME
|
|
24
|
|
25 RelationshipI - Interface for a relationship between ontology terms
|
|
26
|
|
27 =head1 SYNOPSIS
|
|
28
|
|
29 # see documentation of methods and an implementation, e.g.,
|
|
30 # Bio::Ontology::Relationship
|
|
31
|
|
32 =head1 DESCRIPTION
|
|
33
|
|
34 This is the minimal interface for a relationship between two terms in
|
|
35 an ontology. Ontology engines will use this.
|
|
36
|
|
37 The terminology we use here is the one commonly used for ontologies,
|
|
38 namely the triple of (subject, predicate, object), which in addition
|
|
39 is scoped in a namespace (ontology). It is called triple because it is
|
|
40 a tuple of three ontology terms.
|
|
41
|
|
42 There are other terminologies in use for expressing relationships. For
|
|
43 those who it helps to better understand the concept, the triple of
|
|
44 (child, relationship type, parent) would be equivalent to the
|
|
45 terminology chosen here, disregarding the question whether the notion
|
|
46 of parent and child is sensible in the context of the relationship
|
|
47 type or not. Especially in the case of ontologies with a wide variety
|
|
48 of predicates the parent/child terminology and similar ones can
|
|
49 quickly become ambiguous (e.g., A synthesises B), meaningless (e.g., A
|
|
50 binds B), or even conflicting (e.g., A is-parent-of B), and are
|
|
51 therefore strongly discouraged.
|
|
52
|
|
53 =head1 FEEDBACK
|
|
54
|
|
55 =head2 Mailing Lists
|
|
56
|
|
57 User feedback is an integral part of the evolution of this and other
|
|
58 Bioperl modules. Send your comments and suggestions preferably to
|
|
59 the Bioperl mailing list. Your participation is much appreciated.
|
|
60
|
|
61 bioperl-l@bioperl.org - General discussion
|
|
62 http://bioperl.org/MailList.shtml - About the mailing lists
|
|
63
|
|
64 =head2 Reporting Bugs
|
|
65
|
|
66 Report bugs to the Bioperl bug tracking system to help us keep track
|
|
67 of the bugs and their resolution. Bug reports can be submitted via
|
|
68 email or the web:
|
|
69
|
|
70 bioperl-bugs@bioperl.org
|
|
71 http://bugzilla.bioperl.org/
|
|
72
|
|
73 =head1 AUTHOR - Peter Dimitrov
|
|
74
|
|
75 Email dimitrov@gnf.org
|
|
76
|
|
77 =head1 CONTRIBUTORS
|
|
78
|
|
79 Hilmar Lapp, email: hlapp at gmx.net
|
|
80
|
|
81 =head1 APPENDIX
|
|
82
|
|
83 The rest of the documentation details each of the object methods.
|
|
84 Internal methods are usually preceded with a _
|
|
85
|
|
86 =cut
|
|
87
|
|
88
|
|
89 # Let the code begin...
|
|
90
|
|
91
|
|
92 package Bio::Ontology::RelationshipI;
|
|
93 use vars qw(@ISA);
|
|
94 use strict;
|
|
95 use Bio::Root::RootI;
|
|
96
|
|
97 @ISA = qw( Bio::Root::RootI );
|
|
98
|
|
99 =head2 identifier
|
|
100
|
|
101 Title : identifier
|
|
102 Usage : print $rel->identifier();
|
|
103 Function: Set/get for the identifier of this Relationship.
|
|
104
|
|
105 Note that this may not necessarily be used by a particular
|
|
106 ontology.
|
|
107
|
|
108 Returns : The identifier [scalar].
|
|
109 Args :
|
|
110
|
|
111 =cut
|
|
112
|
|
113 sub identifier{
|
|
114 shift->throw_not_implemented();
|
|
115 }
|
|
116
|
|
117 =head2 subject_term
|
|
118
|
|
119 Title : subject_term
|
|
120 Usage : $subj = $rel->subject_term();
|
|
121 Function: Set/get for the subject term of this Relationship.
|
|
122
|
|
123 The common convention for ontologies is to express
|
|
124 relationships between terms as triples (subject, predicate,
|
|
125 object).
|
|
126
|
|
127 Returns : The subject term [Bio::Ontology::TermI].
|
|
128 Args :
|
|
129
|
|
130 =cut
|
|
131
|
|
132 sub subject_term{
|
|
133 shift->throw_not_implemented();
|
|
134 }
|
|
135
|
|
136 =head2 object_term
|
|
137
|
|
138 Title : object_term
|
|
139 Usage : $object = $rel->object_term();
|
|
140 Function: Set/get for the object term of this Relationship.
|
|
141
|
|
142 The common convention for ontologies is to express
|
|
143 relationships between terms as triples (subject, predicate,
|
|
144 object).
|
|
145
|
|
146 Returns : The object term [Bio::Ontology::TermI].
|
|
147 Args :
|
|
148
|
|
149 =cut
|
|
150
|
|
151 sub object_term{
|
|
152 shift->throw_not_implemented();
|
|
153 }
|
|
154
|
|
155 =head2 predicate_term
|
|
156
|
|
157 Title : predicate_term
|
|
158 Usage : $type = $rel->predicate_term();
|
|
159 Function: Set/get for the relationship type of this relationship.
|
|
160
|
|
161 The common convention for ontologies is to express
|
|
162 relationships between terms as triples (subject, predicate,
|
|
163 object).
|
|
164
|
|
165 Returns : The relationship type [Bio::Ontology::TermI].
|
|
166 Args :
|
|
167
|
|
168 =cut
|
|
169
|
|
170 sub predicate_term{
|
|
171 shift->throw_not_implemented();
|
|
172 }
|
|
173
|
|
174 =head2 ontology
|
|
175
|
|
176 Title : ontology
|
|
177 Usage : $ont = $obj->ontology()
|
|
178 Function: Get the ontology that defined (is the scope for) this
|
|
179 relationship.
|
|
180 Example :
|
|
181 Returns : an object implementing L<Bio::Ontology::OntologyI>
|
|
182 Args :
|
|
183
|
|
184
|
|
185 =cut
|
|
186
|
|
187 sub ontology{
|
|
188 shift->throw_not_implemented();
|
|
189 }
|
|
190
|
|
191 1;
|