From 3fc0e19c211fa2886afff49c9ab3b1da1ce0099c Mon Sep 17 00:00:00 2001
From: Arne Stabenau <stabenau@sanger.ac.uk>
Date: Fri, 27 Feb 2004 11:22:41 +0000
Subject: [PATCH] made attrib_type.code case insensitive (uc() where used)

---
 modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm | 8 ++++----
 modules/Bio/EnsEMBL/Slice.pm              | 2 +-
 modules/t/MultiTestDB.conf                | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
index c2d7949fcc..60e1ca06ca 100644
--- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
@@ -457,8 +457,8 @@ sub get_seq_region_attribs {
 
   my %attrib_hash;
   while($sth->fetch()) {
-    $attrib_hash{$code} ||= [];
-    push @{$attrib_hash{$code}}, $attrib;
+    $attrib_hash{uc($code)} ||= [];
+    push @{$attrib_hash{uc($code)}}, $attrib;
   }
 
   $sth->finish();
@@ -528,8 +528,8 @@ sub set_seq_region_attrib {
   #update the cache if it exists already
   if(exists $self->{'_attribs_cache'} &&
      exists $self->{'_attribs_cache'}->{$srid}) {
-    $self->{'_attribs_cache'}->{$srid}->{$code} ||= [];
-    push(@{$self->{'_attribs_cache'}->{$srid}->{$code}}, $value);
+    $self->{'_attribs_cache'}->{$srid}->{uc($code)} ||= [];
+    push(@{$self->{'_attribs_cache'}->{$srid}->{uc($code)}}, $value);
   }
 
   return;
diff --git a/modules/Bio/EnsEMBL/Slice.pm b/modules/Bio/EnsEMBL/Slice.pm
index daea7f9671..cd48f9e6c1 100644
--- a/modules/Bio/EnsEMBL/Slice.pm
+++ b/modules/Bio/EnsEMBL/Slice.pm
@@ -848,7 +848,7 @@ sub get_attribute {
 
   my %attribs = %{$self->adaptor->get_seq_region_attribs($self)};
 
-  return @{$attribs{$attrib_code} || []};
+  return @{$attribs{uc($attrib_code)} || []};
 }
 
 
diff --git a/modules/t/MultiTestDB.conf b/modules/t/MultiTestDB.conf
index 8b38b0b0c1..1e594f5cd0 100644
--- a/modules/t/MultiTestDB.conf
+++ b/modules/t/MultiTestDB.conf
@@ -3,13 +3,13 @@
  'driver' => 'mysql',
  'user'   => 'ensadmin',
  'pass'   => 'ensembl',
- 'host'   => 'ecs1c',
+ 'host'   => 'ecs1d',
  'zip'    => 'test_genome.zip',
   
   #add a line with the dbname and module
   'databases'   => { 'core' => 'Bio::EnsEMBL::DBSQL::DBAdaptor'},
 
 #uncomment to use preloaded databases (useful when doing lots of testing)
-#  'preloaded'   => { 'core' => 'arne_new_test' }	
+  'preloaded'   => { 'core' => 'mcvicker_new_schema' }	
   	
 }
-- 
GitLab