Archive Ensembl HomeArchive Ensembl Home
LoadAllMasterGenomeDB_conf.pm
Go to the documentation of this file.
00001 
00002 =pod 
00003 
00004 =head1 NAME
00005 
00006   Bio::EnsEMBL::Compara::PipeConfig::LoadAllMasterGenomeDB_conf
00007 
00008 =head1 SYNOPSIS
00009 
00010     init_pipeline.pl Bio::EnsEMBL::Compara::PipeConfig::LoadAllMasterGenomeDB_conf -password <your_password>
00011 
00012 =head1 DESCRIPTION  
00013 
00014     This is a test of JobFactory + LoadOneGenomeDB Runnables
00015 
00016 =head1 CONTACT
00017 
00018   Please contact ehive-users@ebi.ac.uk mailing list with questions/suggestions.
00019 
00020 =cut
00021 
00022 package Bio::EnsEMBL::Compara::PipeConfig::LoadAllMasterGenomeDB_conf;
00023 
00024 use strict;
00025 use warnings;
00026 use base ('Bio::EnsEMBL::Compara::PipeConfig::ComparaGeneric_conf');
00027 
00028 sub default_options {
00029     my ($self) = @_;
00030     return {
00031         %{$self->SUPER::default_options},
00032 
00033         'pipeline_name' => 'load_all_master_genomedb',
00034 
00035         'pipeline_db' => {                                  # connection parameters
00036             -host   => 'compara2',
00037             -port   => 3306,
00038             -user   => 'ensadmin',
00039             -pass   => $self->o('password'),                        # a rule where a previously undefined parameter is used (which makes either of them obligatory)
00040             -dbname => $ENV{USER}.'_'.$self->o('pipeline_name'),    # a rule where a previously defined parameter is used (which makes both of them optional)
00041         },
00042 
00043         'reg1' => {
00044             -host   => 'ens-staging',
00045             -port   => 3306,
00046             -user   => 'ensro',
00047             -pass   => '',
00048         },
00049 
00050         'reg2' => {
00051             -host   => 'ens-staging2',
00052             -port   => 3306,
00053             -user   => 'ensro',
00054             -pass   => '',
00055         },
00056 
00057         master_db => {
00058             -host   => 'compara1',
00059             -port   => 3306,
00060             -user   => 'ensro',
00061             -pass   => '',
00062             -dbname => 'sf5_ensembl_compara_master',
00063         }
00064     };
00065 }
00066 
00067 sub pipeline_analyses {
00068     my ($self) = @_;
00069     return [
00070         {   -logic_name => 'load_genomedb_factory',
00071             -module     => 'Bio::EnsEMBL::Hive::RunnableDB::JobFactory',
00072             -parameters => {
00073                 'db_conn'           => $self->o('master_db'),
00074                 'inputquery'        => 'SELECT genome_db_id, name species_name, assembly assembly_name FROM genome_db WHERE taxon_id AND assembly_default',
00075                 'fan_branch_code'   => 2,
00076             },
00077             -input_ids  => [
00078                 { },    # the input_id template is now fully defined by the query's column_names (hence the need to rename them).
00079                         # If you want to load the latest assembly for the genome, skip 'assembly assembly_name' field from the query.
00080             ],
00081             -flow_into => {
00082                 2 => [ 'load_genomedb' ],
00083             },
00084             -rc_id => 1,
00085         },
00086 
00087         {   -logic_name => 'load_genomedb',
00088             -module     => 'Bio::EnsEMBL::Compara::RunnableDB::LoadOneGenomeDB',
00089             -parameters => {
00090                 'registry_dbs'  => [ $self->o('reg1'), $self->o('reg2'), ],
00091             },
00092             -flow_into => {
00093                 1 => [ 'dummy' ],   # each will flow into another one
00094             },
00095         },
00096 
00097         {   -logic_name    => 'dummy',
00098             -module        => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
00099             -hive_capacity => 10,       # allow several workers to perform identical tasks in parallel
00100         },
00101     ];
00102 }
00103 
00104 1;
00105