From db5370e2a6cde2301fc0e5d65427525cf20c0dee Mon Sep 17 00:00:00 2001
From: Ian Longden <ianl@sanger.ac.uk>
Date: Fri, 22 May 2009 13:10:58 +0000
Subject: [PATCH] verbose set to be default

---
 misc-scripts/xref_mapping/xref_parser.pl | 33 +++++++++++++++++++++---
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/misc-scripts/xref_mapping/xref_parser.pl b/misc-scripts/xref_mapping/xref_parser.pl
index 2c80407941..deb2ff848e 100644
--- a/misc-scripts/xref_mapping/xref_parser.pl
+++ b/misc-scripts/xref_mapping/xref_parser.pl
@@ -8,12 +8,16 @@ my ( $host,             $port,          $dbname,
      $sources,          $checkdownload, $create,
      $release,          $cleanup,       $drop_existing_db,
      $deletedownloaded, $dl_path,       $notsource,
-     $unzip, $stats, $verbose );
+     $unzip, $stats, $notverbose );
+
+my $options = join(" ",@ARGV);
 
 print "Options: ".join(" ",@ARGV)."\n";
 
 $unzip = 0;    # Do not decompress gzipped files by default
 
+$notverbose = 0;
+
 GetOptions(
     'dbuser|user=s'  => \$user,
     'dbpass|pass=s'  => \$pass,
@@ -28,7 +32,7 @@ GetOptions(
     'setrelease=s'   => \$release,
     'cleanup'        => \$cleanup,
     'stats'          => \$stats,
-    'verbose'        => \$verbose,
+    'notverbose'     => \$notverbose,
     'notsource=s'    => \$notsource,
     'drop_db|dropdb!' =>
       \$drop_existing_db,    # Drop xref db without user interaction
@@ -48,8 +52,18 @@ if ( !$user || !$host || !$dbname ) {
     exit(1);
 }
 
+
+print "host os $host\n";
+
 my $base_parser = XrefParser::BaseParser->new();
 
+
+#
+# If any sources are missing then we need to calculate the display xrefs from the core.
+# As the xref database will not have all the data. Using the core is much slower!!
+#
+
+
 $base_parser->run(
                $host, ( defined $port ? $port : '3306' ),
                $dbname,           $user,
@@ -58,7 +72,18 @@ $base_parser->run(
                $create,           $release,
                $cleanup,          $drop_existing_db,
                $deletedownloaded, $dl_path,
-               \@notsource,       $unzip, $stats, $verbose );
+               \@notsource,       $unzip, $stats, !($notverbose) );
+
+$base_parser->add_meta_pair("options",$options);
+
+if($options =~ /source/ ){
+  $base_parser->add_meta_pair("fullmode","no");
+}
+else{
+  $base_parser->add_meta_pair("fullmode","yes");
+}
+
+$base_parser->parsing_finished_store_data();
 
 # --------------------------------------------------------------------------------
 
@@ -125,7 +150,7 @@ sub usage {
   -unzip            Decompress gzipped files (default is to use compressed
                     files).
 
-  -verbose          Output messages about the parsing.
+  -notverbose       Do not output messages about the parsing. (NOT recomended)
 
   -stats            Generate the stats for the number of types of xrefs added.
 
-- 
GitLab