| 1 | # | ||
| 2 | # BioPerl module for RelationshipI | ||
| 3 | # | ||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 5 | # | ||
| 6 | # Cared for by Peter Dimitrov <dimitrov@gnf.org> | ||
| 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<bioperl-l@bioperl.org> | ||
| 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 | 11 | $Bio::Ontology::RelationshipI::VERSION = '1.7.8'; | |
| 105 | 11 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 106 | |||
| 107 | 11 | ▶ | use base qw(Bio::Root::RootI); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 108 | |||
| 109 | =head2 identifier | ||
| 110 | |||
| 111 | Title : identifier | ||
| 112 | Usage : print $rel->identifier(); | ||
| 113 | Function: Set/get for the identifier of this Relationship. | ||
| 114 | |||
| 115 | Note that this may not necessarily be used by a particular | ||
| 116 | ontology. | ||
| 117 | |||
| 118 | Returns : The identifier [scalar]. | ||
| 119 | Args : | ||
| 120 | |||
| 121 | =cut | ||
| 122 | |||
| 123 | 0 | ▶ | sub identifier{ |
|
Subroutine
identifier: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 124 | 0 | shift->throw_not_implemented(); | |
| 125 | } | ||
| 126 | |||
| 127 | =head2 subject_term | ||
| 128 | |||
| 129 | Title : subject_term | ||
| 130 | Usage : $subj = $rel->subject_term(); | ||
| 131 | Function: Set/get for the subject term of this Relationship. | ||
| 132 | |||
| 133 | The common convention for ontologies is to express | ||
| 134 | relationships between terms as triples (subject, predicate, | ||
| 135 | object). | ||
| 136 | |||
| 137 | Returns : The subject term [Bio::Ontology::TermI]. | ||
| 138 | Args : | ||
| 139 | |||
| 140 | =cut | ||
| 141 | |||
| 142 | 0 | ▶ | sub subject_term{ |
|
Subroutine
subject_term: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 143 | 0 | shift->throw_not_implemented(); | |
| 144 | } | ||
| 145 | |||
| 146 | =head2 object_term | ||
| 147 | |||
| 148 | Title : object_term | ||
| 149 | Usage : $object = $rel->object_term(); | ||
| 150 | Function: Set/get for the object term of this Relationship. | ||
| 151 | |||
| 152 | The common convention for ontologies is to express | ||
| 153 | relationships between terms as triples (subject, predicate, | ||
| 154 | object). | ||
| 155 | |||
| 156 | Returns : The object term [Bio::Ontology::TermI]. | ||
| 157 | Args : | ||
| 158 | |||
| 159 | =cut | ||
| 160 | |||
| 161 | 0 | ▶ | sub object_term{ |
|
Subroutine
object_term: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 162 | 0 | shift->throw_not_implemented(); | |
| 163 | } | ||
| 164 | |||
| 165 | =head2 predicate_term | ||
| 166 | |||
| 167 | Title : predicate_term | ||
| 168 | Usage : $type = $rel->predicate_term(); | ||
| 169 | Function: Set/get for the relationship type of this relationship. | ||
| 170 | |||
| 171 | The common convention for ontologies is to express | ||
| 172 | relationships between terms as triples (subject, predicate, | ||
| 173 | object). | ||
| 174 | |||
| 175 | Returns : The relationship type [Bio::Ontology::TermI]. | ||
| 176 | Args : | ||
| 177 | |||
| 178 | =cut | ||
| 179 | |||
| 180 | 0 | ▶ | sub predicate_term{ |
|
Subroutine
predicate_term: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 181 | 0 | shift->throw_not_implemented(); | |
| 182 | } | ||
| 183 | |||
| 184 | =head2 ontology | ||
| 185 | |||
| 186 | Title : ontology | ||
| 187 | Usage : $ont = $obj->ontology() | ||
| 188 | Function: Get the ontology that defined (is the scope for) this | ||
| 189 | relationship. | ||
| 190 | Example : | ||
| 191 | Returns : an object implementing Bio::Ontology::OntologyI | ||
| 192 | Args : | ||
| 193 | |||
| 194 | See L<Bio::Ontology::OntologyI>. | ||
| 195 | |||
| 196 | =cut | ||
| 197 | |||
| 198 | 0 | ▶ | sub ontology{ |
|
Subroutine
ontology: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 199 | 0 | shift->throw_not_implemented(); | |
| 200 | } | ||
| 201 | |||
| 202 | 11 | 1; | |