Bio::EnsEMBL::ExternalData::Haplotype
Pattern
Toolbar
Summary
Pattern - DESCRIPTION of Object
This object represents a database of haplotype patterns.
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Bio::EnsEMBL::ExternalData::Haplotype::HaplotypeAdaptor;
use Bio::EnsEMBL::ExternalData::Haplotype::Haplotype;
use Bio::EnsEMBL::ExternalData::Haplotype::Pattern;
$hapdb = Bio::EnsEMBL::DBSQL::DBAdaptor->new(
-user => 'ensro',
-dbname => 'haplotype_5_28',
-host => 'ecs3d',
-driver => 'mysql',
);
my $hap_adtor = Bio::EnsEMBL::ExternalData::Haplotype::HaplotypeAdaptor->new($hapdb);
$hap = $hap_adtor->get_Haplotype_by_id('B10045'); # Haplotype id
### You can add the HaplotypeAdaptor as an 'external adaptor' to the 'main'
### Ensembl database object, then use it as:
$ensdb = Bio::EnsEMBL::DBSQL::DBAdaptor->new( ... );
$ensdb->add_ExternalAdaptor('haplotype', $hap_adtor);
# then later on, elsewhere:
$hap_adtor = $ensdb->get_ExternalAdaptor('haplotype');
# also available:
$ensdb->list_ExternalAdaptors();
$ensdb->remove_ExternalAdaptor('haplotype');
Description
This module is an entry point into a database of haplotypes,
The objects can only be read from the database, not written. (They are
loaded ussing a separate perl script).
For more info, see Haplotype.pm
Methods
Methods description
Title : alt_base Usage : Function: get/set the alternative sequence base for the pattern Example : Returns : Args : |
Title : alt_base Usage : Function: get/set the no calls of the alternative sequence base for the pattern Example : Returns : Args : |
Title : block_id Usage : Function: get/set the block id of the Haplotype Example : Returns : Args : |
Title : count Usage : Function: get/set the count for the pattern : this is number of chromosomes that were observed to be consistent : with this pattern Example : Returns : Args : |
Title : id Usage : Function: get/set the display id of the pattern Example : Returns : Args : |
Title : new Usage : not intended for general use. Function: Example : Returns : a haplotype pattern - caller may also fill using methods Args : |
Title : pattern Usage : Function: get/set the consensus pattern of bases for this pattern Example : Returns : Args : |
Title : pattern_frequency Usage : Function: get/set the consensus pattern frequency for this pattern Example : Returns : Args : |
Title : pattern_id Usage : Function: get/set the display id of the pattern Example : Returns : Args : |
Title : pattern_length Usage : read only Function: get the length for the pattern Example : Returns : Args : |
Title : ref_base Usage : Function: get/set the reference sequence base for the pattern Example : Returns : Args : |
Title : ref_calls Usage : Function: get/set the no calls of reference sequence base for the pattern Example : Returns : Args : |
Title : samples Usage : Function: store a ref to a hash of sample data Example : Returns : Args : ref to a hash of sample=>patterns |
Title : unclassified_samples Usage : Function: store a ref to a hash of unclassified sample data Example : Returns : Args : |
Methods code
sub alt_base
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'alt_base'} = $value;
}
return $self->{'alt_base'}; } |
sub alt_calls
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'alt_calls'} = $value;
}
return $self->{'alt_calls'};
}
1; } |
sub block_id
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'block_id'} = $value;
}
return $self->{'block_id'}; } |
sub count
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'count'} = $value;
}
return $self->{'count'}; } |
sub id
{ my ($self,$value) = @_;
if( defined $value) {
$self->pattern_id($value);
}
return $self->pattern_id(); } |
sub new
{
my ($class, $adaptor, $pattern_id, $count, $pattern, $pattern_frequency) = @_;
my $self = {};
bless $self,$class;
$self->{'_adaptor'} = $adaptor;
$self->{'pattern_id'} = $pattern_id;
$self->{'count'} = $count;
$self->{'pattern'} = uc($pattern);
$self->{'pattern_frequency'} = $pattern_frequency;
return($self); } |
sub pattern
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'pattern'} = $value;
}
return $self->{'pattern'}; } |
sub pattern_frequency
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'pattern_frequency'} = $value;
}
return $self->{'pattern_frequency'}; } |
sub pattern_id
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'pattern_id'} = $value;
}
return $self->{'pattern_id'}; } |
sub pattern_length
{ my ($self) = @_;
return (length($self->{'pattern'})); } |
sub ref_base
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'ref_base'} = $value;
}
return $self->{'ref_base'}; } |
sub ref_calls
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'ref_calls'} = $value;
}
return $self->{'ref_calls'}; } |
sub samples
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'samples'} = $value;
}
return $self->{'samples'}; } |
sub unclassified_samples
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'unclassified_samples'} = $value;
}
return $self->{'unclassified_samples'}; } |
General documentation
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _