From 2b71caff6c4191d66638cbc0d5d9cd3d4dc5cc8b Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Wed, 18 Mar 2009 14:46:57 +0000
Subject: [PATCH] verbose changes

---
 misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm      |  7 ++++---
 misc-scripts/xref_mapping/XrefMapper/Interpro.pm      | 11 ++++++-----
 .../xref_mapping/XrefMapper/ProcessPrioritys.pm       |  5 +++--
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm b/misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm
index 0788628cf7..c81a9d1e93 100644
--- a/misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/CoreInfo.pm
@@ -37,6 +37,7 @@ sub new {
   bless $self,$class;
   $self->core($mapper->core);
   $self->xref($mapper->xref);
+  $self->verbose($mapper->verbose);
   return $self;
 }
 
@@ -131,7 +132,7 @@ SQL
           $internal_id = $stable_id;
        }
        else{
-         print "Could not find stable id $stable_id in table to get the internal id hence ignoring!!!\n" if($self->mapper->verbose);
+         print "Could not find stable id $stable_id in table to get the internal id hence ignoring!!!\n" if($self->verbose);
 	 $err_count++;
          next;
        }
@@ -176,9 +177,9 @@ SQL
    }
    $sth->finish;
    if($duplicate_direct_count or $duplicate_dependent_count){
-     print "duplicate entrys ignored for $duplicate_direct_count direct xrefs and  $duplicate_dependent_count dependent xrefs\n" if($self->mapper->verbose);
+     print "duplicate entrys ignored for $duplicate_direct_count direct xrefs and  $duplicate_dependent_count dependent xrefs\n" if($self->verbose);
    }
-   if($err_count or $self->mapper->verbose){
+   if($err_count or $self->verbose){
      print STDERR $count." direct_xrefs added to ensembl ".$table."s BUT $err_count stable ids could not be found\n";
    }
  }
diff --git a/misc-scripts/xref_mapping/XrefMapper/Interpro.pm b/misc-scripts/xref_mapping/XrefMapper/Interpro.pm
index 4dd8ce76bc..4c1819007e 100644
--- a/misc-scripts/xref_mapping/XrefMapper/Interpro.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/Interpro.pm
@@ -14,6 +14,7 @@ sub new {
   bless $self,$class;
   $self->core($mapper->core);
   $self->xref($mapper->xref);
+  $self->verbose($mapper->verbose);
   return $self;
 }
 
@@ -21,7 +22,7 @@ sub new {
 sub process{
   my $self = shift;
 
-  print "Writing InterPro\n" if($self->mapper->verbose);
+  print "Writing InterPro\n" if($self->verbose);
   my( $ipro_count, $xref_count, $oxref_count, $goxref_count ) = (0,0,0,0);
   
   my $object_xref_id;
@@ -93,11 +94,11 @@ sub process{
   $sth->finish();
   
   
-  print "\n".$dup." already existed\n\n" if($self->mapper->verbose);
+  print "\n".$dup." already existed\n\n" if($self->verbose);
 
-  print("  Wrote $ipro_count interpro table entries\n") if($self->mapper->verbose);
-  print("    including $oxref_count object xrefs, \n") if($self->mapper->verbose);
-  print("    and $goxref_count go xrefs\n") if($self->mapper->verbose);
+  print("  Wrote $ipro_count interpro table entries\n") if($self->verbose);
+  print("    including $oxref_count object xrefs, \n") if($self->verbose);
+  print("    and $goxref_count go xrefs\n") if($self->verbose);
 #  foreach my $key (keys %added){
 #    print "id= $key has ".$added{$key}. " object xrefs added\n";
 #  }
diff --git a/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm b/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
index 6cabf6d096..3ffaa47638 100644
--- a/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
+++ b/misc-scripts/xref_mapping/XrefMapper/ProcessPrioritys.pm
@@ -32,6 +32,7 @@ sub new {
   bless $self,$class;
 #  $self->core($mapper->core);
   $self->xref($mapper->xref);
+  $self->verbose($mapper->verbose);
   return $self;
 }
 
@@ -65,9 +66,9 @@ sub process {
 
   my @names = $self->get_priority_names();
 
-  print "The foillowing will be processed as priority xrefs\n" if($self->mapper->verbose);
+  print "The foillowing will be processed as priority xrefs\n" if($self->verbose);
   foreach my $name (@names){
-    print "\t$name\n" if($self->mapper->verbose);
+    print "\t$name\n" if($self->verbose);
   }
 
   my $update_ox_sth = $self->xref->dbc->prepare('update object_xref set ox_status = "FAILED_PRIORITY" where object_xref_id = ?');
-- 
GitLab