Bio::EnsEMBL::ExternalData::Disease
Disease
Toolbar
Summary
Bio::EnsEMBL::ExternalData::Disease::Disease
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
# Instantiate an empty object.
$disease=new Bio::EnsEMBL::ExternalData::Disease::Disease;
$disease->name('...');
$disease->add_Location($location); # add DiseaseLocation object.
# Fetch objects by DBHandler.
# See DBHandler docs.
# Usage
my @locations=$disease->each_Location;
Description
This object represents a disease, a container for DiseaseLocation objects
Methods
Methods description
Title : add_Location Usage : Function: attach a DiseaseLocation object. Example : Returns : Args : |
Title : each_Location Usage : Function: Example : Returns : An array of DiseaseLocation objects. Args : [None] |
Title : name Usage : Function: Get/set for disease brief. Refer to NCBI OMIM records Example : Returns : Args : |
Methods code
sub add_Location
{
my ($self,$location)=@_;
if( ! $location->isa("Bio::EnsEMBL::ExternalData::Disease::DiseaseLocation") ) {
$self->throw("$location is not a Bio::EnsEMBL::Disease::DiseaseLocation!");
}
push(@{$self->{'_disease_location_array'}},$location); } |
sub each_Location
{ my ($self) = @_;
return @{$self->{'_disease_location_array'}};
}
1; } |
sub name
{
my ($self,$value)=@_;
if( defined $value) {$self->{'name'} = $value;}
return $self->{'name'}; } |
sub new
{
my($class,@locations) = @_;
my $self = bless {}, $class;
$self->{'_disease_location_array'} = [];
foreach my $location (@locations){$self->add_location($location);}
return $self; } |
General documentation
AUTHOR - Arek Kasprzyk | Top |
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _