public interface PluginInterface
PluginInterface interface.
This interface defines the required behavior of a SeqWare Pipeline plugin. Essentially it assumes a life-cycle made up of several phases for a plugin, specifying a function for each of these phase that an implementation overrides to provide the code executed during that phase. The phases are:
init()
do_verify_parameters()
do_verify_input()
do_test()
do_run()
do_verify_output()
clean_up()
Information about the the success or failure of each step is packaged into a
ReturnValue
object, including anything sent to STDOUT and STDERR.
The lifecyle is very similar to the module lifecycle but with a different emphasis. Modules are designed to call an external tool from within workflows whereas plugins are intended to extend the core functionality of SeqWare Pipeline tool itself and have nothing to with calling external tools.
Methods that are not implemented can return ReturnValue.NOTIMPLEMENTED (-1). The PluginRunner will skip over these steps, and only fail on error if a method returns > 0.
Modifier and Type | Method and Description |
---|---|
ReturnValue |
clean_up()
Perform post-task clean-up here.
|
ReturnValue |
do_run()
Performs the main tasks for the plugin.
|
ReturnValue |
do_test()
Perform any active system testing here.
|
String |
get_description()
Generates a short description of the plugin, preferably one line.
|
String |
get_syntax()
Generates a "help" message for the user of the plugin.
|
ReturnValue |
init()
Plugin initialization code goes here.
|
ReturnValue |
parse_parameters()
Parameter validation code goes here.
|
void |
setConfig(Map<String,String> config)
Let's you set the config this object should use.
|
void |
setMetadata(Metadata metadata)
Lets you set the metadata object
|
void |
setParams(List<String> params)
Lets you set a List of params so the plugin can deal with parameters
|
void setConfig(Map<String,String> config)
config
- A map that includes the key/values from the SeqWare settings file.void setParams(List<String> params)
params
- The parameters specifically passed in to the plugin.void setMetadata(Metadata metadata)
metadata
- a Metadata
object.String get_syntax()
String get_description()
ReturnValue parse_parameters()
ReturnValue init()
ReturnValue do_test()
ReturnValue do_run()
ReturnValue clean_up()
Copyright © 2015 SeqWare. All rights reserved.