changes all issue tracking in preparation for switch to github issues
[bioperl-live.git] / Bio / Phenotype / OMIM / OMIMentryAllelicVariant.pm
blob49f74a94d6c0756f8434d542e39d25afffcda1c9
2 # BioPerl module for Bio::Phenotype::OMIM::OMIMentryAllelicVariant
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::OMIMentryAllelicVariant - Representation of a allelic
27 variant of the OMIM database
29 =head1 SYNOPSIS
31 use Bio::Phenotype::OMIM::OMIMentryAllelicVariant;
33 $av = Bio::Phenotype::OMIM::OMIMentryAllelicVariant->new( -number => ".0001",
34 -title => "ALCOHOL INTOLERANCE",
35 -symbol => "ALDH2*2",
36 -description => "The ALDH2*2-encoded ...",
37 -aa_ori => "GLU",
38 -aa_mut => "LYS",
39 -position => 487,
40 -additional_mutations => "IVS4DS, G-A, +1" );
42 =head1 DESCRIPTION
44 This class models the allelic variant of the OMIM database.
45 This class is intended to be used together with a OMIM entry class.
48 =head1 FEEDBACK
50 =head2 Mailing Lists
52 User feedback is an integral part of the evolution of this and other
53 Bioperl modules. Send your comments and suggestions preferably to one
54 of the Bioperl mailing lists. Your participation is much appreciated.
56 bioperl-l@bioperl.org - General discussion
57 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
59 =head2 Support
61 Please direct usage questions or support issues to the mailing list:
63 I<bioperl-l@bioperl.org>
65 rather than to the module maintainer directly. Many experienced and
66 reponsive experts will be able look at the problem and quickly
67 address it. Please include a thorough description of the problem
68 with code and data examples if at all possible.
70 =head2 Reporting Bugs
72 Report bugs to the Bioperl bug tracking system to help us keep track
73 the bugs and their resolution. Bug reports can be submitted via the
74 web:
76 https://github.com/bioperl/bioperl-live/issues
78 =head1 AUTHOR
80 Christian M. Zmasek
82 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
84 WWW: http://monochrome-effect.net/
86 Address:
88 Genomics Institute of the Novartis Research Foundation
89 10675 John Jay Hopkins Drive
90 San Diego, CA 92121
92 =head1 APPENDIX
94 The rest of the documentation details each of the object
95 methods.
97 =cut
100 # Let the code begin...
103 package Bio::Phenotype::OMIM::OMIMentryAllelicVariant;
104 use strict;
106 use base qw(Bio::Root::Root);
108 =head2 new
110 Title : new
111 Usage : $av = Bio::Phenotype::OMIM::OMIMentryAllelicVariant->new( -number => ".0001",
112 -title => "ALCOHOL INTOLERANCE",
113 -symbol => "ALDH2*2",
114 -description => "The ALDH2*2-encoded ...",
115 -aa_ori => "GLU",
116 -aa_mut => "LYS",
117 -position => 487,
118 -additional_mutations => "IVS4DS, G-A, +1" );
119 Function: Creates a new OMIMentryAllelicVariant object.
120 Returns : A new OMIMentryAllelicVariant object.
121 Args : -number => the OMIM allelic variant number
122 -title => the title
123 -symbol => a symbol
124 -description => a description
125 -aa_ori => the original amino acid
126 -aa_mut => the mutated amino acid
127 -position => the position of the mutation
128 -additional_mutations => free form description of additional mutations
130 =cut
132 sub new {
134 my( $class, @args ) = @_;
136 my $self = $class->SUPER::new( @args );
138 my ( $number, $title, $symbol, $desc, $ori, $mut, $pos, $am )
139 = $self->_rearrange( [ qw( NUMBER
140 TITLE
141 SYMBOL
142 DESCRIPTION
143 AA_ORI
144 AA_MUT
145 POSITION
146 ADDITIONAL_MUTATIONS ) ], @args );
148 $self->init();
150 $number && $self->number( $number );
151 $title && $self->title( $title );
152 $symbol && $self->symbol( $symbol );
153 $desc && $self->description( $desc );
154 $ori && $self->aa_ori( $ori );
155 $mut && $self->aa_mut( $mut );
156 $pos && $self->position( $pos );
157 $am && $self->additional_mutations( $am );
159 return $self;
161 } # new
166 =head2 init
168 Title : init()
169 Usage : $av->init();
170 Function: Initializes this OMIMentryAllelicVariant to all "".
171 Returns :
172 Args :
174 =cut
176 sub init {
177 my( $self ) = @_;
179 $self->number( "" );
180 $self->title( "" );
181 $self->symbol( "" );
182 $self->description( "" );
183 $self->aa_ori( "" );
184 $self->aa_mut( "" );
185 $self->position( "" );
186 $self->additional_mutations( "" );
188 } # init
193 =head2 number
195 Title : number
196 Usage : $av->number( ".0001" );
198 print $av->number();
199 Function: Set/get for the OMIM allelic variant number of this
200 OMIMentryAllelicVariant.
201 Returns : The OMIM allelic variant number.
202 Args : The OMIM allelic variant number (optional).
204 =cut
206 sub number {
207 my ( $self, $value ) = @_;
209 if ( defined $value ) {
210 $self->{ "_number" } = $value;
213 return $self->{ "_number" };
215 } # number
219 =head2 title
221 Title : title
222 Usage : $av->title( "ALCOHOL INTOLERANCE" );
224 print $av->title();
225 Function: Set/get for the title of this OMIMentryAllelicVariant.
226 Returns : The title.
227 Args : The title (optional).
229 =cut
231 sub title {
232 my ( $self, $value ) = @_;
234 if ( defined $value ) {
235 $self->{ "_title" } = $value;
238 return $self->{ "_title" };
240 } # title
245 =head2 symbol
247 Title : symbol
248 Usage : $av->symbol( "ALDH2*2" );
250 print $av->symbol();
251 Function: Set/get for the symbol of this OMIMentryAllelicVariant.
252 Returns : A symbol.
253 Args : A symbol (optional).
255 =cut
257 sub symbol {
258 my ( $self, $value ) = @_;
260 if ( defined $value ) {
261 $self->{ "_symbol" } = $value;
264 return $self->{ "_symbol" };
266 } # symbol
271 =head2 description
273 Title : description
274 Usage : $av->description( "The ALDH2*2-encoded protein has a change ..." );
276 print $av->description();
277 Function: Set/get for the description of this OMIMentryAllelicVariant.
278 Returns : A description.
279 Args : A description (optional).
281 =cut
283 sub description {
284 my ( $self, $value ) = @_;
286 if ( defined $value ) {
287 $self->{ "_description" } = $value;
290 return $self->{ "_description" };
292 } # description
297 =head2 aa_ori
299 Title : aa_ori
300 Usage : $av->aa_ori( "GLU" );
302 print $av->aa_ori();
303 Function: Set/get for the original amino acid(s).
304 Returns : The original amino acid(s).
305 Args : The original amino acid(s) (optional).
307 =cut
309 sub aa_ori {
310 my ( $self, $value ) = @_;
312 if ( defined $value ) {
313 $self->{ "_aa_ori" } = $value;
316 return $self->{ "_aa_ori" };
318 } # aa_ori
323 =head2 aa_mut
325 Title : aa_mut
326 Usage : $av->aa_mut( "LYS" );
328 print $av->aa_mut();
329 Function: Set/get for the mutated amino acid(s).
330 Returns : The mutated amino acid(s).
331 Args : The mutated amino acid(s) (optional).
333 =cut
335 sub aa_mut {
336 my ( $self, $value ) = @_;
338 if ( defined $value ) {
339 $self->{ "_aa_mut" } = $value;
342 return $self->{ "_aa_mut" };
344 } # aa_mut
349 =head2 position
351 Title : position
352 Usage : $av->position( 487 );
354 print $av->position();
355 Function: Set/get for the position of the mutation.
356 Returns : The position of the mutation.
357 Args : The position of the mutation (optional).
359 =cut
361 sub position {
362 my ( $self, $value ) = @_;
364 if ( defined $value ) {
365 $self->{ "_position" } = $value;
368 return $self->{ "_position" };
370 } # position
375 =head2 additional_mutations
377 Title : additional_mutations
378 Usage : $av->additional_mutations( "1-BP DEL, 911T" );
380 print $av->additional_mutations();
381 Function: Set/get for free form description of (additional) mutation(s).
382 Returns : description of (additional) mutation(s).
383 Args : description of (additional) mutation(s) (optional).
385 =cut
387 sub additional_mutations {
388 my ( $self, $value ) = @_;
390 if ( defined $value ) {
391 $self->{ "_additional_mutations" } = $value;
394 return $self->{ "_additional_mutations" };
396 } # additional_mutations
400 =head2 to_string
402 Title : to_string()
403 Usage : print $av->to_string();
404 Function: To string method for OMIMentryAllelicVariant objects.
405 Returns : A string representations of this OMIMentryAllelicVariant.
406 Args :
408 =cut
410 sub to_string {
411 my( $self ) = @_;
413 my $s = "";
415 $s .= "-- Number:\n";
416 $s .= $self->number()."\n";
417 $s .= "-- Title:\n";
418 $s .= $self->title()."\n";
419 $s .= "-- Symbol:\n";
420 $s .= $self->symbol()."\n";
421 $s .= "-- Description:\n";
422 $s .= $self->description()."\n";
423 $s .= "-- Original AA(s):\n";
424 $s .= $self->aa_ori()."\n";
425 $s .= "-- Mutated AA(s):\n";
426 $s .= $self->aa_mut()."\n";
427 $s .= "-- Position:\n";
428 $s .= $self->position()."\n";
429 $s .= "-- Additional Mutation(s):\n";
430 $s .= $self->additional_mutations();
432 return $s;
434 } # to_string