0
|
1 # $Id: ClusterI.pm,v 1.3 2002/10/25 01:29:37 lapp Exp $
|
|
2 #
|
|
3 # BioPerl module for Bio::ClusterI
|
|
4 #
|
|
5 # Cared for by Shawn Hoon <shawnh@fugu-sg.org>
|
|
6 #
|
|
7 # Copyright Shawn Hoon
|
|
8 #
|
|
9 # You may distribute this module under the same terms as perl itself
|
|
10
|
|
11 # POD documentation - main docs before the code
|
|
12
|
|
13 =head1 NAME
|
|
14
|
|
15 Bio::ClusterI - Cluster Interface
|
|
16
|
|
17 =head1 SYNOPSIS
|
|
18
|
|
19 # see the implementations of this interface for details but
|
|
20 # basically
|
|
21
|
|
22 my $cluster= $cluster->new(-description=>"POLYUBIQUITIN",
|
|
23 -members =>[$seq1,$seq2]);
|
|
24 my @members = $cluster->get_members();
|
|
25 my @sub_members = $cluster->get_members(-species=>"homo sapiens");
|
|
26
|
|
27
|
|
28
|
|
29 =head1 DESCRIPTION
|
|
30
|
|
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.
|
|
34
|
|
35 =head1 FEEDBACK
|
|
36
|
|
37 =head2 Mailing Lists
|
|
38
|
|
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.
|
|
42
|
|
43 bioperl-l@bioperl.org - General discussion
|
|
44 http://bioperl.org/MailList.shtml - About the mailing lists
|
|
45
|
|
46 =head2 Reporting Bugs
|
|
47
|
|
48 Report bugs to the Bioperl bug tracking system to help us keep track
|
|
49 of the bugs and their resolution. Bug reports can be submitted via
|
|
50 email or the web:
|
|
51
|
|
52 bioperl-bugs@bioperl.org
|
|
53 http://bugzilla.bioperl.org/
|
|
54
|
|
55 =head1 AUTHOR - Shawn Hoon
|
|
56
|
|
57 Email shawnh@fugu-sg.org
|
|
58
|
|
59
|
|
60 =head1 CONTRIBUTORS
|
|
61
|
|
62 Additional contributors names and emails here
|
|
63
|
|
64 =head1 APPENDIX
|
|
65
|
|
66 The rest of the documentation details each of the object methods.
|
|
67 Internal methods are usually preceded with a _
|
|
68
|
|
69 =cut
|
|
70
|
|
71
|
|
72 # Let the code begin...
|
|
73
|
|
74 package Bio::ClusterI;
|
|
75 use vars qw(@ISA);
|
|
76 use strict;
|
|
77
|
|
78 use Bio::Root::RootI;
|
|
79
|
|
80 @ISA = qw(Bio::Root::RootI);
|
|
81
|
|
82 =head1 Implementation Specific Functions
|
|
83
|
|
84 These functions are the ones that a specific implementation must
|
|
85 define.
|
|
86
|
|
87 =head2 new
|
|
88
|
|
89 We dont mandate but encourage implementors to support at least the
|
|
90 following named parameters upon object initialization.
|
|
91
|
|
92 Argument Description
|
|
93 -------- -----------
|
|
94 -display_id the display ID or name for the cluster
|
|
95 -description the consensus description or name of the cluster
|
|
96 -members the array of objects belonging to the family
|
|
97
|
|
98 =cut
|
|
99
|
|
100 =head2 display_id
|
|
101
|
|
102 Title : display_id
|
|
103 Usage :
|
|
104 Function: Get the display name or identifier for the cluster
|
|
105 Returns : a string
|
|
106 Args :
|
|
107
|
|
108 =cut
|
|
109
|
|
110 sub display_id{
|
|
111 shift->throw_not_implemented();
|
|
112 }
|
|
113
|
|
114
|
|
115 =head2 description
|
|
116
|
|
117 Title : description
|
|
118 Usage : Bio::ClusterI->description("POLYUBIQUITIN")
|
|
119 Function: get/set for the consensus description of the cluster
|
|
120 Returns : the description string
|
|
121 Args : Optional the description string
|
|
122
|
|
123 =cut
|
|
124
|
|
125 sub description{
|
|
126 shift->throw_not_implemented();
|
|
127 }
|
|
128
|
|
129 =head2 size
|
|
130
|
|
131 Title : size
|
|
132 Usage : Bio::ClusterI->size();
|
|
133 Function: get/set for the size of the family,
|
|
134 calculated from the number of members
|
|
135 Returns : the size of the family
|
|
136 Args :
|
|
137
|
|
138 =cut
|
|
139
|
|
140 sub size {
|
|
141 shift->throw_not_implemented();
|
|
142 }
|
|
143
|
|
144 =head2 cluster_score
|
|
145
|
|
146 Title : cluster_score
|
|
147 Usage : $cluster ->cluster_score(100);
|
|
148 Function: get/set for cluster_score which
|
|
149 represent the score in which the clustering
|
|
150 algorithm assigns to this cluster.
|
|
151 Returns : a number
|
|
152
|
|
153 =cut
|
|
154
|
|
155 sub cluster_score{
|
|
156 shift->throw_not_implemented();
|
|
157 }
|
|
158
|
|
159 =head2 get_members
|
|
160
|
|
161 Title : get_members
|
|
162 Usage : Bio::ClusterI->get_members(($seq1, $seq2));
|
|
163 Function: retrieve the members of the family by some criteria, for
|
|
164 example :
|
|
165 $cluster->get_members(-species => 'homo sapiens');
|
|
166
|
|
167 Will return all members if no criteria are provided.
|
|
168
|
|
169 Returns : the array of members
|
|
170 Args :
|
|
171
|
|
172 =cut
|
|
173
|
|
174 sub get_members {
|
|
175 shift->throw_not_implemented();
|
|
176 }
|
|
177
|
|
178 1;
|