bug 2549; fixed small bug in Bio::Taxon which doesn't catch -common_name
[bioperl-live.git] / Bio / ClusterI.pm
blobde40763e1e25975a59ec51dab0ce2cb4cafc3923
1 # $Id$
3 # BioPerl module for Bio::ClusterI
5 # Cared for by Shawn Hoon <shawnh@fugu-sg.org>
7 # Copyright Shawn Hoon
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::ClusterI - Cluster Interface
17 =head1 SYNOPSIS
19 # see the implementations of this interface for details
21 my $cluster= $cluster->new(-description=>"POLYUBIQUITIN",
22 -members =>[$seq1,$seq2]);
23 my @members = $cluster->get_members();
24 my @sub_members = $cluster->get_members(-species=>"homo sapiens");
27 =head1 DESCRIPTION
29 This interface is the basic structure for a cluster of bioperl objects.
30 In this case it is up to the implementer to check arguments
31 and initialize whatever new object the implementing class is designed for.
33 =head1 FEEDBACK
35 =head2 Mailing Lists
37 User feedback is an integral part of the evolution of this and other
38 Bioperl modules. Send your comments and suggestions preferably to
39 the Bioperl mailing list. Your participation is much appreciated.
41 bioperl-l@bioperl.org - General discussion
42 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
44 =head2 Reporting Bugs
46 Report bugs to the Bioperl bug tracking system to help us keep track
47 of the bugs and their resolution. Bug reports can be submitted via the
48 web:
50 http://bugzilla.open-bio.org/
52 =head1 AUTHOR - Shawn Hoon
54 Email shawnh@fugu-sg.org
56 =head1 APPENDIX
58 The rest of the documentation details each of the object methods.
59 Internal methods are usually preceded with a _
61 =cut
64 # Let the code begin...
66 package Bio::ClusterI;
67 use strict;
70 use base qw(Bio::Root::RootI);
72 =head1 Implementation Specific Functions
74 These functions are the ones that a specific implementation must
75 define.
77 =head2 new
79 We dont mandate but encourage implementors to support at least the
80 following named parameters upon object initialization.
82 Argument Description
83 -------- -----------
84 -display_id the display ID or name for the cluster
85 -description the consensus description or name of the cluster
86 -members the array of objects belonging to the family
88 =cut
90 =head2 display_id
92 Title : display_id
93 Usage :
94 Function: Get the display name or identifier for the cluster
95 Returns : a string
96 Args :
98 =cut
100 sub display_id{
101 shift->throw_not_implemented();
105 =head2 description
107 Title : description
108 Usage : Bio::ClusterI->description("POLYUBIQUITIN")
109 Function: get/set for the consensus description of the cluster
110 Returns : the description string
111 Args : Optional the description string
113 =cut
115 sub description{
116 shift->throw_not_implemented();
119 =head2 size
121 Title : size
122 Usage : Bio::ClusterI->size();
123 Function: get/set for the size of the family,
124 calculated from the number of members
125 Returns : the size of the family
126 Args :
128 =cut
130 sub size {
131 shift->throw_not_implemented();
134 =head2 cluster_score
136 Title : cluster_score
137 Usage : $cluster ->cluster_score(100);
138 Function: get/set for cluster_score which
139 represent the score in which the clustering
140 algorithm assigns to this cluster.
141 Returns : a number
143 =cut
145 sub cluster_score{
146 shift->throw_not_implemented();
149 =head2 get_members
151 Title : get_members
152 Usage : Bio::ClusterI->get_members(($seq1, $seq2));
153 Function: retrieve the members of the family by some criteria, for
154 example :
155 $cluster->get_members(-species => 'homo sapiens');
157 Will return all members if no criteria are provided.
159 Returns : the array of members
160 Args :
162 =cut
164 sub get_members {
165 shift->throw_not_implemented();