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
26 Bio::Phenotype::PhenotypeI - An interface for classes modeling phenotypes
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() ) {
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
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.
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
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.
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
99 https://redmine.open-bio.org/projects/bioperl/
105 Email: czmasek-at-burnham.org or cmzmasek@yahoo.com
107 WWW: http://monochrome-effect.net/
111 Genomics Institute of the Novartis Research Foundation
112 10675 John Jay Hopkins Drive
117 The rest of the documentation details each of the object
118 methods. Internal methods are usually preceded with a _
123 # Let the code begin...
126 package Bio
::Phenotype
::PhenotypeI
;
127 use base
qw(Bio::Root::RootI);
134 Usage : $obj->name( "r1" );
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).
146 $self->throw_not_implemented();
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).
168 $self->throw_not_implemented();
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).
190 $self->throw_not_implemented();
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).
212 $self->throw_not_implemented();
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.
230 sub each_gene_symbol
{
233 $self->throw_not_implemented();
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.
251 sub add_gene_symbols
{
254 $self->throw_not_implemented();
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.
269 sub remove_gene_symbols
{
272 $self->throw_not_implemented();
274 } # remove_gene_symbols
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
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.
297 $self->throw_not_implemented();
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.
310 Args : Bio::Variation::VariantI implementing object(s).
317 $self->throw_not_implemented();
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.
333 sub remove_Variants
{
336 $self->throw_not_implemented();
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.
357 $self->throw_not_implemented();
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.
371 Args : Bio::Annotation::Reference object(s).
378 $self->throw_not_implemented();
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.
394 sub remove_References
{
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.
415 sub each_CytoPosition
{
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.
432 Args : Bio::Map::CytoPosition object(s).
436 sub add_CytoPositions
{
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.
455 sub remove_CytoPositions
{
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
474 Returns : A list of Bio::Phenotype::Correlate objects.
482 $self->throw_not_implemented();
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.
498 Args : Bio::Phenotype::Correlate object(s).
505 $self->throw_not_implemented();
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.
521 sub remove_Correlates
{
524 $self->throw_not_implemented();
526 } # remove_Correlates
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.
547 $self->throw_not_implemented();
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.
561 Args : Bio::Phenotype::Measure object(s).
568 $self->throw_not_implemented();
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.
584 sub remove_Measures
{
587 $self->throw_not_implemented();
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.
608 $self->throw_not_implemented();
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.
629 $self->throw_not_implemented();
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.
645 sub remove_keywords
{
648 $self->throw_not_implemented();
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.
669 $self->throw_not_implemented();
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.
683 Args : Bio::Annotation::DBLink object(s).
690 $self->throw_not_implemented();
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.
709 $self->throw_not_implemented();
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.
733 $self->throw_not_implemented();
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".
747 Args : "Genotypes(s)".
754 $self->throw_not_implemented();
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.
770 sub remove_Genotypes
{
773 $self->throw_not_implemented();