2 # BioPerl module for PathI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Hilmar Lapp <hlapp at gmx.net>
8 # (c) Hilmar Lapp, hlapp at gmx.net, 2003.
9 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2003.
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::PathI - Interface for a path between ontology terms
30 # see documentation of methods and an implementation, e.g.,
35 This is the minimal interface for a path between two terms in
36 an ontology. Ontology engines may use this.
38 Essentially this is a very thin extension of the
39 L<Bio::Ontology::RelationshipI> interface. It basically adds an
40 attribute distance(). For a RelationshipI, you can think of distance as
41 equal to zero (subject == object) or 1 (subject != object).
47 User feedback is an integral part of the evolution of this and other
48 Bioperl modules. Send your comments and suggestions preferably to
49 the Bioperl mailing list. Your participation is much appreciated.
51 bioperl-l@bioperl.org - General discussion
52 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
56 Please direct usage questions or support issues to the mailing list:
58 I<bioperl-l@bioperl.org>
60 rather than to the module maintainer directly. Many experienced and
61 reponsive experts will be able look at the problem and quickly
62 address it. Please include a thorough description of the problem
63 with code and data examples if at all possible.
67 Report bugs to the Bioperl bug tracking system to help us keep track
68 of the bugs and their resolution. Bug reports can be submitted via
71 https://github.com/bioperl/bioperl-live/issues
73 =head1 AUTHOR - Hilmar Lapp
75 Email hlapp at gmx.net
79 The rest of the documentation details each of the object methods.
80 Internal methods are usually preceded with a _
85 # Let the code begin...
88 package Bio
::Ontology
::PathI
;
91 use base
qw(Bio::Ontology::RelationshipI);
97 Usage : $obj->distance($newval)
98 Function: Get (and set if the implementation allows it) the distance
99 between the two terms connected by this path.
102 Returns : value of distance (a scalar)
103 Args : on set, new value (a scalar or undef, optional)
108 return shift->throw_not_implemented();
111 =head1 Bio::Ontology::RelationshipI Methods
118 Usage : $subj = $rel->subject_term();
119 Function: Set/get for the subject term of this Relationship.
121 The common convention for ontologies is to express
122 relationships between terms as triples (subject, predicate,
125 Returns : The subject term [Bio::Ontology::TermI].
133 Usage : $object = $rel->object_term();
134 Function: Set/get for the object term of this Relationship.
136 The common convention for ontologies is to express
137 relationships between terms as triples (subject, predicate,
140 Returns : The object term [Bio::Ontology::TermI].
145 =head2 predicate_term
147 Title : predicate_term
148 Usage : $type = $rel->predicate_term();
149 Function: Set/get for the predicate of this relationship.
151 For a path the predicate (relationship type) is defined as
152 the greatest common denominator of all predicates
153 (relationship types) encountered along the path. I.e., if
154 predicate A is-a predicate B, the greatest common
155 denominator for a path containing both predicates A and B is B
157 Returns : The predicate term [Bio::Ontology::TermI].
165 Usage : $ont = $obj->ontology()
166 Function: Get the ontology that defined this relationship.
168 Returns : an object implementing Bio::Ontology::OntologyI
171 See L<Bio::Ontology::OntologyI>.