3 # BioPerl module for PathI
5 # Cared for by Hilmar Lapp <hlapp at gmx.net>
7 # (c) Hilmar Lapp, hlapp at gmx.net, 2003.
8 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2003.
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.
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.
19 # You may distribute this module under the same terms as perl itself
21 # POD documentation - main docs before the code
25 Bio::Ontology::PathI - Interface for a path between ontology terms
29 # see documentation of methods and an implementation, e.g.,
34 This is the minimal interface for a path between two terms in
35 an ontology. Ontology engines may use this.
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).
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.
50 bioperl-l@bioperl.org - General discussion
51 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
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
59 http://bugzilla.open-bio.org/
61 =head1 AUTHOR - Hilmar Lapp
63 Email hlapp at gmx.net
67 The rest of the documentation details each of the object methods.
68 Internal methods are usually preceded with a _
73 # Let the code begin...
76 package Bio
::Ontology
::PathI
;
79 use base
qw(Bio::Ontology::RelationshipI);
85 Usage : $obj->distance($newval)
86 Function: Get (and set if the implementation allows it) the distance
87 between the two terms connected by this path.
90 Returns : value of distance (a scalar)
91 Args : on set, new value (a scalar or undef, optional)
96 return shift->throw_not_implemented();
99 =head1 Bio::Ontology::RelationshipI Methods
106 Usage : $subj = $rel->subject_term();
107 Function: Set/get for the subject term of this Relationship.
109 The common convention for ontologies is to express
110 relationships between terms as triples (subject, predicate,
113 Returns : The subject term [Bio::Ontology::TermI].
121 Usage : $object = $rel->object_term();
122 Function: Set/get for the object term of this Relationship.
124 The common convention for ontologies is to express
125 relationships between terms as triples (subject, predicate,
128 Returns : The object term [Bio::Ontology::TermI].
133 =head2 predicate_term
135 Title : predicate_term
136 Usage : $type = $rel->predicate_term();
137 Function: Set/get for the predicate of this relationship.
139 For a path the predicate (relationship type) is defined as
140 the greatest common denominator of all predicates
141 (relationship types) encountered along the path. I.e., if
142 predicate A is-a predicate B, the greatest common
143 denominator for a path containing both predicates A and B is B
145 Returns : The predicate term [Bio::Ontology::TermI].
153 Usage : $ont = $obj->ontology()
154 Function: Get the ontology that defined this relationship.
156 Returns : an object implementing Bio::Ontology::OntologyI
159 See L<Bio::Ontology::OntologyI>.