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
43 -analysis => $analysis,
44 -repeat_consensus => $rc,
51 my $hstart = $feat->hstart;
52 my $hend = $feat->hend;
54 # move the feature to the chromosomal coordinate system
55 $feature = $feature->transform(
'chromosome');
57 # move the feature to a different slice
58 # (possibly on another coord system)
59 $feature = $feature->transfer($new_slice);
61 # project the feature onto another coordinate system possibly across
63 @projection = @{ $feature->project(
'contig') };
65 # change the start, end, and strand of the feature in place
66 $feature->move( $new_start, $new_end, $new_strand );
70 This a feature representing a repeat region on a sequence
76 package Bio::EnsEMBL::RepeatFeature;
85 use constant SEQUENCE_ONTOLOGY => {
87 term =>
'repeat_region',
93 The repeat consensus
for this repeat feature
94 Arg [HSTART] : int (optional)
95 The hit start on the consensus sequence
96 Arg [HEND] : int (optional)
97 The hit end on the consensus sequence
98 Arg [SCORE] : float (optional)
100 Arg [...] : Named arguments to superclass constructor
101 (see Bio::EnsEMBL::Feaure)
110 -SLICE => $chr_slice);
114 Caller : RepeatFeatureAdaptors
122 my $class = ref($caller) || $caller;
124 my $self = $class->SUPER::new(@_);
126 my ($repeat_consensus, $hstart, $hend, $score) =
127 rearrange([
'REPEAT_CONSENSUS',
'HSTART',
'HEND',
'SCORE'], @_);
129 $self->repeat_consensus($repeat_consensus);
130 $self->{
'hstart'} = $hstart;
131 $self->{
'hend'} = $hend;
132 $self->{
'score'} = $score;
138 =head2 repeat_consensus
142 Description: Getter/Setter
for the repeat consensus of
this repeat
150 sub repeat_consensus {
156 if(!ref($rc) || !$rc->isa(
'Bio::EnsEMBL::RepeatConsensus')) {
157 throw(
'RepeatConsensus arg must be a Bio::EnsEMBL::RepeatConsensus');
160 $self->{
'repeat_consensus'} = $rc;
163 return $self->{
'repeat_consensus'};
170 Arg [1] : (optional)
int $hstart
171 Example : $hit_start = $repeat->hstart;
172 Description: Getter/Setter
for the start bp of
this repeat match on the
183 $self->{
'hstart'} = shift
if(@_);
184 return $self->{
'hstart'};
190 Arg [1] : (optional)
float $score
191 Example : $score = $repeat->score();
192 Description: Getter/Setter
for the score of
this repeat feature
202 $self->{
'score'} = shift
if(@_);
203 return $self->{
'score'};
210 Arg [1] : (optional)
int $hend
211 Example : $hit_end = $repeat->hend;
212 Description: Getter/Setter
for the end bp of
this repeat match on the
223 $self->{
'hend'} = shift
if(@_);
224 return $self->{
'hend'};
233 Description: always returns 1. method exists
for consistancy with other
250 Example : print $rf->display_id();
251 Description: This method returns a
string that is considered to be
252 the
'display' identifier. For repeat_features
this is the
253 name of the repeat consensus
if it is available otherwise it is
257 Caller : web drawing code
267 my $rc = $self->{
'repeat_consensus'};
276 =head2 summary_as_hash
278 Example : $repeat_feature_summary = $protein_feature->summary_as_hash();
279 Description : Retrieves a textual summary of
this Repeat feature.
280 Not inherited from Feature.
281 Returns : hashref of arrays of descriptive strings
282 Status : Intended
for internal use
285 sub summary_as_hash {
288 $summary{
'start'} = $self->seq_region_start;
289 $summary{
'end'} = $self->seq_region_end;
290 $summary{
'strand'} = $self->strand;
291 $summary{
'seq_region_name'} = $self->seq_region_name;
292 $summary{
'description'} = $self->display_id;
293 $summary{
'assembly_name'} = $self->slice->coord_system->version();