2 # BioPerl module for RelationshipI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Peter Dimitrov <dimitrov@gnf.org>
9 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
11 # You may distribute this module under the same terms as perl itself.
12 # Refer to the Perl Artistic License (see the license accompanying this
13 # software package, or see http://www.perl.com/language/misc/Artistic.html)
14 # for the terms under which you may use, modify, and redistribute this module.
16 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 # You may distribute this module under the same terms as perl itself
22 # POD documentation - main docs before the code
26 Bio::Ontology::RelationshipI - Interface for a relationship between ontology terms
30 # see documentation of methods and an implementation, e.g.,
31 # Bio::Ontology::Relationship
35 This is the minimal interface for a relationship between two terms in
36 an ontology. Ontology engines will use this.
38 The terminology we use here is the one commonly used for ontologies,
39 namely the triple of (subject, predicate, object), which in addition
40 is scoped in a namespace (ontology). It is called triple because it is
41 a tuple of three ontology terms.
43 There are other terminologies in use for expressing relationships. For
44 those who it helps to better understand the concept, the triple of
45 (child, relationship type, parent) would be equivalent to the
46 terminology chosen here, disregarding the question whether the notion
47 of parent and child is sensible in the context of the relationship
48 type or not. Especially in the case of ontologies with a wide variety
49 of predicates the parent/child terminology and similar ones can
50 quickly become ambiguous (e.g., A synthesises B), meaningless (e.g., A
51 binds B), or even conflicting (e.g., A is-parent-of B), and are
52 therefore strongly discouraged.
58 User feedback is an integral part of the evolution of this and other
59 Bioperl modules. Send your comments and suggestions preferably to
60 the Bioperl mailing list. Your participation is much appreciated.
62 bioperl-l@bioperl.org - General discussion
63 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
67 Please direct usage questions or support issues to the mailing list:
69 I<bioperl-l@bioperl.org>
71 rather than to the module maintainer directly. Many experienced and
72 reponsive experts will be able look at the problem and quickly
73 address it. Please include a thorough description of the problem
74 with code and data examples if at all possible.
78 Report bugs to the Bioperl bug tracking system to help us keep track
79 of the bugs and their resolution. Bug reports can be submitted via
82 https://github.com/bioperl/bioperl-live/issues
84 =head1 AUTHOR - Peter Dimitrov
86 Email dimitrov@gnf.org
90 Hilmar Lapp, email: hlapp at gmx.net
94 The rest of the documentation details each of the object methods.
95 Internal methods are usually preceded with a _
100 # Let the code begin...
103 package Bio
::Ontology
::RelationshipI
;
106 use base
qw(Bio::Root::RootI);
111 Usage : print $rel->identifier();
112 Function: Set/get for the identifier of this Relationship.
114 Note that this may not necessarily be used by a particular
117 Returns : The identifier [scalar].
123 shift->throw_not_implemented();
129 Usage : $subj = $rel->subject_term();
130 Function: Set/get for the subject term of this Relationship.
132 The common convention for ontologies is to express
133 relationships between terms as triples (subject, predicate,
136 Returns : The subject term [Bio::Ontology::TermI].
142 shift->throw_not_implemented();
148 Usage : $object = $rel->object_term();
149 Function: Set/get for the object term of this Relationship.
151 The common convention for ontologies is to express
152 relationships between terms as triples (subject, predicate,
155 Returns : The object term [Bio::Ontology::TermI].
161 shift->throw_not_implemented();
164 =head2 predicate_term
166 Title : predicate_term
167 Usage : $type = $rel->predicate_term();
168 Function: Set/get for the relationship type of this relationship.
170 The common convention for ontologies is to express
171 relationships between terms as triples (subject, predicate,
174 Returns : The relationship type [Bio::Ontology::TermI].
180 shift->throw_not_implemented();
186 Usage : $ont = $obj->ontology()
187 Function: Get the ontology that defined (is the scope for) this
190 Returns : an object implementing Bio::Ontology::OntologyI
193 See L<Bio::Ontology::OntologyI>.
198 shift->throw_not_implemented();