Commit a177306e authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Pulled in the bugfixes from 1.9

parents a678e5bf baca69ba
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Author" content="Made by 'tree'">
<meta name="GENERATOR" content="$Version: $ tree v1.6.0 (c) 1996 - 2011 by Steve Baker, Thomas Moore, Francesc Rocher, Kyosuke Tokoro $">
<title>eHive 1.9 scripts</title>
<style type="text/css">
<!--
BODY { font-family : ariel, monospace, sans-serif; }
P { font-weight: normal; font-family : ariel, monospace, sans-serif; color: black; background-color: transparent;}
B { font-weight: normal; color: black; background-color: transparent;}
A:visited { font-weight : normal; text-decoration : none; background-color : transparent; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
A:link { font-weight : normal; text-decoration : none; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
A:hover { color : #000000; font-weight : normal; text-decoration : underline; background-color : yellow; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
A:active { color : #000000; font-weight: normal; background-color : transparent; margin : 0px 0px 0px 0px; padding : 0px 0px 0px 0px; display: inline; }
.VERSION { font-size: small; font-family : arial, sans-serif; }
.NORM { color: black; background-color: transparent;}
.FIFO { color: purple; background-color: transparent;}
.CHAR { color: yellow; background-color: transparent;}
.DIR { color: blue; background-color: transparent;}
.BLOCK { color: yellow; background-color: transparent;}
.LINK { color: aqua; background-color: transparent;}
.SOCK { color: fuchsia;background-color: transparent;}
.EXEC { color: green; background-color: transparent;}
-->
</style>
</head>
<body>
<h1>eHive scripts</h1><p>
<a href=".">.</a><br>
├── <a href="./beekeeper.html">beekeeper.html</a><br>
├── <a href="./db_cmd.html">db_cmd.html</a><br>
├── <a href="./generate_graph.html">generate_graph.html</a><br>
├── <a href="./generate_timeline.html">generate_timeline.html</a><br>
├── <a href="./hoover_pipeline.html">hoover_pipeline.html</a><br>
├── <a href="./init_pipeline.html">init_pipeline.html</a><br>
├── <a href="./lsf_report.html">lsf_report.html</a><br>
├── <a href="./runWorker.html">runWorker.html</a><br>
├── <a href="./seed_pipeline.html">seed_pipeline.html</a><br>
└── <a href="./standaloneJob.html">standaloneJob.html</a><br>
<br><br>
</p>
<p>
0 directories, 11 files
<br><br>
</p>
<hr>
<p class="VERSION">
tree v1.6.0 © 1996 - 2011 by Steve Baker and Thomas Moore <br>
HTML output hacked and copyleft © 1998 by Francesc Rocher <br>
Charsets / OS/2 support © 2001 by Kyosuke Tokoro
</p>
</body>
</html>
......@@ -93,40 +93,40 @@ sub new {
unless($no_sql_schema_version_check) {
my $dbc = $self->dbc();
$url ||= $dbc->url();
my $safe_url = $dbc->url('EHIVE_PASS');
my $code_sql_schema_version = Bio::EnsEMBL::Hive::DBSQL::SqlSchemaAdaptor->get_code_sql_schema_version()
|| die "DB($url) Could not establish code_sql_schema_version, please check that 'EHIVE_ROOT_DIR' environment variable is set correctly";
|| die "DB($safe_url) Could not establish code_sql_schema_version, please check that 'EHIVE_ROOT_DIR' environment variable is set correctly";
my $db_sql_schema_version = eval { $self->get_MetaAdaptor->get_value_by_key( 'hive_sql_schema_version' ); };
if($@) {
if($@ =~ /hive_meta.*doesn't exist/) {
die "\nDB($url) The 'hive_meta' table does not seem to exist in the database yet.\nPlease patch the database up to sql_schema_version '$code_sql_schema_version' and try again.\n";
die "\nDB($safe_url) The 'hive_meta' table does not seem to exist in the database yet.\nPlease patch the database up to sql_schema_version '$code_sql_schema_version' and try again.\n";
} else {
die "DB($url) $@";
die "DB($safe_url) $@";
}
} elsif(!$db_sql_schema_version) {
die "\nDB($url) The 'hive_meta' table does not contain 'hive_sql_schema_version' entry.\nPlease investigate.\n";
die "\nDB($safe_url) The 'hive_meta' table does not contain 'hive_sql_schema_version' entry.\nPlease investigate.\n";
} elsif($db_sql_schema_version < $code_sql_schema_version) {
my $new_patches = Bio::EnsEMBL::Hive::DBSQL::SqlSchemaAdaptor->get_sql_schema_patches( $db_sql_schema_version, $dbc->driver )
|| die "DB($url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version' but the code is already '$code_sql_schema_version'.\n"
|| die "DB($safe_url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version' but the code is already '$code_sql_schema_version'.\n"
."Unfortunately we cannot patch the database; you may have to create a new database or agree to run older code\n";
my $patcher_command = "$ENV{'EHIVE_ROOT_DIR'}/scripts/db_cmd.pl -url $url";
my $patcher_command = "$ENV{'EHIVE_ROOT_DIR'}/scripts/db_cmd.pl -url $safe_url";
die "DB($url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version' but the code is already '$code_sql_schema_version'.\n"
die "DB($safe_url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version' but the code is already '$code_sql_schema_version'.\n"
."Please upgrade the database by applying the following patches:\n\n".join("\n", map { "\t$patcher_command < $_" } @$new_patches)."\n\nand try again.\n";
} elsif($code_sql_schema_version < $db_sql_schema_version) {
die "DB($url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version', but your code is still '$code_sql_schema_version'.\n"
die "DB($safe_url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version', but your code is still '$code_sql_schema_version'.\n"
."Please update the code and try again.\n";
}
}
......
......@@ -128,14 +128,14 @@ sub write_output {
my $chunk_size = 0; # number of sequences in the current chunk
my $chunk_name = $output_prefix.$chunk_number.$output_suffix;
my $chunk_seqio = Bio::SeqIO->new(-file => '>'.$chunk_name, -format => 'fasta');
while (my $seq_object = $input_seqio->next_seq) {
$chunk_seqio->write_seq( $seq_object );
if((my $seq_length = $seq_object->length()) + $chunk_length <= $max_chunk_length) {
# add to the current chunk:
$chunk_seqio->write_seq( $seq_object );
$chunk_length += $seq_length;
$chunk_size += 1;
} else {
# dataflow the current chunk:
......@@ -163,6 +163,8 @@ sub write_output {
'chunk_length' => $chunk_length,
'chunk_size' => $chunk_size
}, 2);
} else {
unlink $chunk_name unless (stat($chunk_name))[7];
}
}
......
=pod
=head1 NAME
......@@ -84,7 +85,7 @@ sub stringify {
local $Data::Dumper::Quotekeys = 1; # conserve some space
local $Data::Dumper::Useqq = 1; # escape the \n and \t correctly
local $Data::Dumper::Pair = ' => '; # make sure we always produce Perl-parsable structures, no matter what is set externally
local $Data::Dumper::Maxdepth = undef; # make sure nobody can mess up stringification by setting a lower Maxdepth
local $Data::Dumper::Maxdepth = 0; # make sure nobody can mess up stringification by setting a lower Maxdepth
return Dumper($structure);
}
......
......@@ -162,7 +162,9 @@ sub main {
script_usage(1);
}
$self->{'safe_url'} = $self->{'dba'}->dbc->url('WORKER_PASSWORD');
if( $self->{'url'} ) { # protect the URL that we pass to Workers by hiding the password in %ENV:
$self->{'url'} = $self->{'dba'}->dbc->url('EHIVE_PASS');
}
my $queen = $self->{'dba'}->get_Queen;
......
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