Bio::EnsEMBL::ExternalData::Glovar
BaseComposition
Toolbar
Summary
Bio::EnsEMBL::ExternalData::Glovar::BaseComposition -
This object represents the base composition as provided by Glovar
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
my $base_comp = new Bio::EnsEMBL::ExternalData::Glovar::BaseComposition;
$base_comp->postition('1000');
$base_comp->genomic_base('A');
Description
This module holds data describing the base composition for each base in the
genome that has been covered by the Glovar project.
Methods
Methods description
Arg[1] : (optional) hashref - alleles and their frequencies Example : $base_comp->alleles({'A'=>3,'C'=>1,'G'=>0,'T'=>10}); Description : getter/setter for allele distribution Return type : hashref - alleles and their freqencies Exceptions : none Caller : general |
Arg[1] : (optional) Int - genomic end position Example : $base_comp->position('1000'); Description : getter/setter for genomic end position of BaseComposition object. Identical to start position (since lenght of feature is always 1) Return type : Int - genomic end position Exceptions : none Caller : general |
Arg[1] : (optional) hashref - ethnicities and their read frequencies Example : $base_comp->ethnicity({'Asian'=>2,'Caucasian'=>5}); Description : getter/setter for ethnicity of the reads the variation was observed Return type : hashref - ethnicities and their frequencies Exceptions : none Caller : general |
Arg[1] : (optional) String - genomic base Example : $base_comp->genomic_base('A'); Description : getter/setter for genomic base of the variation (allele in reference sequence) Return type : String - genomic base Exceptions : none Caller : general |
Arg[1] : none Example : see SYNOPSIS Description : constructor method for a Bio::EnsEMBL::ExternalData::Glovar::BaseComposition object Return type : Bio::EnsEMBL::ExternalData::Glovar::BaseComposition Exceptions : none Caller : general |
Arg[1] : hashref - initial object attributes Example : my $base_comp = new Bio::EnsEMBL::ExternalData::Glovar::BaseComposition({ 'position' => 1, 'genomic_base' => 'A', 'alleles' => { T => 20, G => 10, A => 0, C => 2 }, 'ethnicity' => { Asian => 9, Caucasian => 15, }, '_gsf_strand' => 1, }); Description : fast constructor method for a Bio::EnsEMBL::ExternalData::Glovar::BaseComposition object. Blesses the hashref supplied into your object Return type : Bio::EnsEMBL::ExternalData::Glovar::BaseComposition Exceptions : none Caller : general |
Arg[1] : (optional) Int - genomic position Example : $base_comp->position('1000'); Description : getter/setter for genomic position of BaseComposition object Return type : Int - genomic position Exceptions : none Caller : general |
Arg[1] : (optional) Int - genomic start position Example : $base_comp->start('1000'); Description : getter/setter for genomic start position of BaseComposition object Return type : Int - genomic start position Exceptions : none Caller : general |
Methods code
sub alleles
{ my($self,$arg) = @_;
$self->{'alleles'} = $arg if(defined $arg);
return $self->{'alleles'}; } |
sub end
{ my ($self,$arg) = @_;
$self->position($arg) if(defined $arg);
return $self->position(); } |
sub ethnicity
{ my ($self, $arg) = @_;
$self->{'ethnicity'} = $arg if (defined $arg);
return $self->{'ethnicity'};
}
1; } |
sub genomic_base
{ my ($self, $arg) = @_;
$self->{'genomic_base'} = $arg if (defined $arg);
return $self->{'genomic_base'}; } |
sub new
{ my $invocant = shift;
my $class = ref($invocant) || $invocant;
my $self = {
'position' => 0,
'genomic_base' => 'undef',
'alleles' => {},
'ethnicity' => {},
'_gsf_strand' => 1,
@_,
};
bless $self, $class;
return $self; } |
sub new_fast
{ my $class = shift;
my $hashref = shift;
return bless $hashref, $class; } |
sub position
{ my ($self,$arg) = @_;
if(defined $arg){
$self->{'position'} = $arg;
}
return $self->{'position'}; } |
sub start
{ my ($self,$arg) = @_;
$self->position($arg) if(defined $arg);
return $self->position(); } |
General documentation
This code is distributed under an Apache style licence:
Please see
/code_licence.html for details