From 853c2dd9192f47e68c3c8cb2542ac28955a16029 Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Wed, 6 Oct 2004 14:16:37 +0000
Subject: [PATCH] small fixes for new input format

---
 misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm | 6 +++---
 misc-scripts/xref_mapping/XrefMapper/db.pm          | 2 +-
 misc-scripts/xref_mapping/xref_mapper.input         | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm b/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
index ab80b25e87..b2313c8b4c 100644
--- a/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/BasicMapper.pm
@@ -44,7 +44,7 @@ my $xref_password = "ensembl";
 
 sub dump_seqs{
   my ($self, $xref) = @_;
-  $self->dump_ensembl($slice);
+  $self->dump_ensembl();
   $self->dump_xref($xref);
 }
 
@@ -96,7 +96,7 @@ sub dump_xref{
   $sql   .= "where p.xref_id = x.xref_id and ";
   $sql   .= "      p.sequence_type ='dna' and ";
   $sql   .= "      x.species_id = ".$species_id." ";
-  $sth = dbi()->prepare($sql);
+  $sth = $xref->dbi()->prepare($sql);
   $sth->execute();
   my $i = 0;
   while(my @row = $sth->fetchrow_array()){
@@ -120,7 +120,7 @@ ENDDNA:
   $sql   .= "where p.xref_id = x.xref_id and ";
   $sql   .= "      p.sequence_type ='peptide' and ";
   $sql   .= "      x.species_id = ".$species_id." ";
-  $sth = dbi()->prepare($sql);
+  $sth = $xref->dbi()->prepare($sql);
   $sth->execute();
   $i = 0;
   while(my @row = $sth->fetchrow_array()){
diff --git a/misc-scripts/xref_mapping/XrefMapper/db.pm b/misc-scripts/xref_mapping/XrefMapper/db.pm
index 5b8f23af91..047a1bbdcf 100644
--- a/misc-scripts/xref_mapping/XrefMapper/db.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/db.pm
@@ -73,7 +73,7 @@ sub dbi {
 
   my $self = shift;
 
-  my $dbi = DBI->connect("dbi:mysql:host=".$self->host().";port=".$self->port().";database="$self->database(),
+  my $dbi = DBI->connect("dbi:mysql:host=".$self->host().";port=".$self->port().";database=".$self->dbname(),
                         $self->user,
                         $self->password,
  			 {'RaiseError' => 1}) || die "Can't connect to database";
diff --git a/misc-scripts/xref_mapping/xref_mapper.input b/misc-scripts/xref_mapping/xref_mapper.input
index 7caffcd388..ce7a273fa4 100644
--- a/misc-scripts/xref_mapping/xref_mapper.input
+++ b/misc-scripts/xref_mapping/xref_mapper.input
@@ -9,7 +9,7 @@ dir=./xref
 species=homo_sapiens
 host=ecs2
 port=3365
-dbname=homo_sapiens_core_24_34e
+dbname=homo_sapiens_core_25_34e
 user=ensro
 password=
 dir=./test
-- 
GitLab