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
27 Bio::Phenotype::PhenotypeI - An interface for classes modeling phenotypes
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() ) {
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
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.
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
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.
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
100 http://bugzilla.open-bio.org/
106 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
108 WWW: http://monochrome-effect.net/
112 Genomics Institute of the Novartis Research Foundation
113 10675 John Jay Hopkins Drive
118 The rest of the documentation details each of the object
119 methods. Internal methods are usually preceded with a _
124 # Let the code begin...
127 package Bio
::Phenotype
::PhenotypeI
;
128 use base
qw(Bio::Root::RootI);
135 Usage : $obj->name( "r1" );
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).
147 $self->throw_not_implemented();
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).
169 $self->throw_not_implemented();
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).
191 $self->throw_not_implemented();
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).
213 $self->throw_not_implemented();
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.
231 sub each_gene_symbol
{
234 $self->throw_not_implemented();
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.
252 sub add_gene_symbols
{
255 $self->throw_not_implemented();
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.
270 sub remove_gene_symbols
{
273 $self->throw_not_implemented();
275 } # remove_gene_symbols
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
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.
298 $self->throw_not_implemented();
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.
311 Args : Bio::Variation::VariantI implementing object(s).
318 $self->throw_not_implemented();
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.
334 sub remove_Variants
{
337 $self->throw_not_implemented();
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.
358 $self->throw_not_implemented();
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.
372 Args : Bio::Annotation::Reference object(s).
379 $self->throw_not_implemented();
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.
395 sub remove_References
{
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.
416 sub each_CytoPosition
{
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.
433 Args : Bio::Map::CytoPosition object(s).
437 sub add_CytoPositions
{
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.
456 sub remove_CytoPositions
{
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
475 Returns : A list of Bio::Phenotype::Correlate objects.
483 $self->throw_not_implemented();
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.
499 Args : Bio::Phenotype::Correlate object(s).
506 $self->throw_not_implemented();
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.
522 sub remove_Correlates
{
525 $self->throw_not_implemented();
527 } # remove_Correlates
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.
548 $self->throw_not_implemented();
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.
562 Args : Bio::Phenotype::Measure object(s).
569 $self->throw_not_implemented();
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.
585 sub remove_Measures
{
588 $self->throw_not_implemented();
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.
609 $self->throw_not_implemented();
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.
630 $self->throw_not_implemented();
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.
646 sub remove_keywords
{
649 $self->throw_not_implemented();
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.
670 $self->throw_not_implemented();
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.
684 Args : Bio::Annotation::DBLink object(s).
691 $self->throw_not_implemented();
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.
710 $self->throw_not_implemented();
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.
734 $self->throw_not_implemented();
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".
748 Args : "Genotypes(s)".
755 $self->throw_not_implemented();
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.
771 sub remove_Genotypes
{
774 $self->throw_not_implemented();