comparison variant_effect_predictor/Bio/EnsEMBL/Compara/MemberDomain.pm @ 0:21066c0abaf5 draft

Uploaded
author willmclaren
date Fri, 03 Aug 2012 10:04:48 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:21066c0abaf5
1 =head1 LICENSE
2
3 Copyright (c) 1999-2012 The European Bioinformatics Institute and
4 Genome Research Limited. All rights reserved.
5
6 This software is distributed under a modified Apache license.
7 For license details, please see
8
9 http://www.ensembl.org/info/about/code_licence.html
10
11 =head1 CONTACT
12
13 Please email comments or questions to the public Ensembl
14 developers list at <dev@ensembl.org>.
15
16 Questions may also be sent to the Ensembl help desk at
17 <helpdesk@ensembl.org>.
18
19 =head1 AUTHORSHIP
20
21 Ensembl Team. Individual contributions can be found in the CVS log.
22
23 =cut
24
25 =head1 NAME
26
27 MemberDomain - DESCRIPTION of Object
28
29 =head1 DESCRIPTION
30
31 A subclass of Member which extends it to store a domain (start / end)
32 within the sequence
33
34 =head1 INHERITANCE TREE
35
36 Bio::EnsEMBL::Compara::MemberDomain
37 +- Bio::EnsEMBL::Compara::Member
38
39 =head1 METHODS
40
41 =cut
42
43 package Bio::EnsEMBL::Compara::MemberDomain;
44
45 use strict;
46 use Bio::EnsEMBL::Utils::Exception;
47 use Bio::EnsEMBL::Compara::Member;
48
49 use base ('Bio::EnsEMBL::Compara::Member');
50
51
52 ##################################
53 # overriden superclass methods
54 ##################################
55
56 =head2 copy
57
58 Arg [1] : none
59 Example : $copy = $aligned_member->copy();
60 Description : Creates a new MemberDomain object from an existing one
61 Returntype : Bio::EnsEMBL::Compara::MemberDomain
62 Exceptions : none
63 Caller : general
64 Status : Stable
65
66 =cut
67
68 sub copy {
69 my $self = shift;
70
71 my $mycopy = @_ ? shift : {}; # extending or from scratch?
72 $self->SUPER::copy($mycopy);
73 bless $mycopy, 'Bio::EnsEMBL::Compara::MemberDomain';
74
75 # The following does not Work if the initial object is only a Member
76 if (UNIVERSAL::isa($self, 'Bio::EnsEMBL::Compara::MemberDomain')) {
77 $mycopy->member_start($self->member_start);
78 $mycopy->member_end($self->member_end);
79 }
80
81 return $mycopy;
82 }
83
84
85 =head2 member_start
86
87 Arg [1] : (optional) $member_start
88 Example : $object->member_start($member_start);
89 Example : $member_start = $object->member_start();
90 Description : Getter/setter for the member_start attribute. For non-global
91 alignments, this represent the starting point of the local
92 alignment.
93 Currently the data provided as MemberDomains (leaves of the
94 GeneTree) are obtained using global alignments and the
95 member_start is always undefined.
96 Returntype : integer
97 Exceptions : none
98 Caller : general
99 Status : Stable
100
101 =cut
102
103 sub member_start {
104 my $self = shift;
105 $self->{'_member_start'} = shift if(@_);
106 return $self->{'_member_start'};
107 }
108
109
110 =head2 member_end
111
112 Arg [1] : (optional) $member_end
113 Example : $object->member_end($member_end);
114 Example : $member_end = $object->member_end();
115 Description : Getter/setter for the member_end attribute. For non-global
116 alignments, this represent the ending point of the local
117 alignment.
118 Currently the data provided as MemberDomains (leaves of the
119 GeneTree) are obtained using global alignments and the
120 member_end is always undefined.
121 Returntype : integer
122 Exceptions : none
123 Caller : general
124 Status : Stable
125
126 =cut
127
128 sub member_end {
129 my $self = shift;
130 $self->{'_member_end'} = shift if(@_);
131 return $self->{'_member_end'};
132 }
133
134
135
136 1;