Commit a8a75be0 authored by Leo Gordon's avatar Leo Gordon
Browse files

api_change: renamed Hive::DBSQL::MetaContainer --> PipelineWideParametersAdaptor

parent a695d9b3
......@@ -173,7 +173,7 @@ our %adaptor_type_2_package_name = (
'DataflowRule' => 'Bio::EnsEMBL::Hive::DBSQL::DataflowRuleAdaptor',
'LogMessage' => 'Bio::EnsEMBL::Hive::DBSQL::LogMessageAdaptor',
'Meta' => 'Bio::EnsEMBL::Hive::DBSQL::MetaAdaptor',
'MetaContainer' => 'Bio::EnsEMBL::Hive::DBSQL::MetaContainer',
'PipelineWideParameters'=> 'Bio::EnsEMBL::Hive::DBSQL::PipelineWideParametersAdaptor',
'NakedTable' => 'Bio::EnsEMBL::Hive::DBSQL::NakedTableAdaptor',
'ResourceClass' => 'Bio::EnsEMBL::Hive::DBSQL::ResourceClassAdaptor',
'ResourceDescription' => 'Bio::EnsEMBL::Hive::DBSQL::ResourceDescriptionAdaptor',
......@@ -259,7 +259,7 @@ sub AUTOLOAD {
sub load_collections {
my $self = shift @_;
foreach my $AdaptorType ('Meta', 'MetaContainer') {
foreach my $AdaptorType ('Meta', 'PipelineWideParameters') {
my $adaptor = $self->get_adaptor( $AdaptorType );
Bio::EnsEMBL::Hive->collection( $AdaptorType, $adaptor->get_param_hash() );
}
......@@ -275,7 +275,7 @@ sub load_collections {
sub save_collections {
my $self = shift @_;
foreach my $AdaptorType ('Meta', 'MetaContainer') {
foreach my $AdaptorType ('Meta', 'PipelineWideParameters') {
my $adaptor = $self->get_adaptor( $AdaptorType );
while(my ($meta_key, $meta_value) = each %{ Bio::EnsEMBL::Hive->collection( $AdaptorType ) } ) {
$adaptor->remove_all_by_meta_key($meta_key); # make sure the previous values are gone
......
......@@ -2,11 +2,11 @@
=head1 NAME
Bio::EnsEMBL::Hive::DBSQL::MetaContainer
Bio::EnsEMBL::Hive::DBSQL::PipelineWideParametersAdaptor
=head1 SYNOPSIS
$meta_container = $db_adaptor->get_MetaContainer;
$meta_container = $db_adaptor->get_PipelineWideParametersAdaptor;
=head1 DESCRIPTION
......@@ -32,7 +32,7 @@
=cut
package Bio::EnsEMBL::Hive::DBSQL::MetaContainer;
package Bio::EnsEMBL::Hive::DBSQL::PipelineWideParametersAdaptor;
use strict;
use Bio::EnsEMBL::Hive::Utils ('stringify', 'destringify');
......
......@@ -16,7 +16,7 @@ By inheriting from this module you make your module able to deal with parameters
## typical usage:
# $job->param_init(
# $runObj->param_defaults(), # module-wide built-in defaults have the lowest precedence (will always be the same for this module)
# $self->db->get_MetaContainer->get_param_hash(), # then come the pipeline-wide parameters from the 'meta' table (define things common to all modules in this pipeline)
# $self->db->get_PipelineWideParametersAdaptor->get_param_hash(), # then come the pipeline-wide parameters from the 'meta' table (define things common to all modules in this pipeline)
# $self->analysis->parameters(), # analysis-wide 'parameters' are even more specific (can be defined differently for several occurence of the same module)
# $job->input_id(), # job-specific 'input_id' parameters have the highest precedence
# );
......
......@@ -449,7 +449,7 @@ sub add_objects_from_config {
warn "Done.\n\n";
warn "Adding pipeline-wide parameters ...\n";
my $mc_coll = Bio::EnsEMBL::Hive->collection('MetaContainer');
my $mc_coll = Bio::EnsEMBL::Hive->collection('PipelineWideParameters');
%$mc_coll = (%$mc_coll, %{$self->pipeline_wide_parameters()} );
warn "Done.\n\n";
......
......@@ -95,8 +95,8 @@ sub stringify {
If it seems to contain a hash/array/quoted_string, the contents is evaluated, otherwise it is returned "as is".
This function is mainly used to read values from 'meta' table that may represent Perl structures, but generally don't have to.
Callers : Bio::EnsEMBL::Hive::DBSQL::MetaContainer # destringification of general 'meta' params
beekeeper.pl script # destringification of the 'pipeline_name' meta param
Callers : Bio::EnsEMBL::Hive::DBSQL::PipelineWideParametersAdaptor # destringification of general 'meta' params
beekeeper.pl script # destringification of the 'pipeline_name' meta param
=cut
......
......@@ -666,7 +666,7 @@ sub run_one_batch {
my @params_precedence = (
$runnable_object->param_defaults(),
$self->adaptor->db->get_MetaContainer->get_param_hash(),
$self->adaptor->db->get_PipelineWideParametersAdaptor->get_param_hash(),
$self->analysis->parameters(),
);
......
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