File Coverage

Bio/Ontology/RelationshipI.pm
Criterion Covered Total %
statement 6 11 54.5
branch n/a
condition n/a
subroutine 2 7 28.5
pod 5 5 100.0
total 13 23 56.5


line stmt bran cond sub pod time code
1             #
2             # BioPerl module for RelationshipI
3             #
4             # Please direct questions and support issues to
5             #
6             # Cared for by Peter Dimitrov
7             #
8             # (c) Peter Dimitrov
9             # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
10             #
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.
15             #
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.
19             #
20             # You may distribute this module under the same terms as perl itself
21              
22             # POD documentation - main docs before the code
23              
24             =head1 NAME
25              
26             Bio::Ontology::RelationshipI - Interface for a relationship between ontology terms
27              
28             =head1 SYNOPSIS
29              
30             # see documentation of methods and an implementation, e.g.,
31             # Bio::Ontology::Relationship
32              
33             =head1 DESCRIPTION
34              
35             This is the minimal interface for a relationship between two terms in
36             an ontology. Ontology engines will use this.
37              
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.
42              
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.
53              
54             =head1 FEEDBACK
55              
56             =head2 Mailing Lists
57              
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.
61              
62             bioperl-l@bioperl.org - General discussion
63             http://bioperl.org/wiki/Mailing_lists - About the mailing lists
64              
65             =head2 Support
66              
67             Please direct usage questions or support issues to the mailing list:
68              
69             I
70              
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.
75              
76             =head2 Reporting Bugs
77              
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
80             the web:
81              
82             https://github.com/bioperl/bioperl-live/issues
83              
84             =head1 AUTHOR - Peter Dimitrov
85              
86             Email dimitrov@gnf.org
87              
88             =head1 CONTRIBUTORS
89              
90             Hilmar Lapp, email: hlapp at gmx.net
91              
92             =head1 APPENDIX
93              
94             The rest of the documentation details each of the object methods.
95             Internal methods are usually preceded with a _
96              
97             =cut
98              
99              
100             # Let the code begin...
101              
102              
103             package Bio::Ontology::RelationshipI;
104 5     5   23 use strict;
  5         6  
  5         139  
105              
106 5     5   14 use base qw(Bio::Root::RootI);
  5         6  
  5         719  
107              
108             =head2 identifier
109              
110             Title : identifier
111             Usage : print $rel->identifier();
112             Function: Set/get for the identifier of this Relationship.
113              
114             Note that this may not necessarily be used by a particular
115             ontology.
116              
117             Returns : The identifier [scalar].
118             Args :
119              
120             =cut
121              
122             sub identifier{
123 0     0 1   shift->throw_not_implemented();
124             }
125              
126             =head2 subject_term
127              
128             Title : subject_term
129             Usage : $subj = $rel->subject_term();
130             Function: Set/get for the subject 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 subject term [Bio::Ontology::TermI].
137             Args :
138              
139             =cut
140              
141             sub subject_term{
142 0     0 1   shift->throw_not_implemented();
143             }
144              
145             =head2 object_term
146              
147             Title : object_term
148             Usage : $object = $rel->object_term();
149             Function: Set/get for the object term of this Relationship.
150              
151             The common convention for ontologies is to express
152             relationships between terms as triples (subject, predicate,
153             object).
154              
155             Returns : The object term [Bio::Ontology::TermI].
156             Args :
157              
158             =cut
159              
160             sub object_term{
161 0     0 1   shift->throw_not_implemented();
162             }
163              
164             =head2 predicate_term
165              
166             Title : predicate_term
167             Usage : $type = $rel->predicate_term();
168             Function: Set/get for the relationship type of this relationship.
169              
170             The common convention for ontologies is to express
171             relationships between terms as triples (subject, predicate,
172             object).
173              
174             Returns : The relationship type [Bio::Ontology::TermI].
175             Args :
176              
177             =cut
178              
179             sub predicate_term{
180 0     0 1   shift->throw_not_implemented();
181             }
182              
183             =head2 ontology
184              
185             Title : ontology
186             Usage : $ont = $obj->ontology()
187             Function: Get the ontology that defined (is the scope for) this
188             relationship.
189             Example :
190             Returns : an object implementing Bio::Ontology::OntologyI
191             Args :
192              
193             See L.
194              
195             =cut
196              
197             sub ontology{
198 0     0 1   shift->throw_not_implemented();
199             }
200              
201             1;