Bio::EnsEMBL::Variation ReadCoverage
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Variation::ReadCoverage - A coverage reagion for a read.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Feature
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Feature
Synopsis
    # Read coverage feature representing a genomic region covered by 1 read
$rc = Bio::EnsEMBL::Variation::ReadCoverage->new (-start => 100, -end => 200, -slice => $slice, -level => 1. -sample => $individual); $rc = $rc->transform('supercontig'); print $rc->start(), "-", $rc->end(), "\n";
Description
This is a class representing the read coverage information
from the ensembl-variation database. A ReadCoverage behaves as any other Ensembl feature.
See Bio::EnsEMBL::Feature.
Methods
levelDescriptionCode
newDescriptionCode
sampleDescriptionCode
Methods description
levelcode    nextTop
    Arg[1]      : int $newval (optional)
The new value to set the level attribute to
Example : $depth = $obj->level();
Description : Getter/Setter for the level attribute. The level is
the number of times this feature has been seen in the genome
ReturnType : int
Exceptions : none
Caller : general
Status : At Risk
newcodeprevnextTop
  Arg [-ADAPTOR] :
see superclass constructor
Arg [-START] : see superclass constructor Arg [-END] : see superclass constructor Arg [-SLICE] : see superclass constructor Arg [-LEVEL] : int - the number of times the region represented by start and end has been seen Arg [-SAMPLE] : Bio::EnsEMBL::Variation::Individual - the individual in which the allele was recorded Example : $rc = Bio::EnsEMBL::Variation::ReadCoverage->new (-start => 100, -end => 100, -slice => $slice, -level => 1, -sample => $individual); Description: Constructor. Instantiates a new ReadCoverage object. Returntype : Bio::EnsEMBL::Variation::ReadCoverage Exceptions : none Caller : general Status : At Risk
samplecodeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Variation::Individual $newval (optional)
The new value to set the sample attribute to
Example : $individual = $rc->sample();
Description: Getter/Setter for the individual attribute
Returntype : Bio::EnsEMBL::Variation::Individual
Exceptions : throw on incorrect argument
Caller : general
Status : At Risk
Methods code
leveldescriptionprevnextTop
sub level {
    my $self = shift;
    return $self->{'level'} = shift if (@_);
    return $self->{'level'};
}
newdescriptionprevnextTop
sub new {
  my $caller = shift;
  my $class = ref($caller) || $caller;

  my $self = $class->SUPER::new(@_);
  my ($level, $individual) =
    rearrange([qw(LEVEL SAMPLE)], @_);

  $self->{'level'}    = $level;
  $self->{'sample'}   = $individual;

  return $self;
}
sampledescriptionprevnextTop
sub sample {
  my $self = shift;

  if(@_) {
    if(!ref($_[0]) || !$_[0]->isa('Bio::EnsEMBL::Variation::Individual')) {
      throw('Bio::EnsEMBL::Variation::Individual argument expected.');
    }
    $self->{'sample'} = shift;
  }

  return $self->{'sample'};
}

1;
}
General documentation
CONTACTTop
Post questions to the Ensembl development list: ensembl-dev@ebi.ac.uk