From 2e9487e938b9147dabadc4a10a400c9e05bd5f4a Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Mon, 7 Feb 2005 11:32:53 +0000
Subject: [PATCH] add default alias of the species name when adding a DBAdaptor

---
 modules/Bio/EnsEMBL/Registry.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm
index a250d2005e..126f4cb4d4 100644
--- a/modules/Bio/EnsEMBL/Registry.pm
+++ b/modules/Bio/EnsEMBL/Registry.pm
@@ -271,6 +271,11 @@ sub get_all_db_adaptors{
 sub add_DBAdaptor{
   my ($class, $species, $group, $adap) = @_;
 
+  if(!($class->alias_exists($species))){
+    $class->add_alias($species,$species);
+  }
+  
+
   $species = $class->get_alias($species);
 
   $registry_register{$species}{$group}{'_DB'} = $adap;
-- 
GitLab