NAME

Bio::Das::ProServer::SourceAdaptor::Transport::ensembl

VERSION

$LastChangedRevision: 453 $

SYNOPSIS

A transport for using the Registry to retrieve Ensembl data.

DESCRIPTION

This class is a Transport that provides an interface to the Ensembl API. It uses the Ensembl Resistry to determine the location of the appropriate databases, and can be used in a species specific or cross-species manner. The main advantage of using this Transport is that the registry automatically provides access to the latest data available to the installed API.

SUBROUTINES/METHODS

init - Post-construction initialisation.

$oTransport->init();

Loads the registry from the Ensembl database, and applies a custom database
override if specified.

adaptor - Gets an Ensembl adaptor.

$oAdaptor = $oTransport->adaptor();
$oAdaptor = $oTransport->adaptor('human', 'core');

Arguments:
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  L<Bio::EnsEMBL::DBSQL::DBAdaptor>

slice_adaptor - Gets an Ensembl slice adaptor.

$oAdaptor = $oTransport->slice_adaptor();
$oAdaptor = $oTransport->slice_adaptor('human', 'core');

Arguments:
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  L<Bio::EnsEMBL::DBSQL::SliceAdaptor>

gene_adaptor - Gets an Ensembl gene adaptor.

$oAdaptor = $oTransport->gene_adaptor();
$oAdaptor = $oTransport->gene_adaptor('human', 'core');

Arguments:
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  L<Bio::EnsEMBL::DBSQL::GeneAdaptor>

chromosome_by_region - Gets a chromosome slice.

$oSlice = $oTransport->chromosome_by_region('X');
$oSlice = $oTransport->chromosome_by_region('X', 123453, 132424);
$oSlice = $oTransport->chromosome_by_region('X', 123453, 132424, 'human', 'core');

Arguments:
  chromosome #   (required)
  start          (optional)
  end            (optional)
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  L<Bio::EnsEMBL::Slice>

chromosomes - Gets all chromosomes.

$aSlices = $oTransport->chromosomes();
$aSlices = $oTransport->chromosomes('human', 'core');

Arguments:
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  listref of L<Bio::EnsEMBL::Slice> objects

gene_by_id - Gets a gene.

$oGene = $oTransport->gene_by_id('ENSG00000139618'); # BRCA2
$oGene = $oTransport->gene_by_id('ENSG00000139618', 'human', 'core');

Arguments:
  gene stable ID (required)
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  L<Bio::EnsEMBL::Gene>

genes - Gets all genes.

$aGenes = $oTransport->genes();
$aGenes = $oTransport->genes('human', 'core');

Arguments:
  species        (optional, default configured in INI or 'human')
  database group (optional, default configured in INI or 'core')
Returns:
  listref of L<Bio::EnsEMBL::Gene> objects

version - Gets the Ensembl API's release number.

$sVersion = $oTransport->version();

last_modified - Gets a last modified date from the database.

$sVersion = $oTransport->version();

disconnect - ProServer hook to disconnect all connected databases.

$oTransport->disconnect();

CONFIGURATION AND ENVIRONMENT

Configured as part of each source's ProServer 2 INI file.

The 'default database' is configured using these properties:
  species  (defaults to human)
  group    (defaults to core)

A specific database may be overridden using these properties:
  dbname
  host     (defaults to localhost)
  port     (defaults to 3306)
  username (defaults to ensro)
  password

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

Carp
Bio::Das::ProServer::SourceAdaptor::Transport::generic
Bio::EnsEMBL::Registry
Bio::EnsEMBL::DBSQL::DBAdaptor

INCOMPATIBILITIES

None reported

BUGS AND LIMITATIONS

None reported

REFERENCES

http://www.ensembl.org/info/software/Pdoc/ensembl/ Ensembl API

AUTHOR

Andy Jenkinson <andy.jenkinson@ebi.ac.uk>

LICENSE AND COPYRIGHT

Copyright (c) 2007 EMBL-EBI