0
|
1 package Bio::EnsEMBL::Compara::Family;
|
|
2
|
|
3 use strict;
|
|
4 use Bio::EnsEMBL::Utils::Argument;
|
|
5 use Bio::EnsEMBL::Utils::Exception;
|
|
6
|
|
7 use base ('Bio::EnsEMBL::Compara::AlignedMemberSet');
|
|
8
|
|
9 =head2 new
|
|
10
|
|
11 Arg [1] :
|
|
12 Example :
|
|
13 Description:
|
|
14 Returntype : Bio::EnsEMBL::Compara::Family (but without members; caller has to fill using
|
|
15 add_member)
|
|
16 Exceptions :
|
|
17 Caller :
|
|
18
|
|
19 =cut
|
|
20
|
|
21 sub new {
|
|
22 my($class,@args) = @_;
|
|
23
|
|
24 my $self = $class->SUPER::new(@args);
|
|
25
|
|
26 if (scalar @args) {
|
|
27 #do this explicitly.
|
|
28 my ($description_score) = rearrange([qw(DESCRIPTION_SCORE)], @args);
|
|
29
|
|
30 $description_score && $self->description_score($description_score);
|
|
31 }
|
|
32
|
|
33 return $self;
|
|
34 }
|
|
35
|
|
36 =head2 description_score
|
|
37
|
|
38 Arg [1] :
|
|
39 Example :
|
|
40 Description:
|
|
41 Returntype :
|
|
42 Exceptions :
|
|
43 Caller :
|
|
44
|
|
45 =cut
|
|
46
|
|
47 sub description_score {
|
|
48 my $self = shift;
|
|
49 $self->{'_description_score'} = shift if(@_);
|
|
50 return $self->{'_description_score'};
|
|
51 }
|
|
52
|
|
53
|
|
54 =head2 deep_copy
|
|
55
|
|
56 Description: Returns a copy of $self. All the members are themselves copied
|
|
57 Returntype : Bio::EnsEMBL::Compara::Family
|
|
58 Caller : general
|
|
59 Status : Stable
|
|
60
|
|
61 =cut
|
|
62
|
|
63 sub deep_copy {
|
|
64 my $self = shift;
|
|
65 my $copy = $self->SUPER::deep_copy();
|
|
66 $copy->description_score($self->description_score);
|
|
67 return $copy;
|
|
68 }
|
|
69
|
|
70 1;
|