3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
49 Certain features, e.g. Haplotypes and PARs, are represented as
50 "exceptions" to the normal assembly. This
class represents such
57 package Bio::EnsEMBL::AssemblyExceptionFeature;
65 use Scalar::Util qw(weaken isweak);
72 Arg [TYPE] : The type (e.g. HAP
for haplotype, PAR
for PAR)
73 Arg [...] : Named arguments passed to superclass
78 -alternate_slice => $alt_slice,
82 of
this method are instantiated, rather than
this class itself.
84 Exceptions : Thrown on invalid -SLICE arguments
85 Caller : general, subclass constructors
94 # allow this to be called as class or object method
95 my $class = ref($caller) || $caller;
96 my $self = $class->SUPER::new(@_);
98 my ($type, $alternate_slice) = rearrange([
'TYPE',
'ALTERNATE_SLICE'],@_);
99 $self->{
'type'} = $type;
100 $self->{
'alternate_slice'} = $alternate_slice;
108 Arg [1] : (optional)
string $value
109 Example : $type = $assembly_exception_feature->type();
110 Description: Getter/Setter
for the type associated with
this
123 $self->{
'type'} = shift
if(@_);
125 return $self->{
'type'};
129 =head2 alternate_slice
131 Arg [1] : (optional)
string $value
132 Example : $alt_slice = $assembly_exception_feature->alternate_slice();
133 Description: Getter/Setter
for the alternate slice associated with
this feature.
134 The alternate slice represents the
"other side" of the AssemblyExceptionFeature.
142 sub alternate_slice {
146 $self->{
'alternate_slice'} = shift
if(@_);
148 return $self->{
'alternate_slice'};
157 Description: This method returns a
string that is considered to be
158 the
'display' identifier. For assembly exception features
159 this is the name of the alternate seqregion or
'' if the
160 alternate slice is not defined.
163 Caller : web drawing code
170 my $slice = $self->{
'alternate_slice'};
171 return '' if(!$slice);
172 return $slice->seq_region_name();