Bio::EnsEMBL RepeatFeature
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::RepeatFeature - A feature representing a repeat on a piece of
sequence.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Feature
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw )
Inherit
Bio::EnsEMBL::Feature
Synopsis
  my $rf = new Bio::EnsEMBL::Feature(
-start => 100,
-end => 220,
-strand => -1,
-slice => $slice,
-analysis => $analysis,
-repeat_consensus => $rc,
-hstart => 10,
-hend => 100,
-hstrand => 1,
-score => 83.2
);
my $hstart = $feat->hstart; my $hend = $feat->hend; # move the feature to the chromosomal coordinate system $feature = $feature->transform('chromosome'); # move the feature to a different slice # (possibly on another coord system) $feature = $feature->transfer($new_slice); # project the feature onto another coordinate system possibly across # boundaries: @projection = @{ $feature->project('contig') }; # change the start, end, and strand of the feature in place $feature->move( $new_start, $new_end, $new_strand );
Description
This a feature representing a repeat region on a sequence
Methods
display_idDescriptionCode
hendDescriptionCode
hstartDescriptionCode
hstrandDescriptionCode
newDescriptionCode
new_fastDescriptionCode
repeat_consensusDescriptionCode
scoreDescriptionCode
Methods description
display_idcode    nextTop
  Arg [1]    : none
Example : print $rf->display_id();
Description: This method returns a string that is considered to be
the 'display' identifier. For repeat_features this is the
name of the repeat consensus if it is available otherwise it is
an empty string.
Returntype : string
Exceptions : none
Caller : web drawing code
Status : Stable
hendcodeprevnextTop
  Arg [1]    : (optional) int $hend
Example : $hit_end = $repeat->hend;
Description: Getter/Setter for the end bp of this repeat match on the
consensus sequence.
Returntype : int
Exceptions : none
Caller : general
Status : Stable
hstartcodeprevnextTop
  Arg [1]    : (optional) int $hstart
Example : $hit_start = $repeat->hstart;
Description: Getter/Setter for the start bp of this repeat match on the
consensus sequence.
Returntype : int
Exceptions : none
Caller : general
Status : Stable
hstrandcodeprevnextTop
  Arg [1]    : none
Example : none
Description: always returns 1. method exists for consistancy with other
features.
Returntype : int
Exceptions : none
Caller : general
Status : Stable
newcodeprevnextTop
  Arg [REPEAT_CONSENSUS] : Bio::EnsEMBL::RepeatConsensus (optional)
The repeat consensus for this repeat feature
Arg [HSTART] : int (optional)
The hit start on the consensus sequence
Arg [HEND] : int (optional)
The hit end on the consensus sequence
Arg [SCORE] : float (optional)
The score
Arg [...] : Named arguments to superclass constructor
(see Bio::EnsEMBL::Feaure)
Example : $rf = Bio::EnsEMBL::RepeatFeature->new(-REPEAT_CONSENSUS => $rc,
-HSTART => 10,
-HEND => 100,
-SCORE => 58.0,
-START => 1_000_100,
-END => 1_000_190,
-STRAND => 1,
-ANALYSIS => $an,
-SLICE => $chr_slice);
Description: Creates a new Bio::EnsEMBL::RepeatFeature object
Returntype : Bio::EnsEMBL::RepeatFeature
Exceptions : none
Caller : RepeatFeatureAdaptors
Status : Stable
new_fastcodeprevnextTop
  Arg [1]    : hash reference $hashref
Example : none
Description: This is an ultra fast constructor which requires knowledge of
the objects internals to be used. It is only used by
RepeatFeatureAdaptors (when thousands of repeats need to be
quickly created). The constructor 'new' should be used in
most instances.
Returntype : Bio::EnsEMBL::RepeatFeature
Exceptions : none
Caller : RepeatFeatureAdaptors
repeat_consensuscodeprevnextTop
  Arg [1]    : (optional) Bio::EnsEMBL::RepeatConsensus
Example : $repeat_consensus = $repeat->repeat_consensus;
Description: Getter/Setter for the repeat consensus of this repeat
Returntype : Bio::EnsEMBL::RepeatConsensus
Exceptions : none
Caller : general
Status : Stable
scorecodeprevnextTop
  Arg [1]    : (optional) float $score
Example : $score = $repeat->score();
Description: Getter/Setter for the score of this repeat feature
Returntype : int
Exceptions : none
Caller : general
Status : Stable
Methods code
display_iddescriptionprevnextTop
sub display_id {
  my $self = shift;

  my $id = '';

  my $rc = $self->{'repeat_consensus'};
  if($rc) {
    $id = $rc->name();
  }

  return $id;
}


1;

__END__
}
henddescriptionprevnextTop
sub hend {
  my $self = shift;
  $self->{'hend'} = shift if(@_);
  return $self->{'hend'};
}
hstartdescriptionprevnextTop
sub hstart {
  my $self = shift;
  $self->{'hstart'} = shift if(@_);
  return $self->{'hstart'};
}
hstranddescriptionprevnextTop
sub hstrand {
  return 1;
}
newdescriptionprevnextTop
sub new {
  my $caller = shift;

  my $class = ref($caller) || $caller;

  my $self = $class->SUPER::new(@_);

  my ($repeat_consensus, $hstart, $hend, $score) =
    rearrange(['REPEAT_CONSENSUS','HSTART','HEND','SCORE'], @_);

  $self->repeat_consensus($repeat_consensus);
  $self->{'hstart'} = $hstart;
  $self->{'hend'}   = $hend;
  $self->{'score'}  = $score;

  return $self;
}
new_fastdescriptionprevnextTop
sub new_fast {
  my ($class, $hashref) = @_;

  return bless $hashref, $class;
}
repeat_consensusdescriptionprevnextTop
sub repeat_consensus {
  my $self = shift;

  if(@_) {
    my $rc = shift;
    if(defined($rc)) {
      if(!ref($rc) || !$rc->isa('Bio::EnsEMBL::RepeatConsensus')) {
        throw('RepeatConsensus arg must be a Bio::EnsEMBL::RepeatConsensus');
      }
    }
    $self->{'repeat_consensus'} = $rc;
  }

  return $self->{'repeat_consensus'};
}
scoredescriptionprevnextTop
sub score {
  my $self = shift;
  $self->{'score'} = shift if(@_);
  return $self->{'score'};
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.
NAME - Bio::EnsEMBL::RepeatFeatureTop
AUTHORTop
James Gilbert email jgrg@sanger.ac.uk