ensembl-hive  2.6
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::RunnableDB::SystemCmd:

Public Member Functions

public param_defaults ()
 
public run ()
 
public write_output ()
 
public Void complete_early_if_branch_connected ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::Process
public new ()
 
public life_cycle ()
 
public say_with_header ()
 
public enter_status ()
 
public warning ()
 
public param_defaults ()
 
public fetch_input ()
 
public run ()
 
public write_output ()
 
public Bio::EnsEMBL::Hive::Worker worker ()
 
public execute_writes ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBAdaptor db ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBConnection dbc ()
 
public Bio::EnsEMBL::Hive::DBSQL::DBConnection data_dbc ()
 
public Returns run_system_command ()
 
public Bio::EnsEMBL::Hive::AnalysisJob input_job ()
 
public input_id ()
 
public param ()
 
public param_required ()
 
public param_exists ()
 
public param_is_defined ()
 
public param_substitute ()
 
public dataflow_output_id ()
 
public dataflow_output_ids_from_json ()
 
public throw ()
 
public This complete_early ()
 
public Int debug ()
 
public worker_temp_directory ()
 
public cleanup_worker_temp_directory ()
 

Detailed Description

Synopsis

standaloneJob.pl Bio::EnsEMBL::Hive::RunnableDB::SystemCmd --cmd 'ls -1 ${ENSEMBL_CVS_ROOT_DIR}/ensembl-hive/modules/Bio/EnsEMBL/Hive/RunnableDB/*.pm >building_blocks.list'

Description

    This RunnableDB module acts as a wrapper for shell-level command lines. If you behave you may also use parameter substitution.

    The command line must be stored in the parameters() as the value corresponding to the 'cmd' key.
    It allows to pass in other parameters and use the parameter substitution mechanism in its full glory.

    This Runnable also allows the creation of dataflow using JSON stored in an external file.
    Each line of this file contains an optional branch number, followed by a complete JSON serialisation of the parameters (output_id)
    appearing on the same single line. For example, a line to direct dataflow on branch 2 might look like:

          2 {"parameter_name" : "parameter_value"}

    If no branch number is provided, then dataflow of those parameters will occour on the branch number
    passed to SystemCmd in the 'dataflow_branch' parameter, if given. Otherwise, it will default to
    branch 1 (autoflow).

    A sample file is provided at ${EHIVE_ROOT_DIR}/modules/Bio/EnsEMBL/Hive/Examples/SystemCmd/PipeConfig/sample_files/Inject_JSON_Dataflow_example.json

Definition at line 31 of file SystemCmd.pm.

Member Function Documentation

◆ complete_early_if_branch_connected()

public Void Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::complete_early_if_branch_connected ( )
  Arg[1]      : (string) message
  Arg[2]      : (integer) branch number
  Description : Wrapper around complete_early that first checks that the
                branch is connected to something.
  Returntype  : void if the branch is not connected. Otherwise doesn't return
 
Code:
click to view

◆ param_defaults()

public Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::param_defaults ( )

Undocumented method

Code:
click to view

◆ run()

public Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::run ( )
    Description : Implements run() interface method of Bio::EnsEMBL::Hive::Process that is used to perform the main bulk of the job (minus input and output).
                  Here it actually runs the command line.
    param('cmd'): The recommended way of passing in the command line. It can be either a string, or an array-ref of strings. The later is safer if some of the
                  arguments contain white-spaces.
    param('*'):   Any other parameters can be freely used for parameter substitution.
 
Code:
click to view

◆ write_output()

public Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::write_output ( )
    Description : Implements write_output() interface method of Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution.
                  Here we take actions based on the command's exit status.
 
Code:
click to view

The documentation for this class was generated from the following file:
map
public map()
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd
Definition: SystemCmd.pm:31
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::complete_early_if_branch_connected
public Void complete_early_if_branch_connected()
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::param_defaults
public param_defaults()
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::run
public run()
Bio::EnsEMBL::Hive::RunnableDB::SystemCmd::write_output
public write_output()