ensembl-hive  2.7.0
LongMultWfServer_conf.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 SYNOPSIS
8 
9  # initialize the "server" database first and note its URL - you will need it to initialize the "client" later:
11 
12  # initialize the "client" database by plugging the server's URL:
13  init_pipeline.pl Bio::EnsEMBL::Hive::Examples::LongMult::PipeConfig::LongMultWfClient_conf -password <mypass> -server_url $SERVER_HIVE_URL
14 
15  # optionally also seed it with your specific values:
16  seed_pipeline.pl -url $CLIENT_HIVE_URL -logic_name take_b_apart -input_id '{ "a_multiplier" => "12345678", "b_multiplier" => "3359559666" }'
17 
18  # run the "server" (it will have to be stopped manually when the "client" is done):
19  beekeeper.pl -url $SERVER_HIVE_URL -keep_alive
20 
21  # run the "client" (it will exit by itself):
22  beekeeper.pl -url $CLIENT_HIVE_URL -loop
23 
24 =head1 DESCRIPTION
25 
26  This is the "server" PipeConfig file of a special two-part version of the long multiplication example pipeline.
27  Please make sure you FULLY understand how the LongMult_conf works before trying this one.
28 
29  We have split the original LongMult_conf into two parts, the "client" and the "server" that can be used to initialize
30  two separate Hive pipeline databases.
31 
32  The "client" kept 'take_apart' and 'add_together' analyses and the 'final_result' table, but the 'part_multpily' analysis
33  has been outsourced into the "server" which also maintains its local 'intermediate_result' table.
34 
35  There are 3 links between the pipelines, all established from the "client" side (the "server" doesn't know about them) :
36  1. The "client" seeds the "server" via a cross-database dataflow rule ('take_b_apart'#2 -> 'part_multiply)
37  2. The "client" waits for the 'part_multiply' analysis to complete on the "server" via an analysis_ctrl_rule
38  3. The "client" reads the data from the 'intermediate_result' table of the "server"
39 
40 =head1 LICENSE
41 
42  See the NOTICE file distributed with this work for additional information
43  regarding copyright ownership.
44 
45  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
46  You may obtain a copy of the License at
47 
48  http://www.apache.org/licenses/LICENSE-2.0
49 
50  Unless required by applicable law or agreed to in writing, software distributed under the License
51  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52  See the License for the specific language governing permissions and limitations under the License.
53 
54 =head1 CONTACT
55 
56  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
57 
58 =cut
59 
60 
61 package Bio::EnsEMBL::Hive::Examples::LongMult::PipeConfig::LongMultWfServer_conf;
62 
63 use strict;
64 use warnings;
65 
66 use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
67 use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; # Allow this particular config to use INPUT_PLUS
68 
69 sub pipeline_create_commands {
70  my ($self) = @_;
71  return [
72  @{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables' creation
73 
74  # additional tables needed for long multiplication pipeline's operation:
75  $self->db_cmd('CREATE TABLE intermediate_result (a_multiplier varchar(255) NOT NULL, digit char(1) NOT NULL, partial_product varchar(255) NOT NULL, PRIMARY KEY (a_multiplier, digit))'),
76  ];
77 }
78 
79 
80 sub pipeline_wide_parameters {
81  my ($self) = @_;
82  return {
83  %{$self->SUPER::pipeline_wide_parameters}, # here we inherit anything from the base class
84 
85  'take_time' => 0,
86  };
87 }
88 
89 
90 sub pipeline_analyses {
91  my ($self) = @_;
92  return [
93  { -logic_name => 'part_multiply',
94  -module => 'Bio::EnsEMBL::Hive::Examples::LongMult::RunnableDB::PartMultiply',
95  -analysis_capacity => 4, # use per-analysis limiter
96  -flow_into => {
97  1 => {
98  '?table_name=intermediate_result' => INPUT_PLUS( { 'partial_product' => '#product#' } ),
99  }
100  },
101  },
102  ];
103 }
104 
105 1;
106 
Bio::EnsEMBL::Hive::Examples::LongMult::PipeConfig::LongMultWfClient_conf
Definition: LongMultWfClient_conf.pm:44
Bio::EnsEMBL::Hive::Version
Definition: Version.pm:19
Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf
Definition: HiveGeneric_conf.pm:54
Bio::EnsEMBL::Hive
Definition: Hive.pm:38
Bio::EnsEMBL::Hive::Examples::LongMult::PipeConfig::LongMultWfServer_conf
Definition: LongMultWfServer_conf.pm:44