Bio::EnsEMBL::Variation
ReadCoverageCollection
Toolbar
Summary
Bio::EnsEMBL::Variation::ReadCoverageCollection - A collection of coverage reagion for a read.
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
# Read coverage collection feature representing a genomic region covered by a read
$rcc = Bio::EnsEMBL::Variation::ReadCoverageCollection->new
(-start => 100,
-end => 200,
-strand => 1,
-slice => $slice,
-window_start => 1,
-window_end => 1000,
-window_size => 50,
-read_coverage_avg => 100,
-read_coverage_min => 0,
-read_coverage_max => 200,
-sample => $individual);
print $rcc->start(), "-", $rcc->end(), "\n";
Description
This is a class representing the read coverage collection information
from the ensembl-variation database. A ReadCoverageCollection behaves as any other Ensembl feature collection.
Object for storing read_coverage scores. The scores are averaged (also the minimum and maximum scores) over different window sizes to speed up drawing over large regions. The scores are packed as integer and stored in a string
See
Bio::EnsEMBL::Feature.
Methods
Methods description
Arg [-ADAPTOR] : see superclass constructor Arg [-START] : start relative to the slice,see superclass constructor Arg [-END] : end relative to the slice,see superclass constructor Arg [-STRAND] : 1 or -1, same as strand for the slice,see superclass constructor Arg [-SLICE] : see superclass constructor Arg [-SEQ_REGION_START] : start relative to chromosome,see superclass constructor Arg [-SEQ_REGION_END] : end relative to chromosome,see superclass constructor Arg [-SEQ_REGION_STRAND] : always 1, see superclass constructor int Arg [-SCORE_MIN] : average read_coverage for a window Arg [-SCORE_AVG] : minimum read_coverage for a window Arg [-SCORE_MAX] : maximum read_coverage for a window Arg [-SAMPLE_ID] : int - the individual in which the read_covarage is recorded Example : $rc = Bio::EnsEMBL::Variation::ReadCoverage->new (-start => 100, -end => 100, -slice => $slice, -window_size => 50, -sample_id => 1);
Description: Constructor. Instantiates a new ReadCoverageCollection object.
Returntype : Bio::EnsEMBL::Variation::ReadCoverageCollection
Exceptions : none
Caller : general
Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the read_coverage_avg attribute to Example : $avg = $obj->read_coverage_avg(); Description : Getter/Setter for the score_avg attribute. the average read_coverage this feature has ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the read_coverage_max attribute to Example : $max = $obj->read_coverage_max(); Description : Getter/Setter for the read_coverage_max attribute. the maximum read_coverage this feature has ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the read_coverage_min attribute to Example : $min = $obj->read_coverage_min(); Description : Getter/Setter for the score_min attribute. the minimum read_coverage this feature has ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the sample_id attribute to Example : $sample_id = $obj->sample_id(); Description : Getter/Setter for the individual dbId attribute. the individual dbId this feature has been seen in the genome ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the window_end attribute to Example : $depth = $obj->window_end(); Description : Getter/Setter for the window_end attribute. the window end this feature has been seen in the genome ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the window_size attribute to Example : $window_size = $obj->window_size(); Description : Getter/Setter for the window_size attribute. the window size this feature has been seen in the genome ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the window_start attribute to Example : $window_start = $obj->window_start(); Description : Getter/Setter for the window_start attribute. the window start this feature has been seen in the genome ReturnType : int Exceptions : none Caller : general Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the y_axiss_max attribute to Example : $y_axis_max = $obj->y_axis_max(); Description : Getter/Setter for the maximum of read_coverage for the collection of feature.
ReturnType : int
Exceptions : none
Caller : general
Status : At Risk |
Arg[1] : int $newval (optional) The new value to set the y_axiss_min attribute to Example : $y_axis_min = $obj->y_axis_min(); Description : Getter/Setter for the minimum of read_coverage for the collection of feature.
ReturnType : int
Exceptions : none
Caller : general
Status : At Risk |
Methods code
sub new
{ my $caller = shift;
my $class = ref($caller) || $caller;
my $self = $class->SUPER::new(@_);
my ($window_size,$window_start,$window_end,$sample_id,$read_coverage_avg,$read_coverage_min,$read_coverage_max,$y_axis_min,$y_axis_max) =
rearrange([qw(WINDOW_SIZE WINDOW_START WINDOW_END SAMPLE_ID READ_COVERAGE_AVG READ_COVERAGE_MIN READ_COVERAGE_MAX Y_AXIS_MIN Y_AXIS_MAX)], @_);
$self->{'window_size'} = $window_size;
$self->{'window_start'} = $window_start;
$self->{'window_end'} = $window_end;
$self->{'sample_id'} = $sample_id;
$self->{'read_coverage_avg'} = $read_coverage_avg;
$self->{'read_coverage_min'} = $read_coverage_min;
$self->{'read_coverage_max'} = $read_coverage_max;
$self->{'y_axis_min'} = $y_axis_min;
$self->{'y_axis_max'} = $y_axis_max;
return $self; } |
sub new_fast
{
my ($class, $hashref) = @_;
return bless $hashref, $class; } |
sub read_coverage_avg
{ my $self = shift;
return $self->{'read_coverage_avg'} = shift if (@_);
return $self->{'read_coverage_avg'}; } |
sub read_coverage_max
{ my $self = shift;
return $self->{'read_coverage_max'} = shift if (@_);
return $self->{'read_coverage_max'}; } |
sub read_coverage_min
{ my $self = shift;
return $self->{'read_coverage_min'} = shift if (@_);
return $self->{'read_coverage_min'}; } |
sub sample_id
{ my $self = shift;
return $self->{'sample_id'} = shift if (@_);
return $self->{'sample_id'}; } |
sub window_end
{ my $self = shift;
return $self->{'window_end'} = shift if (@_);
return $self->{'window_end'}; } |
sub window_size
{ my $self = shift;
return $self->{'window_size'} = shift if (@_);
return $self->{'window_size'}; } |
sub window_start
{ my $self = shift;
return $self->{'window_start'} = shift if (@_);
return $self->{'window_start'}; } |
sub y_axis_max
{ my $self = shift;
return $self->{'y_axis_max'} = shift if (@_);
return $self->{'y_axis_max'};
}
1; } |
sub y_axis_min
{ my $self = shift;
return $self->{'y_axis_min'} = shift if (@_);
return $self->{'y_axis_min'}; } |
General documentation
This module was written by Yuan Chen