sync w/ main trunk
[bioperl-live.git] / Bio / ClusterI.pm
blob17b306f359451d3adf9dde1f9021b9b40720acc6
1 # $Id$
3 # BioPerl module for Bio::ClusterI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Shawn Hoon <shawnh@fugu-sg.org>
9 # Copyright Shawn Hoon
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::ClusterI - Cluster Interface
19 =head1 SYNOPSIS
21 # see the implementations of this interface for details
23 my $cluster= $cluster->new(-description=>"POLYUBIQUITIN",
24 -members =>[$seq1,$seq2]);
25 my @members = $cluster->get_members();
26 my @sub_members = $cluster->get_members(-species=>"homo sapiens");
29 =head1 DESCRIPTION
31 This interface is the basic structure for a cluster of bioperl objects.
32 In this case it is up to the implementer to check arguments
33 and initialize whatever new object the implementing class is designed for.
35 =head1 FEEDBACK
37 =head2 Mailing Lists
39 User feedback is an integral part of the evolution of this and other
40 Bioperl modules. Send your comments and suggestions preferably to
41 the Bioperl mailing list. Your participation is much appreciated.
43 bioperl-l@bioperl.org - General discussion
44 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
46 =head2 Support
48 Please direct usage questions or support issues to the mailing list:
50 L<bioperl-l@bioperl.org>
52 rather than to the module maintainer directly. Many experienced and
53 reponsive experts will be able look at the problem and quickly
54 address it. Please include a thorough description of the problem
55 with code and data examples if at all possible.
57 =head2 Reporting Bugs
59 Report bugs to the Bioperl bug tracking system to help us keep track
60 of the bugs and their resolution. Bug reports can be submitted via the
61 web:
63 http://bugzilla.open-bio.org/
65 =head1 AUTHOR - Shawn Hoon
67 Email shawnh@fugu-sg.org
69 =head1 APPENDIX
71 The rest of the documentation details each of the object methods.
72 Internal methods are usually preceded with a _
74 =cut
77 # Let the code begin...
79 package Bio::ClusterI;
80 use strict;
83 use base qw(Bio::Root::RootI);
85 =head1 Implementation Specific Functions
87 These functions are the ones that a specific implementation must
88 define.
90 =head2 new
92 We dont mandate but encourage implementors to support at least the
93 following named parameters upon object initialization.
95 Argument Description
96 -------- -----------
97 -display_id the display ID or name for the cluster
98 -description the consensus description or name of the cluster
99 -members the array of objects belonging to the family
101 =cut
103 =head2 display_id
105 Title : display_id
106 Usage :
107 Function: Get the display name or identifier for the cluster
108 Returns : a string
109 Args :
111 =cut
113 sub display_id{
114 shift->throw_not_implemented();
118 =head2 description
120 Title : description
121 Usage : Bio::ClusterI->description("POLYUBIQUITIN")
122 Function: get/set for the consensus description of the cluster
123 Returns : the description string
124 Args : Optional the description string
126 =cut
128 sub description{
129 shift->throw_not_implemented();
132 =head2 size
134 Title : size
135 Usage : Bio::ClusterI->size();
136 Function: get/set for the size of the family,
137 calculated from the number of members
138 Returns : the size of the family
139 Args :
141 =cut
143 sub size {
144 shift->throw_not_implemented();
147 =head2 cluster_score
149 Title : cluster_score
150 Usage : $cluster ->cluster_score(100);
151 Function: get/set for cluster_score which
152 represent the score in which the clustering
153 algorithm assigns to this cluster.
154 Returns : a number
156 =cut
158 sub cluster_score{
159 shift->throw_not_implemented();
162 =head2 get_members
164 Title : get_members
165 Usage : Bio::ClusterI->get_members(($seq1, $seq2));
166 Function: retrieve the members of the family by some criteria, for
167 example :
168 $cluster->get_members(-species => 'homo sapiens');
170 Will return all members if no criteria are provided.
172 Returns : the array of members
173 Args :
175 =cut
177 sub get_members {
178 shift->throw_not_implemented();