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'}"
13 runWorker.pl -url $HIVE_URL
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
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:
24 2 {
"parameter_name" :
"parameter_value"}
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
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.
36 See the NOTICE file distributed with
this work
for additional information
37 regarding copyright ownership.
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
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.
50 Please subscribe to the
Hive mailing list: http:
55 package Bio::EnsEMBL::Hive::Examples::SystemCmd::PipeConfig::InjectJSONDataflow_conf;
59 use base (
'Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');
62 sub pipeline_analyses {
64 { -logic_name =>
'perform_cmd',
65 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd',
67 1 => [
'autoflow_test'],
68 2 => [
'branch2_test'],
69 3 => [
'branch3_test'],
70 4 => [
'branch4_test'],
73 { -logic_name =>
'autoflow_test',
74 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
76 { -logic_name =>
'branch2_test',
77 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
79 { -logic_name =>
'branch3_test',
80 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
82 { -logic_name =>
'branch4_test',
83 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::Dummy',