ensembl-hive  2.6
Bio::EnsEMBL::Registry Class Reference

Public Member Functions

public Int load_all ()
 
public void clear ()
 
public void add_db ()
 
public Adaptor remove_db ()
 
public Adaptor get_db ()
 
public Adaptor get_all_db_adaptors ()
 
public void add_DBAdaptor ()
 
public DBAdaptor get_DBAdaptor ()
 
public List get_all_DBAdaptors ()
 
public Reference get_all_DBAdaptors_by_connection ()
 
public Reference get_all_DBAdaptors_by_dbname ()
 
public void remove_DBAdaptor ()
 
public reset_DBAdaptor ()
 
public void add_DNAAdaptor ()
 
public Adaptor get_DNAAdaptor ()
 
public void add_adaptor ()
 
public void add_switchable_adaptor ()
 
public Boolean has_switchable_adaptor ()
 
public The remove_switchable_adaptor ()
 
public Adaptor get_adaptor ()
 
public Ref get_all_adaptors ()
 
public void add_alias ()
 
public void remove_alias ()
 
public Species get_alias ()
 
public ArrayRef get_all_aliases ()
 
public Boolean alias_exists ()
 
public void set_disconnect_when_inactive ()
 
public void set_reconnect_when_lost ()
 
public void disconnect_all ()
 
public get_DBAdaptor_count ()
 
public void change_access ()
 
public Int load_registry_from_url ()
 
public Int load_registry_from_db ()
 
protected String _group_to_adaptor_class ()
 
public void find_and_add_aliases ()
 
public Int load_registry_from_multiple_dbs ()
 
public void set_default_track ()
 
public Int default_track ()
 
public void add_new_tracks ()
 
public Int no_version_check ()
 
public Boolean no_cache_warnings ()
 
public Int version_check ()
 
public Listref get_all_species ()
 
public Array get_species_and_object_type ()
 
protected _lookup_db_get_species_and_object_type ()
 
public stable_id_lookup ()
 
public archive_id_lookup ()
 
protected _core_get_species_and_object_type ()
 
protected _core_get_species_and_object_type_worker ()
 
protected _compara_get_species_and_object_type ()
 
protected _compara_get_species_and_object_type_worker ()
 

Detailed Description

Synopsis

my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_all("configuration_file");
$gene_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Gene' );

Description

All Adaptors are stored/registered using this module. This module should
then be used to get the adaptors needed.

The registry can be loaded from a configuration file using the load_all
method.

If a filename is passed to load_all then this is used.  Else if the
environment variable ENSEMBL_REGISTRY is set to the name on an existing
configuration file, then this is used.  Else if the file .ensembl_init
in your home directory exist, it is used.

For the Web server ENSEMBL_REGISTRY should be set in SiteDefs.pm.  This
will then be passed on to load_all.


The registry can also be loaded via the method load_registry_from_db
which given a database host will load the latest versions of the Ensembl
databases from it.

The four types of registries are for db adaptors, dba adaptors, dna
adaptors and the standard type.

db


These are registries for backwards compatibility and enable the
subroutines to add other adaptors to connections.

e.g. get_all_db_adaptors, get_db_adaptor, add_db_adaptor,
remove_db_adaptor are the old DBAdaptor subroutines which are now
redirected to the Registry.

So if before we had

  my $sfa = $self->adaptor()->db()->get_db_adaptor('blast');

We now want to change this to

  my $sfa =
    Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "blast" );


DBA


These are the stores for the DBAdaptors

The Registry will create all the DBConnections needed now if you set up
the configuration correctly. So instead of the old commands like

  my $db           = Bio::EnsEMBL::DBSQL::DBAdaptor->new(...);
  my $exon_adaptor = $db->get_ExonAdaptor;

we should now have just

  my $exon_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "exon" );


DNA


This is an internal Registry and allows the configuration of a dnadb.
An example here is to set the est database to get its dna data from the
core database.

  ## set the est db to use the core for getting dna data.
  # Bio::EnsEMBL::Utils::ConfigRegistry->dnadb_add( "Homo Sapiens",
  #   "core", "Homo Sapiens", "est" );


adaptors


This is the registry for all the general types of adaptors like
GeneAdaptor, ExonAdaptor, Slice Adaptor etc.

These are accessed by the get_adaptor subroutine i.e.

  my $exon_adaptor =
    Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "exon" );

Definition at line 113 of file Registry.pm.

Member Function Documentation

◆ _compara_get_species_and_object_type()

protected Bio::EnsEMBL::Registry::_compara_get_species_and_object_type ( )

Undocumented method

Code:
click to view

◆ _compara_get_species_and_object_type_worker()

protected Bio::EnsEMBL::Registry::_compara_get_species_and_object_type_worker ( )

Undocumented method

Code:
click to view

◆ _core_get_species_and_object_type()

protected Bio::EnsEMBL::Registry::_core_get_species_and_object_type ( )

Undocumented method

Code:
click to view

◆ _core_get_species_and_object_type_worker()

protected Bio::EnsEMBL::Registry::_core_get_species_and_object_type_worker ( )

Undocumented method

Code:
click to view

◆ _group_to_adaptor_class()

protected String Bio::EnsEMBL::Registry::_group_to_adaptor_class ( )
  Arg [1]       : The group you wish to decode to an adaptor class
  Example       :
  Description   : Has an internal lookup of groups to their adaptor classes
  Returntype    : String
  Exceptions    : Thrown if the group is unknown
  Status        : Stable
 
Code:
click to view

◆ _lookup_db_get_species_and_object_type()

protected Bio::EnsEMBL::Registry::_lookup_db_get_species_and_object_type ( )

Undocumented method

Code:
click to view

◆ add_adaptor()

public void Bio::EnsEMBL::Registry::add_adaptor ( )
  Arg [1]    : name of the species to add the adaptor to in the registry.
  Arg [2]    : name of the group to add the adaptor to in the registry.
  Arg [3]    : name of the type to add the adaptor to in the registry.
  Arg [4]    : The DBAdaptor to be added to the registry.
  Arg [5]    : (optional) Set to allow overwrites of existing adaptors.
  Example    :
Bio::EnsEMBL::Registry->add_adaptor("Human", "core", "Gene", $adap);
  Returntype : none
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

◆ add_alias()

public void Bio::EnsEMBL::Registry::add_alias ( )
  Arg [1]    : name of the species to add alias for
  Arg [2]    : name of the alias
  Example    :
Bio::EnsEMBL::Registry->add_alias("Homo Sapiens","Human");
  Description: add alternative name for the species.
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ add_db()

public void Bio::EnsEMBL::Registry::add_db ( )
  Arg [1]    : db (DBAdaptor) to add adaptor to.
  Arg [2]    : name of the name to add the adaptor to in the registry.
  Arg [3]    : The adaptor to be added to the registry.
  Example    :
Bio::EnsEMBL::Registry->add_db($db, "lite", $dba);
  Returntype : none
  Exceptions : none
  Status     : At Risk.
             : This is here for backwards compatibility only and may
             : be removed eventually.  Solution is to make sure the
             : db and the adaptor have the same species and the call
             : is then no longer needed.
 
Code:
click to view

◆ add_DBAdaptor()

public void Bio::EnsEMBL::Registry::add_DBAdaptor ( )
  Arg [1]    : name of the species to add the adaptor to in the registry.
  Arg [2]    : name of the group to add the adaptor to in the registry.
  Arg [3]    : DBAdaptor to be added to the registry.
  Example    :
Bio::EnsEMBL::Registry->add_DBAdaptor("Human", "core", $dba);
  Returntype : none
  Exceptions : none
  caller     : internal
  Status     : Stable
 
Code:
click to view

◆ add_DNAAdaptor()

public void Bio::EnsEMBL::Registry::add_DNAAdaptor ( )
  Arg [1]    : name of the species to add the adaptor to in the registry.
  Arg [2]    : name of the group to add the adaptor to in the registry.
  Arg [3]    : name of the species to get the dna from
  Arg [4]    : name of the group to get the dna from
  Example    :
Bio::EnsEMBL::Registry->add_DNAAdaptor("Human", "estgene", "Human", "core");
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ add_new_tracks()

public void Bio::EnsEMBL::Registry::add_new_tracks ( )
  Will add new gene tracks to the configuration of the WEB server if they are
  not of the type default and the configuration already has genes in the display.
  Arg [1]    : hash of the default configuration of the web page
  Returntype : none
  Exceptions : none
  Called by  : UserConfig.pm
  Status     : At Risk.
 
Code:
click to view

◆ add_switchable_adaptor()

public void Bio::EnsEMBL::Registry::add_switchable_adaptor ( )
  Arg [1]    : String name of the species to add its switchable adaptor into the registry
  Arg [2]    : String name of the group to add its switchable adaptor into the registry
  Arg [3]    : String name of the type to add its switchable adaptor into the registry
  Arg [4]    : Reference switchable adaptor to insert
  Arg [5]    : Boolean override any existing switchable adaptor
  Example    :
Bio::EnsEMBL::Registry->add_switchable_adaptor("Human", "core", "Gene", $my_other_source);
  Returntype : None
  Exceptions : Thrown if a valid internal name cannot be found for the given 
               name. If thrown check your API and DB version. Also thrown if
               no type, group or switchable adaptor instance was given
 
Code:
click to view

◆ alias_exists()

public Boolean Bio::EnsEMBL::Registry::alias_exists ( )
  Arg [1]    : name of the possible alias to get species for
  Example    :
  Description: does the species name exist.
  Returntype : 1 if exists else 0
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ archive_id_lookup()

public Bio::EnsEMBL::Registry::archive_id_lookup ( )

Undocumented method

Code:
click to view

◆ change_access()

public void Bio::EnsEMBL::Registry::change_access ( )
  Will change the username and password for a set of databases.
  if host,user or database names are missing then these are not checked.
  So for example if you do not specify a database then ALL databases on
  the specified  host and port will be changed.
  Arg [1]    : name of the host to change access on
  Arg [2]    : port number to change access on
  Arg [3]    : name of the user to change access on
  Arg [4]    : name of the database to change access on
  Arg [5]    : name of the new user
  Arg [6]    : new password
  Example    :
  Description: change username and password on one or more databases
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ clear()

public void Bio::EnsEMBL::Registry::clear ( )
 Will clear the registry and disconnect from all databases.
  Example    :
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ default_track()

public Int Bio::EnsEMBL::Registry::default_track ( )
  Check flag to see if this is a default track
  Arg [1]    : name of the species to get the adaptors for in the registry.
  Arg [2]    : name of the type to get the adaptors for in the registry.
  Example    :
$merged = Bio::EnsEMBL::Registry->set_default_track("Human","core");
  Returntype : int 
  Exceptions : none
  Status     : At Risk.
 
Code:
click to view

◆ disconnect_all()

public void Bio::EnsEMBL::Registry::disconnect_all ( )
  Example    :
  Description: disconnect from all the databases.
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ find_and_add_aliases()

public void Bio::EnsEMBL::Registry::find_and_add_aliases ( )
  Arg [ADAPTOR] : (optional) Bio::EnsEMBL::DBSQL::DBAdaptor
                  The adaptor to use to retrieve aliases from.
  Arg [GROUP]   : (optional) string
                  The group you want to find aliases for. If not
                  given assumes all types.
  Arg [HANDLE]  : (optional) DBI database handle
                  A connected database handle to use instead of
                  the database handles stored in the DBAdaptors.
                  Bypasses the use of MetaContainer.
  Arg [SPECIES_SUFFIX]: (optional) string
                  This option will append the string to the species
                  name in the registry for all databases.
  Example       :
-ADAPTOR => $dba,
-GROUP => 'core'
);
  Description   : Looks in the meta container for each database for
                  an entry called "species.alias".  If any are found
                  then the species adaptor is registered to that
                  set of aliases.  This can work across any adaptor
                  which has a MetaContainer.  If no MetaContainer
                  can be returned from a given adaptor then no alias
                  searching is performed.
  Return type   : none
  Exceptions    : Throws if an alias is found in more than one species.
  Status        : Stable
 
Code:
click to view

◆ get_adaptor()

public Adaptor Bio::EnsEMBL::Registry::get_adaptor ( )
  Arg [1]     : name of the species to add the adaptor to in the registry.
  Arg [2]     : name of the group to add the adaptor to in the registry.
  Arg [3]     : name of the type to add the adaptor to in the registry.
  Example     :
$adap = Bio::EnsEMBL::Registry->get_adaptor("Human", "core", "Gene");
  Description : Finds and returns the specified adaptor. This method will also check
                if the species, group and adaptor combination satisfy a DNADB condition
                (and will return that DNADB's implementation). Also we check for 
                any available switchable adaptors and will return that if available.
  Returntype  : adaptor
  Exceptions  : Thrown if a valid internal name cannot be found for the given 
                name. If thrown check your API and DB version. Also thrown if
                no type or group was given
  Status      : Stable
 
Code:
click to view

◆ get_alias()

public Species Bio::EnsEMBL::Registry::get_alias ( )
  Arg [1]    : name of the possible alias to get species for
  Example    :
  Description: get proper species name.
  Returntype : species name
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ get_all_adaptors()

public Ref Bio::EnsEMBL::Registry::get_all_adaptors ( )
  Arg [SPECIES] : (optional) string 
                  species name to get adaptors for
  Arg [GROUP] : (optional) string 
                  group name to get adaptors for
  Arg [TYPE] : (optional) string 
                  type to get adaptors for
  Example    :
  Returntype : ref to list of adaptors
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ get_all_aliases()

public ArrayRef Bio::EnsEMBL::Registry::get_all_aliases ( )
  Arg [1]    : Species name to retrieve aliases for
               (may be an alias as well).
  Example    :
  Description: Returns all known aliases for a given species (but not the
               species name/alias that was given).
  Returntype : ArrayRef of all known aliases
  Exceptions : none
  Status     : Development
 
Code:
click to view

◆ get_all_db_adaptors()

public Adaptor Bio::EnsEMBL::Registry::get_all_db_adaptors ( )
  Arg [1]    : db (DBAdaptor) to get all the adaptors from.
  Example    :
  Returntype : adaptor
  Exceptions : none
  Status     : At Risk.
             : This is here for backwards compatibility only and
             : may be removed eventually.  Solution is to make
             : sure the dbs all have the same species then call
             : get_all_DBAdaptors(-species => "human");
 
Code:
click to view

◆ get_all_DBAdaptors()

public List Bio::EnsEMBL::Registry::get_all_DBAdaptors ( )
  Arg [SPECIES]: (optional) string 
                  species name to get adaptors for
  Arg [GROUP]  : (optional) string 
                  group name to get adaptors for
  Example      :
@dba =
@human_dbas =
-species => 'human'
) };
  Returntype   : list of DBAdaptors
  Exceptions   : none
  Status       : Stable
 
Code:
click to view

◆ get_all_DBAdaptors_by_connection()

public Reference Bio::EnsEMBL::Registry::get_all_DBAdaptors_by_connection ( )
  Arg [1]    : DBConnection used to find DBAdaptors
  Returntype : reference to list of DBAdaptors
  Exceptions : none
  Example    :
  Status     : Stable
 
Code:
click to view

◆ get_all_DBAdaptors_by_dbname()

public Reference Bio::EnsEMBL::Registry::get_all_DBAdaptors_by_dbname ( )
  Arg [1]    : string, name of database
  Returntype : reference to list of DBAdaptors
  Exceptions : none
  Example    :
  Status     : Stable
 
Code:
click to view

◆ get_all_species()

public Listref Bio::EnsEMBL::Registry::get_all_species ( )
  Arg [1]    : String group type, such as core, or otherfeatures
  Description: Method for getting all valid species names found in available
               databases. This excludes the ancestral sequence databases, and
               any species from a non-core database. Specifying a group allows
               the list to apply to non-core database types.
  Example    :
my @species_names = @{ $reg->get_all_species() };
  Returntype : Listref of species names
 
Code:
click to view

◆ get_db()

public Adaptor Bio::EnsEMBL::Registry::get_db ( )
  Arg [1]    : db (DBAdaptor) to get adaptor from.
  Arg [2]    : name to get the adaptor for in the registry.
  Example    :
my $db = Bio::EnsEMBL::Registry->get_db("Human", "core", "lite");
  Returntype : adaptor
  Exceptions : See get_DBAdaptor()
  Status     : At Risk.
             : This is here for backwards compatibility only and may
             : be removed eventually.  Solution is to make sure the
             : db and the adaptor have the same species then call
             : get_DBAdaptor instead.
 
Code:
click to view

◆ get_DBAdaptor()

public DBAdaptor Bio::EnsEMBL::Registry::get_DBAdaptor ( )
  Arg [1]    : name of the species to get the adaptor for in the registry.
  Arg [2]    : name of the group to get the adaptor for in the registry.
  Arg [3]    : if set will not give warnings when looking for alias.
  Example    :
$dba = Bio::EnsEMBL::Registry->get_DBAdaptor("Human", "core");
  Returntype : DBAdaptor
  Exceptions : If $species is not defined and if no valid internal name 
               could be found for $species. If thrown check your API and DB
               version 
  Status     : Stable
 
Code:
click to view

◆ get_DBAdaptor_count()

public Bio::EnsEMBL::Registry::get_DBAdaptor_count ( )

Undocumented method

Code:
click to view

◆ get_DNAAdaptor()

public Adaptor Bio::EnsEMBL::Registry::get_DNAAdaptor ( )
  Arg [1]    : name of the species to get the adaptor for in the registry.
  Arg [2]    : name of the group to get the adaptor for in the registry.
  Example    :
$dnaAdap = Bio::EnsEMBL::Registry->get_DNAAdaptor("Human", "core");
  Returntype : adaptor
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ get_species_and_object_type()

public Array Bio::EnsEMBL::Registry::get_species_and_object_type ( )
  Description:  Get the species name, object type (gene, transcript,
                translation, or exon etc.), and database type for a
                stable ID.
  Arg [1]    :  String stable_id
                The stable ID to find species and object type for.
  Arg [2]    :  String known_type (optional)
                The type of the stable ID, if it is known.
  Arg [3]    :  String known_species (optional)
                The species, if known
  Arg [4]    :  String known_db_type (optional)
                The database type, if known
  Example    :
my $stable_id = 'ENST00000326632';
@verbatim
my ( $species, $object_type, $db_type ) =
$registry->get_species_and_object_type($stable_id);
my $adaptor =
$registry->get_adaptor( $species, $db_type,
$object_type );
my $object = $adaptor->fetch_by_stable_id($stable_id);
@endverbatim
  Return type:  Array consisting of the species name, object type,
                and database type.  The array may be empty if no
                match is found.
  Exceptions :  none
  Status     :  At Risk.
 
Code:
click to view

◆ has_switchable_adaptor()

public Boolean Bio::EnsEMBL::Registry::has_switchable_adaptor ( )
  Arg [1]    : String name of the species to add its switchable adaptor into the registry
  Arg [2]    : String name of the group to add its switchable adaptor into the registry
  Arg [3]    : String name of the type to add its switchable adaptor into the registry
  Example    :
  Returntype : Boolean indicating if a switchable adaptor is available for your submitted combination
  Exceptions : Thrown if a valid internal name cannot be found for the given 
               name. If thrown check your API and DB version. Also thrown if
               no type, group or switchable adaptor instance was given
 
Code:
click to view

◆ load_all()

public Int Bio::EnsEMBL::Registry::load_all ( )
 Will load the registry with the configuration file which is
 obtained from the first in the following and in that order.
  1) If an argument is passed to this method, this is used as the
     name of the configuration file to read.
  2) If the environment variable ENSEMBL_REGISTRY is set, this is
     used as the name of the configuration file to read.
  3) If the file .ensembl_init exist in the home directory, it is
     used as the configuration file.
  Arg [1]    : (optional) string
               Name of file to load the registry from.
  Arg [2]    : (optional) integer
               If not 0, will print out all information.
  Arg [3]    : (optional) integer
               If not 0, the database connection will not be
               cleared, if 0 or if not set the database connections
               will be cleared (this is the default).
  Arg [4]:     (optional) boolean
               This option will turn off caching for slice features,
               so, every time a set of features is retrieved,
               they will come from the database instead of the
               cache.  This option is only recommended for advanced
               users, specially if you need to store and retrieve
               features.  It might reduce performance when querying
               the database if not used properly.  If in doubt, do
               not use it or ask in the developer mailing list.
  Arg [5]:     (optional) boolean
               This option will make load_all() throw if the configuration file
               is missing and cannot be guessed from the environment
  Example    :
  Returntype : Int count of the DBAdaptor instances which can be found in the 
               registry due to this method being called. Will never be negative
  Exceptions : Throws if $throw_if_missing is set and ($config_file is missing
               and cannot be guessed from the environment
  Status     : Stable
 
Code:
click to view

◆ load_registry_from_db()

public Int Bio::EnsEMBL::Registry::load_registry_from_db ( )
  Arg [HOST] : string
                The domain name of the database host to connect to.
  Arg [USER] : string
                The name of the database user to connect with.
  Arg [PASS] : (optional) string
                The password to be used to connect to the database.
  Arg [PORT] : (optional) integer
                The port to use when connecting to the database.
  Arg [VERBOSE]: (optional) boolean
                Whether to print database messages. This includes a listing
                of all available species & databases.
  Arg [SPECIES]: (optional) string
                By default, all databases that are found on the
                server and that corresponds to the correct release
                are probed for aliases etc.  For some people,
                depending on where they are in the world, this might
                be a slow operation.  With the '-species' argument,
                one may reduce the startup time by restricting the
                set of databases that are probed to those of a
                particular species.
                Note that the latin name of the species is required,
                e.g., 'homo sapiens', 'gallus gallus', 'callithrix
                jacchus' etc.  It may be the whole species name,
                or only the first part of the name, e.g. 'homo',
                'gallus', or 'callithrix'.  This will be used in
                matching against the name of the databases.
  Arg [DB_VERSION]: (optional) integer
                By default, only databases corresponding to the
                current API version are loaded.  This argument
                allows the script to use databases from another
                version although it might not work properly.  This
                argument should only be used for production or
                testing purposes and if you really know what you are
                doing.
  Arg [WAIT_TIMEOUT]: (optional) integer
                Time in seconds for the wait timeout to happen.
                Time after which the connection is deleted if not
                used.  By default this is 28800 (8 hours), so set
                this to greater than this if your connection are
                getting deleted.  Only set this if you are having
                problems and know what you are doing.
   Arg [-NO_CACHE]: (optional) boolean
                This option will turn off caching for slice features,
                so, every time a set of features is retrieved, they
                will come from the database instead of the cache.  This
                option is only recommended for advanced users, specially
                if you need to store and retrieve features.  It might
                reduce performance when querying the database if not
                used properly.  If in doubt, do not use it or ask in the
                developer mailing list.
   Arg [SPECIES_SUFFIX]: (optional) string
                This option will append the string to the species name
                in the registry for all databases found on this server.
  Example :
$registry->load_registry_from_db(
-host => 'ensembldb.ensembl.org',
-user => 'anonymous',
-verbose => '1'
);
  Description: Will load the correct versions of the Ensembl
               databases for the software release it can find on a
               database instance into the registry.  Also adds a set
               of standard aliases.
  Returntype : Int count of the DBAdaptor instances which can be found in the 
               registry due to this method call.
  Exceptions : Thrown if the given MySQL database cannot be connected to
               or there is any error whilst querying the database.
  Status     : Stable
 
Code:
click to view

◆ load_registry_from_multiple_dbs()

public Int Bio::EnsEMBL::Registry::load_registry_from_multiple_dbs ( )
  Arg [1]   : Array of hashes, each hash being a set of arguments to
              load_registry_from_db() (see above).
  Example   :
$registry->load_registry_from_multiple_dbs( {
'-host' => 'ensembldb.ensembl.org',
'-user' => 'anonymous',
'-verbose' => '1'
},
{
'-host' => 'server.example.com',
'-user' => 'anonymouse',
'-password' => 'cheese',
'-verbose' => '1'
} );
  Description:  Will call load_registry_from_db() (see above)
                multiple times and merge the resulting registries
                into one, effectively allowing a user to connect to
                databases on multiple database servers from within
                one program.
                If a database is found on more than one server, the
                first found instance of that database will be used.
  Returntype : Int count of the DBAdaptor instances which can be found in the 
               registry
 
Code:
click to view

◆ load_registry_from_url()

public Int Bio::EnsEMBL::Registry::load_registry_from_url ( )
  Arg [1] : string $url
  Arg [2] : (optional) integer
            If not 0, will print out all information.
  Arg [3] : (optional) integer
          This option will turn off caching for slice features, so,
          every time a set of features is retrieved, they will come
          from the database instead of the cache. This option is only
          recommended for advanced users, specially if you need to
          store and retrieve features. It might reduce performance when
          querying the database if not used properly. If in doubt, do
          not use it or ask in the developer mailing list.
  Example :
            'mysql://anonymous@ensembldb.ensembl.org:3306');
            load_registry_from_url(
            'mysql://anonymous@ensembldb.ensembl.org:3306/homo_sapiens_core_65_37?group=core&species=homo_sapiens'
            );
            load_registry_from_url(
            'mysql://anonymous@ensembldb.ensembl.org:3306/homo_sapiens_core_65_37?group=core'
            );
  Description: Will load the correct versions of the ensembl
               databases for the software release it can find on
               a database instance into the registry. Also adds
               a set of standard aliases. The url format is:
               mysql://[[username][:password]@]hostname[:port].  You
               can also request a specific version for the databases
               by adding a slash and the version number but your
               script may crash as the API version won't match the
               DB version.
               You can also specify a database name which will cause the 
               loading of a single DBAdaptor instance. Parameters are
               mapped from a normal URL parameter set to their DBAdaptor
               equivalent. Group must be defined.
  Returntype : Int count of the DBAdaptor instances which can be found in the 
               registry
  Exceptions : Thrown if the given URL does not parse according to the above 
               scheme and if the specified database cannot be connected to 
               (see load_registry_from_db for more information)
  Status     : Stable
 
Code:
click to view

◆ no_cache_warnings()

public Boolean Bio::EnsEMBL::Registry::no_cache_warnings ( )
  Arg[0]      : boolean for turning the flag on and off
  Description : Turns off any warnings about not using caching in all available 
                adaptors. 
  Returntype  : boolean Current status
  Exceptions  : None
 
Code:
click to view

◆ no_version_check()

public Int Bio::EnsEMBL::Registry::no_version_check ( )
  
  getter/setter for whether to run the version checking
  Arg[0]     : (optional) int
  Returntype : int or undef if not set
  Exceptions : none
  Status     : At Risk.
 


Code:
click to view

◆ remove_alias()

public void Bio::EnsEMBL::Registry::remove_alias ( )
  Arg [1]    : name of the species to remove alias for
  Arg [2]    : name of the alias
  Example    :
Bio::EnsEMBL::Registry->remove_alias("Homo Sapiens","Human");
  Description: remove alternative name for the species.
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ remove_db()

public Adaptor Bio::EnsEMBL::Registry::remove_db ( )
  Arg [1]    : db (DBAdaptor) to remove adaptor from.
  Arg [2]    : name to remove the adaptor from in the registry.
  Example    :
my $db = Bio::EnsEMBL::Registry->remove_db($db, "lite");
  Returntype : adaptor
  Exceptions : none
  Status     : At Risk.
             : This is here for backwards compatibility only and may
             : be removed eventually.  Solution is to make sure the
             : db and the adaptor have the same species and the call
             : is then no longer needed.
 
Code:
click to view

◆ remove_DBAdaptor()

public void Bio::EnsEMBL::Registry::remove_DBAdaptor ( )
  Arg [1]    : name of the species to get the adaptor for in the registry.
  Arg [2]    : name of the group to get the adaptor for in the registry.
  Example    :
$dba = Bio::EnsEMBL::Registry->remove_DBAdaptor("Human", "core");
  Returntype : none
  Exceptions : none
  Status     : At risk
 
Code:
click to view

◆ remove_switchable_adaptor()

public The Bio::EnsEMBL::Registry::remove_switchable_adaptor ( )
  Arg [1]    : name of the species to remove its switchable adaptor from the registry
  Arg [2]    : name of the group to remove its switchable adaptor from the registry
  Arg [3]    : name of the type to remove its switchable adaptor from the registry
  Example    :
$adap = Bio::EnsEMBL::Registry->remove_switchable_adaptor("Human", "core", "Gene");
  Returntype : The removed adaptor if one was removed. Otherwise undef
  Exceptions : Thrown if a valid internal name cannot be found for the given 
               name. If thrown check your API and DB version. Also thrown if
               no type or group was given
 
Code:
click to view

◆ reset_DBAdaptor()

public Bio::EnsEMBL::Registry::reset_DBAdaptor ( )
  Arg [1]:     string - species e.g. homo_sapiens
  Arg [2]:     string - DB group e.g. core
  Arg [3]:     string - new dbname
  Args [4-7]:  string - optional DB parameters, defaults to current db params if omitted
  Arg [8]:     hashref - Hash ref of additional parameters e.g. eFG dnadb params for auto selecting dnadb
  Usage :      $reg->reset_registry_db( 'homo_sapiens', 'core',
                  'homo_sapiens_core_37_35j' );
  Description: Resets a DB within the registry.
  Exceptions:  Throws if mandatory params not supplied
               Throws if species name is not already seen by the registry
               Throws if no current DB for species/group available
  Status :     At risk
 
Code:
click to view

◆ set_default_track()

public void Bio::EnsEMBL::Registry::set_default_track ( )
  Sets a flag to say that that this species/group are a default track and do not
  need to be added as another web track.
  Arg [1]    : name of the species to get the adaptors for in the registry.
  Arg [2]    : name of the type to get the adaptors for in the registry.
  Example    :
$merged = Bio::EnsEMBL::Registry->set_default_track("Human","core");
  Returntype : none
  Exceptions : none
  Status     : At Risk.
 
Code:
click to view

◆ set_disconnect_when_inactive()

public void Bio::EnsEMBL::Registry::set_disconnect_when_inactive ( )
  Example    :
  Description: Set the flag to make sure that the database connection is dropped if
               not being used on each database.
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ set_reconnect_when_lost()

public void Bio::EnsEMBL::Registry::set_reconnect_when_lost ( )
  Example    :
  Description: Set the flag to make sure that the database connection is not lost before it's used.
               This is useful for long running jobs (over 8hrs).
  Returntype : none
  Exceptions : none
  Status     : Stable
 
Code:
click to view

◆ stable_id_lookup()

public Bio::EnsEMBL::Registry::stable_id_lookup ( )

Undocumented method

Code:
click to view

◆ version_check()

public Int Bio::EnsEMBL::Registry::version_check ( )
  
  run the database/API code version check for a DBAdaptor
  Arg[0]     : DBAdaptor to check
  Returntype : int 1 if okay, 0 if not the same 
  Exceptions : none
  Status     : At Risk.
 


Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::Registry::no_version_check
public Int no_version_check()
Bio::EnsEMBL::Registry::get_all_species
public Listref get_all_species()
Bio::EnsEMBL::Registry::get_species_and_object_type
public Array get_species_and_object_type()
Bio::EnsEMBL::Registry::remove_switchable_adaptor
public The remove_switchable_adaptor()
Bio::EnsEMBL::Registry::get_adaptor
public Adaptor get_adaptor()
Bio::EnsEMBL::Registry::remove_DBAdaptor
public void remove_DBAdaptor()
Bio::EnsEMBL::Registry::get_DNAAdaptor
public Adaptor get_DNAAdaptor()
Bio::EnsEMBL::Registry::get_all_DBAdaptors_by_connection
public Reference get_all_DBAdaptors_by_connection()
Bio::EnsEMBL::Registry::find_and_add_aliases
public void find_and_add_aliases()
Bio::EnsEMBL::DBSQL::DBAdaptor
Definition: DBAdaptor.pm:40
map
public map()
Bio::EnsEMBL::Registry::archive_id_lookup
public archive_id_lookup()
Bio::EnsEMBL::Registry::alias_exists
public Boolean alias_exists()
Bio::EnsEMBL::Registry::no_cache_warnings
public Boolean no_cache_warnings()
Bio::EnsEMBL::Registry::add_alias
public void add_alias()
Bio::EnsEMBL::Registry::_lookup_db_get_species_and_object_type
protected _lookup_db_get_species_and_object_type()
Bio::EnsEMBL::Utils::ConfigRegistry
Definition: ConfigRegistry.pm:23
Bio::EnsEMBL::Registry::get_alias
public Species get_alias()
Bio::EnsEMBL::Registry::stable_id_lookup
public stable_id_lookup()
Bio::EnsEMBL::Registry::add_adaptor
public void add_adaptor()
Bio::EnsEMBL::Registry::remove_db
public Adaptor remove_db()
Bio::EnsEMBL::Registry::get_all_db_adaptors
public Adaptor get_all_db_adaptors()
Bio::EnsEMBL::Registry::clear
public void clear()
Bio::EnsEMBL::DBSQL::OntologyDBAdaptor
Definition: OntologyDBAdaptor.pm:12
Bio::EnsEMBL::Registry::get_all_aliases
public ArrayRef get_all_aliases()
Bio::EnsEMBL::Registry::_core_get_species_and_object_type_worker
protected _core_get_species_and_object_type_worker()
Bio::EnsEMBL::Registry::change_access
public void change_access()
Bio::EnsEMBL::Registry::get_DBAdaptor_count
public get_DBAdaptor_count()
Bio::EnsEMBL::Registry::disconnect_all
public void disconnect_all()
Bio::EnsEMBL::Registry
Definition: Registry.pm:113
Bio::EnsEMBL::Registry::_core_get_species_and_object_type
protected _core_get_species_and_object_type()
Bio::EnsEMBL::Registry::get_DBAdaptor
public DBAdaptor get_DBAdaptor()
Bio::EnsEMBL::Utils::IO
Definition: IO.pm:80
Bio::EnsEMBL::Utils::ConfigRegistry::add_alias
public add_alias()
Bio::EnsEMBL::Registry::set_default_track
public void set_default_track()
Bio::EnsEMBL::Registry::reset_DBAdaptor
public reset_DBAdaptor()
Bio::EnsEMBL::Registry::add_switchable_adaptor
public void add_switchable_adaptor()
Bio::EnsEMBL::Registry::_group_to_adaptor_class
protected String _group_to_adaptor_class()
Bio::EnsEMBL::Registry::version_check
public Int version_check()
Bio::EnsEMBL::Registry::add_DNAAdaptor
public void add_DNAAdaptor()
Bio::EnsEMBL::Registry::_compara_get_species_and_object_type_worker
protected _compara_get_species_and_object_type_worker()
Bio::EnsEMBL::Registry::default_track
public Int default_track()
Bio::EnsEMBL::Registry::load_registry_from_db
public Int load_registry_from_db()
Bio::EnsEMBL::Registry::remove_alias
public void remove_alias()
Bio::EnsEMBL::DBSQL::DBAdaptor::new
public Bio::EnsEMBL::DBSQL::DBAdaptor new()
Bio::EnsEMBL::Registry::get_db
public Adaptor get_db()
Bio::EnsEMBL::Registry::set_disconnect_when_inactive
public void set_disconnect_when_inactive()
Bio::EnsEMBL::Registry::add_DBAdaptor
public void add_DBAdaptor()
Bio::EnsEMBL::Registry::_compara_get_species_and_object_type
protected _compara_get_species_and_object_type()
Bio::EnsEMBL::Registry::add_new_tracks
public void add_new_tracks()
Bio::EnsEMBL::Registry::get_all_DBAdaptors
public List get_all_DBAdaptors()
Bio::EnsEMBL::Registry::add_db
public void add_db()
Bio::EnsEMBL::Registry::get_all_DBAdaptors_by_dbname
public Reference get_all_DBAdaptors_by_dbname()
Bio::EnsEMBL::Registry::get_all_adaptors
public Ref get_all_adaptors()
Bio::EnsEMBL::Registry::has_switchable_adaptor
public Boolean has_switchable_adaptor()
Bio::EnsEMBL::Registry::load_registry_from_url
public Int load_registry_from_url()
Bio::EnsEMBL::Utils::IO::slurp
public Scalar slurp()
Bio::EnsEMBL::Registry::load_registry_from_multiple_dbs
public Int load_registry_from_multiple_dbs()
Bio::EnsEMBL::Registry::load_all
public Int load_all()
Bio::EnsEMBL::Registry::set_reconnect_when_lost
public void set_reconnect_when_lost()