ensembl-hive  2.8.1
InjectJSONDataflow_conf.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 SYNOPSIS
8 
10 
11  seed_pipeline.pl -url $HIVE_URL -logic_name perform_cmd -input_id "{'cmd' => 'sleep 0', 'dataflow_file' => './sample_files/Inject_JSON_Dataflow_example.json'}"
12 
13  runWorker.pl -url $HIVE_URL
14 
15 =head1 DESCRIPTION
16 
17  This is an example of using the SystemCmd runnable to create dataflow events using parameters read from a JSON file.
18  There is a sample file located in ${EHIVE_ROOT_DIR}/modules/Bio/EnsEMBL/Hive/Examples/SystemCmd/PipeConfig/sample_files/
19  This file is called Inject_JSON_Dataflow_example.json
20 
21  Each line of this file contains an optional branch number, followed by a complete JSON serialisation of the parameters (output_id)
22  appearing on the same line. For example, a line to direct dataflow on branch 2 might look like:
23 
24  2 {"parameter_name" : "parameter_value"}
25 
26  If no branch number is provided, then dataflow of those parameters will occour on the branch number
27  passed to SystemCmd in the 'dataflow_branch' parameter, if given. Otherwise, it will default to
28  branch 1 (autoflow).
29 
30  Note that a command must be provided to SystemCmd using the 'cmd' parameter, even if JSON parameter injection
31  is the only desired behaviour.
32 
33 
34 =head1 LICENSE
35 
36  See the NOTICE file distributed with this work for additional information
37  regarding copyright ownership.
38 
39  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
40  You may obtain a copy of the License at
41 
42  http://www.apache.org/licenses/LICENSE-2.0
43 
44  Unless required by applicable law or agreed to in writing, software distributed under the License
45  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46  See the License for the specific language governing permissions and limitations under the License.
47 
48 =head1 CONTACT
49 
50  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
51 
52 =cut
53 
54 
55 package Bio::EnsEMBL::Hive::Examples::SystemCmd::PipeConfig::InjectJSONDataflow_conf;
56 
57 use strict;
58 use warnings;
59 use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');
60 
61 
62 sub pipeline_analyses {
63  return [
64  { -logic_name => 'perform_cmd',
65  -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd',
66  -flow_into => {
67  1 => ['autoflow_test'],
68  2 => ['branch2_test'],
69  3 => ['branch3_test'],
70  4 => ['branch4_test'],
71  },
72  },
73  { -logic_name => 'autoflow_test',
74  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
75  },
76  { -logic_name => 'branch2_test',
77  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
78  },
79  { -logic_name => 'branch3_test',
80  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
81  },
82  { -logic_name => 'branch4_test',
83  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
84  },
85  ];
86 }
87 
88 1;
89 
EnsEMBL
Definition: Filter.pm:1
Bio::EnsEMBL::Hive::Examples::SystemCmd::PipeConfig::InjectJSONDataflow_conf
Definition: InjectJSONDataflow_conf.pm:37
Bio
Definition: AltAlleleGroup.pm:4