Bio::EnsEMBL::ExternalData::Haplotype Pattern
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Pattern - DESCRIPTION of Object
  This object represents a database of haplotype patterns.
Package variables
No package variables defined.
Included modules
Bio::Root::Object
Inherit
Bio::Root::Object
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
alt_baseDescriptionCode
alt_callsDescriptionCode
block_idDescriptionCode
countDescriptionCode
idDescriptionCode
newDescriptionCode
patternDescriptionCode
pattern_frequencyDescriptionCode
pattern_idDescriptionCode
pattern_lengthDescriptionCode
ref_baseDescriptionCode
ref_callsDescriptionCode
samplesDescriptionCode
unclassified_samplesDescriptionCode
Methods description
alt_basecode    nextTop
 Title   : alt_base
Usage :
Function: get/set the alternative sequence base for the pattern
Example :
Returns :
Args :
alt_callscodeprevnextTop
 Title   : alt_base
Usage :
Function: get/set the no calls of the alternative sequence base for the pattern
Example :
Returns :
Args :
block_idcodeprevnextTop
 Title   : block_id
Usage :
Function: get/set the block id of the Haplotype
Example :
Returns :
Args :
countcodeprevnextTop
 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 :
idcodeprevnextTop
 Title   : id
Usage :
Function: get/set the display id of the pattern
Example :
Returns :
Args :
newcodeprevnextTop
 Title   : new
Usage : not intended for general use.
Function:
Example :
Returns : a haplotype pattern - caller may also fill using methods
Args :
patterncodeprevnextTop
 Title   : pattern
Usage :
Function: get/set the consensus pattern of bases for this pattern
Example :
Returns :
Args :
pattern_frequencycodeprevnextTop
 Title   : pattern_frequency
Usage :
Function: get/set the consensus pattern frequency for this pattern
Example :
Returns :
Args :
pattern_idcodeprevnextTop
 Title   : pattern_id
Usage :
Function: get/set the display id of the pattern
Example :
Returns :
Args :
pattern_lengthcodeprevnextTop
 Title   : pattern_length
Usage : read only
Function: get the length for the pattern
Example :
Returns :
Args :
ref_basecodeprevnextTop
 Title   : ref_base
Usage :
Function: get/set the reference sequence base for the pattern
Example :
Returns :
Args :
ref_callscodeprevnextTop
 Title   : ref_calls
Usage :
Function: get/set the no calls of reference sequence base for the pattern
Example :
Returns :
Args :
samplescodeprevnextTop
 Title   : samples
Usage :
Function: store a ref to a hash of sample data
Example :
Returns :
Args : ref to a hash of sample=>patterns
unclassified_samplescodeprevnextTop
 Title   : unclassified_samples
Usage :
Function: store a ref to a hash of unclassified sample data
Example :
Returns :
Args :
Methods code
alt_basedescriptionprevnextTop
sub alt_base {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'alt_base'} = $value;
    }
    return $self->{'alt_base'};
}
alt_callsdescriptionprevnextTop
sub alt_calls {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'alt_calls'} = $value;
    }
    return $self->{'alt_calls'};
}

1;
}
block_iddescriptionprevnextTop
sub block_id {
    my ($self,$value) = @_;
    if( defined $value) {
	    $self->{'block_id'} = $value;
    }
    return $self->{'block_id'};
}
countdescriptionprevnextTop
sub count {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'count'} = $value;
    }
    return $self->{'count'};
}
iddescriptionprevnextTop
sub id {
    my ($self,$value) = @_;
    if( defined $value) {
	    $self->pattern_id($value);
    }
    return $self->pattern_id();
}
newdescriptionprevnextTop
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);
}
patterndescriptionprevnextTop
sub pattern {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'pattern'} = $value;
    }
    return $self->{'pattern'};
}
pattern_frequencydescriptionprevnextTop
sub pattern_frequency {
    my ($self,$value) = @_;
    if( defined $value) {
        $self->{'pattern_frequency'} = $value;
    }
    return $self->{'pattern_frequency'};
}
pattern_iddescriptionprevnextTop
sub pattern_id {
    my ($self,$value) = @_;
    if( defined $value) {
	    $self->{'pattern_id'} = $value;
    }
    return $self->{'pattern_id'};
}
pattern_lengthdescriptionprevnextTop
sub pattern_length {
    my ($self) = @_;
    return (length($self->{'pattern'}));
}
ref_basedescriptionprevnextTop
sub ref_base {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'ref_base'} = $value;
    }
    return $self->{'ref_base'};
}
ref_callsdescriptionprevnextTop
sub ref_calls {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'ref_calls'} = $value;
    }
    return $self->{'ref_calls'};
}
samplesdescriptionprevnextTop
sub samples {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'samples'} = $value;
    }
    return $self->{'samples'};
}
unclassified_samplesdescriptionprevnextTop
sub unclassified_samples {
    my ($self,$value) = @_;
    if( defined $value) {
	$self->{'unclassified_samples'} = $value;
    }
    return $self->{'unclassified_samples'};
}
General documentation
CONTACTTop
 Tony Cox <Lavc@sanger.ac.uk>
APPENDIXTop
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _