Bio::EnsEMBL::LookUp Class Reference

List of all members.


Class Summary

Synopsis

# default creation using latest public release of Ensembl Genomes
my $lookup = Bio::EnsEMBL::LookUp->new();

Description

This module is a helper that provides additional methods to aid navigating a registry of >30000 species across >200 databases. 
It does not replace the Registry but provides some additional methods for finding species e.g. by searching for species that 
have an alias that match a regular expression, or species which are derived from a specific ENA/INSDC accession, or species
that belong to a particular part of the taxonomy. 

There are a number of ways of creating a lookup but the simplest is to use the default setting of the latest publicly 
available Ensembl Genomes databases: 

	my $lookup = Bio::EnsEMBL::LookUp->new();

Once a lookup has been created, there are various methods to retreive DBAdaptors for species of interest:

1. To find species by name - all DBAdaptors for species with a name or alias matching the supplied string:

	$dbas = $lookup->get_by_name_exact('Escherichia coli str. K-12 substr. MG1655');

2. To find species by name pattern - all DBAdaptors for species with a name or alias matching the supplied regexp:

	$dbas = $lookup->get_by_name_exact('Escherichia coli .*);

3. To find species with the supplied taxonomy ID:

	$dbas = $lookup->get_all_by_taxon_id(388919);
	
4. To find DBAs for all descendants of a node:

	$dbas = $lookup->get_all_by_taxon_branch(511145);

The retrieved DBAdaptors can then be used as normal e.g.

	for my $gene (\@{$dba->get_GeneAdaptor()->fetch_all_by_biotype('protein_coding')}) {
		print $gene->external_name."\n";
	}

If a DBAdaptor is not likely to be used again, it should be disconnected to avoid running out of connections 
(a disconnected DBAdaptor can be used again without having to be explicitly reconnected):
    
    $dba->dbc()->disconnect_if_idle();

Once retrieved, the arguments needed for constructing a DBAdaptor directly can be dumped for later use e.g.

	my $args = $lookup->dba_to_args($dba);
	... store and retrieve $args for use in another script ... 
	my $resurrected_dba = Bio::EnsEMBL::DBSQL::DBAdaptor->new(\@$args);

Local implementation


The default implementation of LookUp is a remoting implementation that uses a MySQL database backend
to look up genome information. The previous implementation loaded an internal hash from either a JSON file
(remote or local) or by processing the contents of the Registry. 

This implementation is still available, but has been renamed Bio::EnsEMBL::LookUp::LocalLookUp and should
be constructed directly.
  

Definition at line 78 of file LookUp.pm.

Available Methods

public AUTOLOAD ()
public DESTROY ()
public new ()
public register_all_dbs ()
public uniq ()

Method Documentation

public Bio::EnsEMBL::LookUp::AUTOLOAD ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::LookUp::DESTROY ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::LookUp::new ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::LookUp::register_all_dbs ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::LookUp::uniq ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file: