work on updates for release
[bioperl-live.git] / Bio / Phenotype / PhenotypeI.pm
blob9145be65856ca752949386c98a0e2eba38f40f97
2 # BioPerl module for Bio::Phenotype::PhenotypeI
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::PhenotypeI - An interface for classes modeling phenotypes
28 =head1 SYNOPSIS
30 #get Bio::Phenotype::PhenotypeI somehow
32 print $phenotype->name(), "\n";
33 print $phenotype->description(), "\n";
35 my @keywords = ( "achondroplasia", "dwarfism" );
36 $phenotype->add_keywords( @keywords );
37 foreach my $keyword ( $phenotype->each_keyword() ) {
38 print $keyword, "\n";
40 $phenotype->remove_keywords();
43 foreach my $gene_symbol ( $phenotype->each_gene_symbol() ) {
44 print $gene_symbol, "\n";
47 foreach my $corr ( $phenotype->each_Correlate() ) {
48 # Do something with $corr
51 foreach my $var ( $phenotype->each_Variant() ) {
52 # Do something with $var (mutation)
55 foreach my $measure ( $phenotype->each_Measure() ) {
56 # Do something with $measure
60 =head1 DESCRIPTION
62 This superclass defines common methods for classes modelling phenotypes.
63 Bio::Phenotype::OMIM::OMIMentry is an example of an instantiable phenotype
64 class (the design of this interface was partially guided by the need
65 to model OMIM entries).
66 Please note. This interface provides methods to associate mutations
67 (methods "each_Variant", ...) and genotypes (methods "each_Genotype", ...)
68 with phenotypes. Yet, these aspects might need some future enhancements,
69 especially since there is no "genotype" class yet.
71 =head1 FEEDBACK
73 =head2 Mailing Lists
75 User feedback is an integral part of the evolution of this and other
76 Bioperl modules. Send your comments and suggestions preferably to the
77 Bioperl mailing lists Your participation is much appreciated.
79 bioperl-l@bioperl.org - General discussion
80 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
82 =head2 Support
84 Please direct usage questions or support issues to the mailing list:
86 I<bioperl-l@bioperl.org>
88 rather than to the module maintainer directly. Many experienced and
89 reponsive experts will be able look at the problem and quickly
90 address it. Please include a thorough description of the problem
91 with code and data examples if at all possible.
93 =head2 Reporting Bugs
95 report bugs to the Bioperl bug tracking system to help us keep track
96 the bugs and their resolution. Bug reports can be submitted via the
97 web:
99 https://redmine.open-bio.org/projects/bioperl/
101 =head1 AUTHOR
103 Christian M. Zmasek
105 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
107 WWW: http://monochrome-effect.net/
109 Address:
111 Genomics Institute of the Novartis Research Foundation
112 10675 John Jay Hopkins Drive
113 San Diego, CA 92121
115 =head1 APPENDIX
117 The rest of the documentation details each of the object
118 methods. Internal methods are usually preceded with a _
120 =cut
123 # Let the code begin...
126 package Bio::Phenotype::PhenotypeI;
127 use base qw(Bio::Root::RootI);
131 =head2 name
133 Title : name
134 Usage : $obj->name( "r1" );
136 print $obj->name();
137 Function: Set/get for the name or id of this phenotype.
138 Returns : A name or id [scalar].
139 Args : A name or id [scalar] (optional).
141 =cut
143 sub name {
144 my ( $self ) = @_;
146 $self->throw_not_implemented();
148 } # name
153 =head2 description
155 Title : description
156 Usage : $obj->description( "This is ..." );
158 print $obj->description();
159 Function: Set/get for the description of this phenotype.
160 Returns : A description [scalar].
161 Args : A description [scalar] (optional).
163 =cut
165 sub description {
166 my ( $self ) = @_;
168 $self->throw_not_implemented();
170 } # description
175 =head2 species
177 Title : species
178 Usage : $obj->species( $species );
180 $species = $obj->species();
181 Function: Set/get for the species of this phenotype.
182 Returns : A species [Bio::Species].
183 Args : A species [Bio::Species] (optional).
185 =cut
187 sub species {
188 my ( $self ) = @_;
190 $self->throw_not_implemented();
192 } # species
197 =head2 comment
199 Title : comment
200 Usage : $obj->comment( "putative" );
202 print $obj->comment();
203 Function: Set/get for a comment about this phenotype.
204 Returns : A comment [scalar].
205 Args : A comment [scalar] (optional).
207 =cut
209 sub comment {
210 my ( $self ) = @_;
212 $self->throw_not_implemented();
214 } # comment
219 =head2 each_gene_symbol
221 Title : each_gene_symbol()
222 Usage : @gs = $obj->each_gene_symbol();
223 Function: Returns a list of gene symbols [scalars, most likely Strings]
224 associated with this phenotype.
225 Returns : A list of scalars.
226 Args :
228 =cut
230 sub each_gene_symbol {
231 my ( $self ) = @_;
233 $self->throw_not_implemented();
235 } # each_gene_symbol
238 =head2 add_gene_symbols
240 Title : add_gene_symbols
241 Usage : $obj->add_gene_symbols( @gs );
243 $obj->add_gene_symbols( $gs );
244 Function: Pushes one or more gene symbols [scalars, most likely Strings]
245 into the list of gene symbols.
246 Returns :
247 Args : scalar(s).
249 =cut
251 sub add_gene_symbols {
252 my ( $self ) = @_;
254 $self->throw_not_implemented();
256 } # add_gene_symbols
259 =head2 remove_gene_symbols
261 Usage : $obj->remove_gene_symbols();
262 Function: Deletes (and returns) the list of gene symbols [scalars,
263 most likely Strings] associated with this phenotype.
264 Returns : A list of scalars.
265 Args :
267 =cut
269 sub remove_gene_symbols {
270 my ( $self ) = @_;
272 $self->throw_not_implemented();
274 } # remove_gene_symbols
279 =head2 each_Variant
281 Title : each_Variant()
282 Usage : @vs = $obj->each_Variant();
283 Function: Returns a list of Bio::Variation::VariantI implementing objects
284 associated with this phenotype.
285 This is for representing the actual mutation(s) causing this
286 phenotype.
287 {* The "variants" data member and its methods will/might need to be
288 changed/improved in one way or another, CZ 09/06/02 *}
289 Returns : A list of Bio::Variation::VariantI implementing objects.
290 Args :
292 =cut
294 sub each_Variant {
295 my ( $self ) = @_;
297 $self->throw_not_implemented();
299 } # each_Variant
302 =head2 add_Variants
304 Usage : $obj->add_Variants( @vs );
306 $obj->add_Variants( $v );
307 Function: Pushes one or more Bio::Variation::VariantI implementing objects
308 into the list of Variants.
309 Returns :
310 Args : Bio::Variation::VariantI implementing object(s).
312 =cut
314 sub add_Variants {
315 my ( $self ) = @_;
317 $self->throw_not_implemented();
319 } # add_Variants
322 =head2 remove_Variants
324 Title : remove_Variants
325 Usage : $obj->remove_Variants();
326 Function: Deletes (and returns) the list of Bio::Variation::VariantI implementing
327 objects associated with this phenotype.
328 Returns : A list of Bio::Variation::VariantI implementing objects.
329 Args :
331 =cut
333 sub remove_Variants {
334 my ( $self ) = @_;
336 $self->throw_not_implemented();
338 } # remove_Variants
343 =head2 each_Reference
345 Title : each_Reference()
346 Usage : @refs = $obj->each_Reference();
347 Function: Returns a list of Bio::Annotation::Reference objects
348 associated with this phenotype.
349 Returns : A list of Bio::Annotation::Reference objects.
350 Args :
352 =cut
354 sub each_Reference {
355 my ( $self ) = @_;
357 $self->throw_not_implemented();
359 } # each_Reference
362 =head2 add_References
364 Title : add_References
365 Usage : $obj->add_References( @refs );
367 $obj->add_References( $ref );
368 Function: Pushes one or more Bio::Annotation::Reference objects
369 into the list of References.
370 Returns :
371 Args : Bio::Annotation::Reference object(s).
373 =cut
375 sub add_References {
376 my ( $self ) = @_;
378 $self->throw_not_implemented();
380 } # add_References
383 =head2 remove_References
385 Title : remove_References()
386 Usage : $obj->remove_References();
387 Function: Deletes (and returns) the list of Bio::Annotation::Reference objects
388 associated with this phenotype.
389 Returns : A list of Bio::Annotation::Reference objects.
390 Args :
392 =cut
394 sub remove_References {
395 my ( $self ) = @_;
397 $self->throw_not_implemented();
399 } # remove_References
404 =head2 each_CytoPosition
406 Title : each_CytoPosition()
407 Usage : @cps = $obj->each_CytoPosition();
408 Function: Returns a list of Bio::Map::CytoPosition objects
409 associated with this phenotype.
410 Returns : A list of Bio::Map::CytoPosition objects.
411 Args :
413 =cut
415 sub each_CytoPosition {
416 my ( $self ) = @_;
418 $self->throw_not_implemented();
420 } # each_CytoPosition
423 =head2 add_CytoPositions
425 Title : add_CytoPositions
426 Usage : $obj->add_CytoPositions( @cps );
428 $obj->add_CytoPositions( $cp );
429 Function: Pushes one or more Bio::Map::CytoPosition objects
430 into the list of CytoPositions.
431 Returns :
432 Args : Bio::Map::CytoPosition object(s).
434 =cut
436 sub add_CytoPositions {
437 my ( $self ) = @_;
439 $self->throw_not_implemented();
441 } # add_CytoPositions
444 =head2 remove_CytoPositions
446 Title : remove_CytoPositions
447 Usage : $obj->remove_CytoPositions();
448 Function: Deletes (and returns) the list o fBio::Map::CytoPosition objects
449 associated with this phenotype.
450 Returns : A list of Bio::Map::CytoPosition objects.
451 Args :
453 =cut
455 sub remove_CytoPositions {
456 my ( $self ) = @_;
458 $self->throw_not_implemented();
460 } # remove_CytoPositions
465 =head2 each_Correlate
467 Title : each_Correlate()
468 Usage : @corrs = $obj->each_Correlate();
469 Function: Returns a list of Bio::Phenotype::Correlate objects
470 associated with this phenotype.
471 (Correlates are correlating phenotypes in different species;
472 inspired by mouse correlates of human phenotypes in the OMIM
473 database.)
474 Returns : A list of Bio::Phenotype::Correlate objects.
475 Args :
477 =cut
479 sub each_Correlate {
480 my ( $self ) = @_;
482 $self->throw_not_implemented();
484 } # each_Correlate
489 =head2 add_Correlates
491 Title : add_Correlates
492 Usage : $obj->add_Correlates( @corrs );
494 $obj->add_Correlates( $corr );
495 Function: Pushes one or more Bio::Phenotype::Correlate objects
496 into the list of Correlates.
497 Returns :
498 Args : Bio::Phenotype::Correlate object(s).
500 =cut
502 sub add_Correlates {
503 my ( $self ) = @_;
505 $self->throw_not_implemented();
507 } # add_Correlates
510 =head2 remove_Correlates
512 Title : remove_Correlates
513 Usage : $obj->remove_Correlates();
514 Function: Deletes (and returns) the list of Bio::Phenotype::Correlate objects
515 associated with this phenotype.
516 Returns : A list of Bio::Phenotype::Correlate objects.
517 Args :
519 =cut
521 sub remove_Correlates {
522 my ( $self ) = @_;
524 $self->throw_not_implemented();
526 } # remove_Correlates
531 =head2 each_Measure
533 Title : each_Measure()
534 Usage : @ms = $obj->each_Measure();
535 Function: Returns a list of Bio::Phenotype::Measure objects
536 associated with this phenotype.
537 (Measure is for biochemically defined phenotypes
538 or any other types of measures.)
539 Returns : A list of Bio::Phenotype::Measure objects.
540 Args :
542 =cut
544 sub each_Measure {
545 my ( $self ) = @_;
547 $self->throw_not_implemented();
549 } # each_Measure
552 =head2 add_Measures
554 Title : add_Measures
555 Usage : $obj->add_Measures( @ms );
557 $obj->add_Measures( $m );
558 Function: Pushes one or more Bio::Phenotype::Measure objects
559 into the list of Measures.
560 Returns :
561 Args : Bio::Phenotype::Measure object(s).
563 =cut
565 sub add_Measures {
566 my ( $self ) = @_;
568 $self->throw_not_implemented();
570 } # add_Measures
573 =head2 remove_Measures
575 Title : remove_Measures
576 Usage : $obj->remove_Measures();
577 Function: Deletes (and returns) the list of Bio::Phenotype::Measure objects
578 associated with this phenotype.
579 Returns : A list of Bio::Phenotype::Measure objects.
580 Args :
582 =cut
584 sub remove_Measures {
585 my ( $self ) = @_;
587 $self->throw_not_implemented();
589 } # remove_Measures
594 =head2 each_keyword
596 Title : each_keyword()
597 Usage : @kws = $obj->each_keyword();
598 Function: Returns a list of key words [scalars, most likely Strings]
599 associated with this phenotype.
600 Returns : A list of scalars.
601 Args :
603 =cut
605 sub each_keyword {
606 my ( $self ) = @_;
608 $self->throw_not_implemented();
610 } # each_keyword
613 =head2 add_keywords
615 Title : add_keywords
616 Usage : $obj->add_keywords( @kws );
618 $obj->add_keywords( $kw );
619 Function: Pushes one or more keywords [scalars, most likely Strings]
620 into the list of key words.
621 Returns :
622 Args : scalar(s).
624 =cut
626 sub add_keywords {
627 my ( $self ) = @_;
629 $self->throw_not_implemented();
631 } # add_keywords
634 =head2 remove_keywords
636 Title : remove_keywords
637 Usage : $obj->remove_keywords();
638 Function: Deletes (and returns) the list of key words [scalars,
639 most likely Strings] associated with this phenotype.
640 Returns : A list of scalars.
641 Args :
643 =cut
645 sub remove_keywords {
646 my ( $self ) = @_;
648 $self->throw_not_implemented();
650 } # remove_keywords
655 =head2 each_DBLink
657 Title : each_DBLink()
658 Usage : @dbls = $obj->each_DBLink();
659 Function: Returns a list of Bio::Annotation::DBLink objects
660 associated with this phenotype.
661 Returns : A list of Bio::Annotation::DBLink objects.
662 Args :
664 =cut
666 sub each_DBLink {
667 my ( $self ) = @_;
669 $self->throw_not_implemented();
674 =head2 add_DBLinks
676 Title : add_DBLinks
677 Usage : $obj->add_DBLinks( @dbls );
679 $obj->add_DBLinks( $dbl );
680 Function: Pushes one or more Bio::Annotation::DBLink objects
681 into the list of DBLinks.
682 Returns :
683 Args : Bio::Annotation::DBLink object(s).
685 =cut
687 sub add_DBLinks {
688 my ( $self ) = @_;
690 $self->throw_not_implemented();
692 } # add_DBLinks
695 =head2 remove_DBLinks
697 Title : remove_DBLinks
698 Usage : $obj->remove_DBLinks();
699 Function: Deletes (and returns) the list of Bio::Annotation::DBLink objects
700 associated with this phenotype.
701 Returns : A list of Bio::Annotation::DBLink objects.
702 Args :
704 =cut
706 sub remove_DBLinks {
707 my ( $self ) = @_;
709 $self->throw_not_implemented();
711 } # remove_DBLinks
716 =head2 each_Genotype
718 Title : each_Reference()
719 Usage : @gts = $obj->each_Reference();
720 Function: Returns a list of "Genotype" objects
721 associated with this phenotype.
722 {* the "genotypes" data member and its methods certainly will/needs to be
723 changed/improved in one way or another since there is
724 no "Genotype" class yet, CZ 09/06/02 *}
725 Returns : A list of "Genotype" objects.
726 Args :
728 =cut
730 sub each_Genotype {
731 my ( $self ) = @_;
733 $self->throw_not_implemented();
735 } # each_Genotype
738 =head2 add_Genotypes
740 Title : add_Genotypes
741 Usage : $obj->add_Genotypes( @gts );
743 $obj->add_Genotypes( $gt );
744 Function: Pushes one or more "Genotypes"
745 into the list of "Genotypes".
746 Returns :
747 Args : "Genotypes(s)".
749 =cut
751 sub add_Genotypes {
752 my ( $self ) = @_;
754 $self->throw_not_implemented();
756 } # add_Genotypes
759 =head2 remove_Genotypes
761 Title : remove_Genotypes
762 Usage : $obj->remove_Genotypes();
763 Function: Deletes (and returns) the list of "Genotype" objects
764 associated with this phenotype.
765 Returns : A list of "Genotype" objects.
766 Args :
768 =cut
770 sub remove_Genotypes {
771 my ( $self ) = @_;
773 $self->throw_not_implemented();
775 } # remove_Genotypes