Public Member Functions | |
public | new () |
public | register_all_dbs () |
public | AUTOLOAD () |
public | DESTROY () |
public | uniq () |
This module is a helper that provides additional methods to aid navigating a registry of >6000 species across >25 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. In coordination with a taxonomy node adaptor to get DBAs for all descendants of a node: my $node = $node_adaptor->fetch_by_taxon_id(511145); for my $child (\@{$node_adaptor->fetch_descendants($node)}) { my $dbas = $lookup->get_all_by_taxon_id($node->taxon_id()) if(defined $dbas) { for my $dba (\@{$dbas}) { # do something with the $dba } } } 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"; } 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);
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.
public Bio::EnsEMBL::LookUp::AUTOLOAD | ( | ) |
Undocumented method
public Bio::EnsEMBL::LookUp::DESTROY | ( | ) |
Undocumented method
public Bio::EnsEMBL::LookUp::new | ( | ) |
Undocumented method
public Bio::EnsEMBL::LookUp::register_all_dbs | ( | ) |
Undocumented method
public Bio::EnsEMBL::LookUp::uniq | ( | ) |
Undocumented method