Bio::Das::ProServer::SourceAdaptor::Transport
efg_transport
Toolbar
Summary
efg_transport.pm
Package variables
No package variables defined.
Included modules
Bio::Das::ProServer::SourceAdaptor::Transport::generic
Data::Dumper
Inherit
Bio::Das::ProServer::SourceAdaptor::Transport::generic
Synopsis
No synopsis!
Description
Transport module to retrieve REsult features from efg database
Methods
DESTROY | No description | Code |
adaptor | No description | Code |
chromosome_by_region | No description | Code |
disconnect | No description | Code |
Methods description
None available.
Methods code
sub DESTROY
{ my $self = shift;
$self->disconnect();
}
1; } |
sub adaptor
{ my $self = shift;
unless($self->{'_adaptor'}) {
my $host = $self->config->{'host'} || 'localhost';
my $port = $self->config->{'port'} || '3306';
my $dbname = $self->config->{'dbname'};
my $username = $self->config->{'username'} || 'ensro';
my $password = $self->config->{'password'} || '';
my $species = $self->config->{'species'} || 'homo_sapiens';
my $data_version = $self->config->{'data_version'};
$self->{'_adaptor'} ||= Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor->new
(
-host => $host,
-user => $username,
-dbname => $dbname,
-species => $species,
-pass => $password,
-port => $port,
);
print Dumper $self->{'_adaptor'} if ($self->{'debug'});
return $self->{'_adaptor'};
} } |
sub chromosome_by_region
{ my ($self, $chr, $start, $end) = @_;
my $slice = $self->adaptor->get_SliceAdaptor->fetch_by_region
(
'chromosome', $chr, $start, $end
);
return $slice; } |
sub disconnect
{ my $self = shift;
return unless (exists $self->{'_adaptor'});
$self->{'_adaptor'}->disconnect();
delete $self->{'_adaptor'};
$self->{'debug'} and print STDERR "$self PERFORMED DBA DISCONNECT\n"; } |
General documentation
Stefan Graf, Ensembl Functional Genomics