tag fourth (and hopefully last) alpha
[bioperl-live.git] / branch-1-6 / Bio / Phenotype / PhenotypeI.pm
blob21af9e61c7cce5c011caa0720ff902a9fd555169
1 # $Id$
3 # BioPerl module for Bio::Phenotype::PhenotypeI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Christian M. Zmasek <czmasek-at-burnham.org> or <cmzmasek@yahoo.com>
9 # (c) Christian M. Zmasek, czmasek-at-burnham.org, 2002.
10 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
12 # You may distribute this module under the same terms as perl itself.
13 # Refer to the Perl Artistic License (see the license accompanying this
14 # software package, or see http://www.perl.com/language/misc/Artistic.html)
15 # for the terms under which you may use, modify, and redistribute this module.
17 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
18 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 # You may distribute this module under the same terms as perl itself
23 # POD documentation - main docs before the code
25 =head1 NAME
27 Bio::Phenotype::PhenotypeI - An interface for classes modeling phenotypes
29 =head1 SYNOPSIS
31 #get Bio::Phenotype::PhenotypeI somehow
33 print $phenotype->name(), "\n";
34 print $phenotype->description(), "\n";
36 my @keywords = ( "achondroplasia", "dwarfism" );
37 $phenotype->add_keywords( @keywords );
38 foreach my $keyword ( $phenotype->each_keyword() ) {
39 print $keyword, "\n";
41 $phenotype->remove_keywords();
44 foreach my $gene_symbol ( $phenotype->each_gene_symbol() ) {
45 print $gene_symbol, "\n";
48 foreach my $corr ( $phenotype->each_Correlate() ) {
49 # Do something with $corr
52 foreach my $var ( $phenotype->each_Variant() ) {
53 # Do something with $var (mutation)
56 foreach my $measure ( $phenotype->each_Measure() ) {
57 # Do something with $measure
61 =head1 DESCRIPTION
63 This superclass defines common methods for classes modelling phenotypes.
64 Bio::Phenotype::OMIM::OMIMentry is an example of an instantiable phenotype
65 class (the design of this interface was partially guided by the need
66 to model OMIM entries).
67 Please note. This interface provides methods to associate mutations
68 (methods "each_Variant", ...) and genotypes (methods "each_Genotype", ...)
69 with phenotypes. Yet, these aspects might need some future enhancements,
70 especially since there is no "genotype" class yet.
72 =head1 FEEDBACK
74 =head2 Mailing Lists
76 User feedback is an integral part of the evolution of this and other
77 Bioperl modules. Send your comments and suggestions preferably to the
78 Bioperl mailing lists Your participation is much appreciated.
80 bioperl-l@bioperl.org - General discussion
81 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
83 =head2 Support
85 Please direct usage questions or support issues to the mailing list:
87 I<bioperl-l@bioperl.org>
89 rather than to the module maintainer directly. Many experienced and
90 reponsive experts will be able look at the problem and quickly
91 address it. Please include a thorough description of the problem
92 with code and data examples if at all possible.
94 =head2 Reporting Bugs
96 report bugs to the Bioperl bug tracking system to help us keep track
97 the bugs and their resolution. Bug reports can be submitted via the
98 web:
100 http://bugzilla.open-bio.org/
102 =head1 AUTHOR
104 Christian M. Zmasek
106 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
108 WWW: http://monochrome-effect.net/
110 Address:
112 Genomics Institute of the Novartis Research Foundation
113 10675 John Jay Hopkins Drive
114 San Diego, CA 92121
116 =head1 APPENDIX
118 The rest of the documentation details each of the object
119 methods. Internal methods are usually preceded with a _
121 =cut
124 # Let the code begin...
127 package Bio::Phenotype::PhenotypeI;
128 use base qw(Bio::Root::RootI);
132 =head2 name
134 Title : name
135 Usage : $obj->name( "r1" );
137 print $obj->name();
138 Function: Set/get for the name or id of this phenotype.
139 Returns : A name or id [scalar].
140 Args : A name or id [scalar] (optional).
142 =cut
144 sub name {
145 my ( $self ) = @_;
147 $self->throw_not_implemented();
149 } # name
154 =head2 description
156 Title : description
157 Usage : $obj->description( "This is ..." );
159 print $obj->description();
160 Function: Set/get for the description of this phenotype.
161 Returns : A description [scalar].
162 Args : A description [scalar] (optional).
164 =cut
166 sub description {
167 my ( $self ) = @_;
169 $self->throw_not_implemented();
171 } # description
176 =head2 species
178 Title : species
179 Usage : $obj->species( $species );
181 $species = $obj->species();
182 Function: Set/get for the species of this phenotype.
183 Returns : A species [Bio::Species].
184 Args : A species [Bio::Species] (optional).
186 =cut
188 sub species {
189 my ( $self ) = @_;
191 $self->throw_not_implemented();
193 } # species
198 =head2 comment
200 Title : comment
201 Usage : $obj->comment( "putative" );
203 print $obj->comment();
204 Function: Set/get for a comment about this phenotype.
205 Returns : A comment [scalar].
206 Args : A comment [scalar] (optional).
208 =cut
210 sub comment {
211 my ( $self ) = @_;
213 $self->throw_not_implemented();
215 } # comment
220 =head2 each_gene_symbol
222 Title : each_gene_symbol()
223 Usage : @gs = $obj->each_gene_symbol();
224 Function: Returns a list of gene symbols [scalars, most likely Strings]
225 associated with this phenotype.
226 Returns : A list of scalars.
227 Args :
229 =cut
231 sub each_gene_symbol {
232 my ( $self ) = @_;
234 $self->throw_not_implemented();
236 } # each_gene_symbol
239 =head2 add_gene_symbols
241 Title : add_gene_symbols
242 Usage : $obj->add_gene_symbols( @gs );
244 $obj->add_gene_symbols( $gs );
245 Function: Pushes one or more gene symbols [scalars, most likely Strings]
246 into the list of gene symbols.
247 Returns :
248 Args : scalar(s).
250 =cut
252 sub add_gene_symbols {
253 my ( $self ) = @_;
255 $self->throw_not_implemented();
257 } # add_gene_symbols
260 =head2 remove_gene_symbols
262 Usage : $obj->remove_gene_symbols();
263 Function: Deletes (and returns) the list of gene symbols [scalars,
264 most likely Strings] associated with this phenotype.
265 Returns : A list of scalars.
266 Args :
268 =cut
270 sub remove_gene_symbols {
271 my ( $self ) = @_;
273 $self->throw_not_implemented();
275 } # remove_gene_symbols
280 =head2 each_Variant
282 Title : each_Variant()
283 Usage : @vs = $obj->each_Variant();
284 Function: Returns a list of Bio::Variation::VariantI implementing objects
285 associated with this phenotype.
286 This is for representing the actual mutation(s) causing this
287 phenotype.
288 {* The "variants" data member and its methods will/might need to be
289 changed/improved in one way or another, CZ 09/06/02 *}
290 Returns : A list of Bio::Variation::VariantI implementing objects.
291 Args :
293 =cut
295 sub each_Variant {
296 my ( $self ) = @_;
298 $self->throw_not_implemented();
300 } # each_Variant
303 =head2 add_Variants
305 Usage : $obj->add_Variants( @vs );
307 $obj->add_Variants( $v );
308 Function: Pushes one or more Bio::Variation::VariantI implementing objects
309 into the list of Variants.
310 Returns :
311 Args : Bio::Variation::VariantI implementing object(s).
313 =cut
315 sub add_Variants {
316 my ( $self ) = @_;
318 $self->throw_not_implemented();
320 } # add_Variants
323 =head2 remove_Variants
325 Title : remove_Variants
326 Usage : $obj->remove_Variants();
327 Function: Deletes (and returns) the list of Bio::Variation::VariantI implementing
328 objects associated with this phenotype.
329 Returns : A list of Bio::Variation::VariantI implementing objects.
330 Args :
332 =cut
334 sub remove_Variants {
335 my ( $self ) = @_;
337 $self->throw_not_implemented();
339 } # remove_Variants
344 =head2 each_Reference
346 Title : each_Reference()
347 Usage : @refs = $obj->each_Reference();
348 Function: Returns a list of Bio::Annotation::Reference objects
349 associated with this phenotype.
350 Returns : A list of Bio::Annotation::Reference objects.
351 Args :
353 =cut
355 sub each_Reference {
356 my ( $self ) = @_;
358 $self->throw_not_implemented();
360 } # each_Reference
363 =head2 add_References
365 Title : add_References
366 Usage : $obj->add_References( @refs );
368 $obj->add_References( $ref );
369 Function: Pushes one or more Bio::Annotation::Reference objects
370 into the list of References.
371 Returns :
372 Args : Bio::Annotation::Reference object(s).
374 =cut
376 sub add_References {
377 my ( $self ) = @_;
379 $self->throw_not_implemented();
381 } # add_References
384 =head2 remove_References
386 Title : remove_References()
387 Usage : $obj->remove_References();
388 Function: Deletes (and returns) the list of Bio::Annotation::Reference objects
389 associated with this phenotype.
390 Returns : A list of Bio::Annotation::Reference objects.
391 Args :
393 =cut
395 sub remove_References {
396 my ( $self ) = @_;
398 $self->throw_not_implemented();
400 } # remove_References
405 =head2 each_CytoPosition
407 Title : each_CytoPosition()
408 Usage : @cps = $obj->each_CytoPosition();
409 Function: Returns a list of Bio::Map::CytoPosition objects
410 associated with this phenotype.
411 Returns : A list of Bio::Map::CytoPosition objects.
412 Args :
414 =cut
416 sub each_CytoPosition {
417 my ( $self ) = @_;
419 $self->throw_not_implemented();
421 } # each_CytoPosition
424 =head2 add_CytoPositions
426 Title : add_CytoPositions
427 Usage : $obj->add_CytoPositions( @cps );
429 $obj->add_CytoPositions( $cp );
430 Function: Pushes one or more Bio::Map::CytoPosition objects
431 into the list of CytoPositions.
432 Returns :
433 Args : Bio::Map::CytoPosition object(s).
435 =cut
437 sub add_CytoPositions {
438 my ( $self ) = @_;
440 $self->throw_not_implemented();
442 } # add_CytoPositions
445 =head2 remove_CytoPositions
447 Title : remove_CytoPositions
448 Usage : $obj->remove_CytoPositions();
449 Function: Deletes (and returns) the list o fBio::Map::CytoPosition objects
450 associated with this phenotype.
451 Returns : A list of Bio::Map::CytoPosition objects.
452 Args :
454 =cut
456 sub remove_CytoPositions {
457 my ( $self ) = @_;
459 $self->throw_not_implemented();
461 } # remove_CytoPositions
466 =head2 each_Correlate
468 Title : each_Correlate()
469 Usage : @corrs = $obj->each_Correlate();
470 Function: Returns a list of Bio::Phenotype::Correlate objects
471 associated with this phenotype.
472 (Correlates are correlating phenotypes in different species;
473 inspired by mouse correlates of human phenotypes in the OMIM
474 database.)
475 Returns : A list of Bio::Phenotype::Correlate objects.
476 Args :
478 =cut
480 sub each_Correlate {
481 my ( $self ) = @_;
483 $self->throw_not_implemented();
485 } # each_Correlate
490 =head2 add_Correlates
492 Title : add_Correlates
493 Usage : $obj->add_Correlates( @corrs );
495 $obj->add_Correlates( $corr );
496 Function: Pushes one or more Bio::Phenotype::Correlate objects
497 into the list of Correlates.
498 Returns :
499 Args : Bio::Phenotype::Correlate object(s).
501 =cut
503 sub add_Correlates {
504 my ( $self ) = @_;
506 $self->throw_not_implemented();
508 } # add_Correlates
511 =head2 remove_Correlates
513 Title : remove_Correlates
514 Usage : $obj->remove_Correlates();
515 Function: Deletes (and returns) the list of Bio::Phenotype::Correlate objects
516 associated with this phenotype.
517 Returns : A list of Bio::Phenotype::Correlate objects.
518 Args :
520 =cut
522 sub remove_Correlates {
523 my ( $self ) = @_;
525 $self->throw_not_implemented();
527 } # remove_Correlates
532 =head2 each_Measure
534 Title : each_Measure()
535 Usage : @ms = $obj->each_Measure();
536 Function: Returns a list of Bio::Phenotype::Measure objects
537 associated with this phenotype.
538 (Measure is for biochemically defined phenotypes
539 or any other types of measures.)
540 Returns : A list of Bio::Phenotype::Measure objects.
541 Args :
543 =cut
545 sub each_Measure {
546 my ( $self ) = @_;
548 $self->throw_not_implemented();
550 } # each_Measure
553 =head2 add_Measures
555 Title : add_Measures
556 Usage : $obj->add_Measures( @ms );
558 $obj->add_Measures( $m );
559 Function: Pushes one or more Bio::Phenotype::Measure objects
560 into the list of Measures.
561 Returns :
562 Args : Bio::Phenotype::Measure object(s).
564 =cut
566 sub add_Measures {
567 my ( $self ) = @_;
569 $self->throw_not_implemented();
571 } # add_Measures
574 =head2 remove_Measures
576 Title : remove_Measures
577 Usage : $obj->remove_Measures();
578 Function: Deletes (and returns) the list of Bio::Phenotype::Measure objects
579 associated with this phenotype.
580 Returns : A list of Bio::Phenotype::Measure objects.
581 Args :
583 =cut
585 sub remove_Measures {
586 my ( $self ) = @_;
588 $self->throw_not_implemented();
590 } # remove_Measures
595 =head2 each_keyword
597 Title : each_keyword()
598 Usage : @kws = $obj->each_keyword();
599 Function: Returns a list of key words [scalars, most likely Strings]
600 associated with this phenotype.
601 Returns : A list of scalars.
602 Args :
604 =cut
606 sub each_keyword {
607 my ( $self ) = @_;
609 $self->throw_not_implemented();
611 } # each_keyword
614 =head2 add_keywords
616 Title : add_keywords
617 Usage : $obj->add_keywords( @kws );
619 $obj->add_keywords( $kw );
620 Function: Pushes one or more keywords [scalars, most likely Strings]
621 into the list of key words.
622 Returns :
623 Args : scalar(s).
625 =cut
627 sub add_keywords {
628 my ( $self ) = @_;
630 $self->throw_not_implemented();
632 } # add_keywords
635 =head2 remove_keywords
637 Title : remove_keywords
638 Usage : $obj->remove_keywords();
639 Function: Deletes (and returns) the list of key words [scalars,
640 most likely Strings] associated with this phenotype.
641 Returns : A list of scalars.
642 Args :
644 =cut
646 sub remove_keywords {
647 my ( $self ) = @_;
649 $self->throw_not_implemented();
651 } # remove_keywords
656 =head2 each_DBLink
658 Title : each_DBLink()
659 Usage : @dbls = $obj->each_DBLink();
660 Function: Returns a list of Bio::Annotation::DBLink objects
661 associated with this phenotype.
662 Returns : A list of Bio::Annotation::DBLink objects.
663 Args :
665 =cut
667 sub each_DBLink {
668 my ( $self ) = @_;
670 $self->throw_not_implemented();
675 =head2 add_DBLinks
677 Title : add_DBLinks
678 Usage : $obj->add_DBLinks( @dbls );
680 $obj->add_DBLinks( $dbl );
681 Function: Pushes one or more Bio::Annotation::DBLink objects
682 into the list of DBLinks.
683 Returns :
684 Args : Bio::Annotation::DBLink object(s).
686 =cut
688 sub add_DBLinks {
689 my ( $self ) = @_;
691 $self->throw_not_implemented();
693 } # add_DBLinks
696 =head2 remove_DBLinks
698 Title : remove_DBLinks
699 Usage : $obj->remove_DBLinks();
700 Function: Deletes (and returns) the list of Bio::Annotation::DBLink objects
701 associated with this phenotype.
702 Returns : A list of Bio::Annotation::DBLink objects.
703 Args :
705 =cut
707 sub remove_DBLinks {
708 my ( $self ) = @_;
710 $self->throw_not_implemented();
712 } # remove_DBLinks
717 =head2 each_Genotype
719 Title : each_Reference()
720 Usage : @gts = $obj->each_Reference();
721 Function: Returns a list of "Genotype" objects
722 associated with this phenotype.
723 {* the "genotypes" data member and its methods certainly will/needs to be
724 changed/improved in one way or another since there is
725 no "Genotype" class yet, CZ 09/06/02 *}
726 Returns : A list of "Genotype" objects.
727 Args :
729 =cut
731 sub each_Genotype {
732 my ( $self ) = @_;
734 $self->throw_not_implemented();
736 } # each_Genotype
739 =head2 add_Genotypes
741 Title : add_Genotypes
742 Usage : $obj->add_Genotypes( @gts );
744 $obj->add_Genotypes( $gt );
745 Function: Pushes one or more "Genotypes"
746 into the list of "Genotypes".
747 Returns :
748 Args : "Genotypes(s)".
750 =cut
752 sub add_Genotypes {
753 my ( $self ) = @_;
755 $self->throw_not_implemented();
757 } # add_Genotypes
760 =head2 remove_Genotypes
762 Title : remove_Genotypes
763 Usage : $obj->remove_Genotypes();
764 Function: Deletes (and returns) the list of "Genotype" objects
765 associated with this phenotype.
766 Returns : A list of "Genotype" objects.
767 Args :
769 =cut
771 sub remove_Genotypes {
772 my ( $self ) = @_;
774 $self->throw_not_implemented();
776 } # remove_Genotypes