Commit 4aa0c74b authored by Ian Longden's avatar Ian Longden
Browse files

if no xref database is specified in the config file then do not try to connect...

if no xref database is specified in the config file then do not try to connect to it. Needed for -recalc_display_xrefs option
parent c506e19c
......@@ -114,7 +114,7 @@ sub process_file {
my $self = shift;
my $file = shift;
my $verbose = shift;
my $no_xref = shift;
open(FILE, $file) or die ("\nCannot open input file '$file':\n $!\n");
......@@ -180,7 +180,7 @@ sub process_file {
$mapper = "XrefMapper::$module"->new();
if(defined($xref_hash{host})){
if(defined($xref_hash{host}) and !defined($no_xref)){
my ($host, $user, $dbname, $pass, $port);
$host = $xref_hash{'host'};
$user = $xref_hash{'user'};
......@@ -218,9 +218,12 @@ sub process_file {
}
}
else{
elsif(!defined($no_xref)){
die "No host name given for xref database\n";
}
else{
print "No xref database is too be used\n" if ($verbose)
}
if(defined($species_hash{'species'})){
......@@ -250,6 +253,7 @@ sub process_file {
-dbname => $dbname);
$mapper->core($core);
if(!defined($no_xref)){
$mapper->add_meta_pair("species", $host.":".$dbname);
if(defined($species_hash{'dir'})){
......@@ -261,7 +265,7 @@ sub process_file {
else{
die "No directory specified for the ensembl fasta files\n";
}
}
$core->species($value);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment