Bio::DB::TFBS namespace has been moved to its own distribution named after itself
[bioperl-live.git] / Bio / Phenotype / OMIM / MiniMIMentry.pm
blob995603f800c076b43d2f27ddb07f69ad22518662
2 # BioPerl module for Bio::Phenotype::OMIM::MiniMIMentry
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Christian M. Zmasek <czmasek-at-burnham.org> or <cmzmasek@yahoo.com>
8 # (c) Christian M. Zmasek, czmasek-at-burnham.org, 2002.
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
24 =head1 NAME
26 Bio::Phenotype::OMIM::MiniMIMentry - Representation of a Mini MIM entry
28 =head1 SYNOPSIS
30 use Bio::Phenotype::OMIM::MiniMIMentry;
32 $mm = Bio::Phenotype::OMIM::MiniMIMentry->new( -description => "The central form of ...",
33 -created => "Victor A. McKusick: 6/4/1986",
34 -contributors => "Kelly A. Przylepa - revised: 03/18/2002",
35 -edited => "alopez: 06/03/1997" );
38 =head1 DESCRIPTION
40 This class representats of Mini MIM entries.
41 This class is intended to be used together with a OMIM entry class.
44 =head1 FEEDBACK
46 =head2 Mailing Lists
48 User feedback is an integral part of the evolution of this and other
49 Bioperl modules. Send your comments and suggestions preferably to one
50 of the Bioperl mailing lists. Your participation is much appreciated.
52 bioperl-l@bioperl.org - General discussion
53 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
55 =head2 Support
57 Please direct usage questions or support issues to the mailing list:
59 I<bioperl-l@bioperl.org>
61 rather than to the module maintainer directly. Many experienced and
62 reponsive experts will be able look at the problem and quickly
63 address it. Please include a thorough description of the problem
64 with code and data examples if at all possible.
66 =head2 Reporting Bugs
68 Report bugs to the Bioperl bug tracking system to help us keep track
69 the bugs and their resolution. Bug reports can be submitted via the
70 web:
72 https://github.com/bioperl/bioperl-live/issues
74 =head1 AUTHOR
76 Christian M. Zmasek
78 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
80 WWW: http://monochrome-effect.net/
82 Address:
84 Genomics Institute of the Novartis Research Foundation
85 10675 John Jay Hopkins Drive
86 San Diego, CA 92121
88 =head1 APPENDIX
90 The rest of the documentation details each of the object
91 methods.
93 =cut
96 # Let the code begin...
98 package Bio::Phenotype::OMIM::MiniMIMentry;
99 use strict;
101 use base qw(Bio::Root::Root);
103 =head2 new
105 Title : new
106 Usage : $mm = Bio::Phenotype::OMIM::MiniMIMentry->new( -description => "The central form of ...",
107 -created => "Victor A. McKusick: 6/4/1986",
108 -contributors => "Kelly A. Przylepa - revised: 03/18/2002",
109 -edited => "alopez: 06/03/1997" );
111 Function: Creates a new MiniMIMentry object.
112 Returns : A new MiniMIMentry object.
113 Args : -description => a description
114 -created => name(s) and date(s) (free form)
115 -contributors => name(s) and date(s) (free form)
116 -edited => name(s) and date(s) (free form)
118 =cut
120 sub new {
122 my( $class, @args ) = @_;
124 my $self = $class->SUPER::new( @args );
126 my ( $desc, $created, $contributors, $edited )
127 = $self->_rearrange( [ qw( DESCRIPTION
128 CREATED
129 CONTRIBUTORS
130 EDITED ) ], @args );
132 $self->init();
134 $desc && $self->description( $desc );
135 $created && $self->created( $created );
136 $contributors && $self->contributors( $contributors );
137 $edited && $self->edited( $edited );
139 return $self;
141 } # new
146 =head2 init
148 Title : init()
149 Usage : $mm->init();
150 Function: Initializes this MiniMIMentry to all "".
151 Returns :
152 Args :
154 =cut
156 sub init {
158 my( $self ) = @_;
160 $self->description( "" );
161 $self->created( "" );
162 $self->contributors( "" );
163 $self->edited( "" );
166 } # init
171 =head2 description
173 Title : description
174 Usage : $mm->description( "The central form of ..." );
176 print $mm->description();
177 Function: Set/get for the description field of the Mini MIM database.
178 Returns : The description.
179 Args : The description (optional).
181 =cut
183 sub description {
184 my ( $self, $value ) = @_;
186 if ( defined $value ) {
187 $self->{ "_description" } = $value;
190 return $self->{ "_description" };
192 } # description
197 =head2 created
199 Title : created
200 Usage : $mm->created( "Victor A. McKusick: 6/4/1986" );
202 print $mm->created();
203 Function: Set/get for the created field of the Mini MIM database.
204 Returns : Name(s) and date(s) [scalar - free form].
205 Args : Name(s) and date(s) [scalar - free form] (optional).
207 =cut
209 sub created {
210 my ( $self, $value ) = @_;
212 if ( defined $value ) {
213 $self->{ "_created" } = $value;
216 return $self->{ "_created" };
218 } # created
223 =head2 contributors
225 Title : contributors
226 Usage : $mm->contributors( "Kelly A. Przylepa - revised: 03/18/2002" );
228 print $mm->contributors();
229 Function: Set/get for the contributors field of the Mini MIM database.
230 Returns : Name(s) and date(s) [scalar - free form].
231 Args : Name(s) and date(s) [scalar - free form] (optional).
233 =cut
235 sub contributors {
236 my ( $self, $value ) = @_;
238 if ( defined $value ) {
239 $self->{ "_contributors" } = $value;
242 return $self->{ "_contributors" };
244 } # contributors
249 =head2 edited
251 Title : edited
252 Usage : $mm->edited( "alopez: 06/03/1997" );
254 print $mm->edited();
255 Function: Set/get for the edited field of the Mini MIM database.
256 Returns : Name(s) and date(s) [scalar - free form].
257 Args : Name(s) and date(s) [scalar - free form] (optional).
259 =cut
261 sub edited {
262 my ( $self, $value ) = @_;
264 if ( defined $value ) {
265 $self->{ "_edited" } = $value;
268 return $self->{ "_edited" };
270 } # edited
275 =head2 to_string
277 Title : to_string()
278 Usage : print $mm->to_string();
279 Function: To string method for MiniMIMentry objects.
280 Returns : A string representations of this MiniMIMentry.
281 Args :
283 =cut
285 sub to_string {
286 my ( $self ) = @_;
288 my $s = "";
290 $s .= "-- Description:\n";
291 $s .= $self->description()."\n";
292 $s .= "-- Created:\n";
293 $s .= $self->created()."\n";
294 $s .= "-- Contributors:\n";
295 $s .= $self->contributors()."\n";
296 $s .= "-- Edited:\n";
297 $s .= $self->edited();
299 return $s;
301 } # to_string