|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
The base class for running Blast. More...
#include <blast_tool.hpp>
Public Member Functions | |
| BlastTool (BlastServiceJob *job_p, const char *name_s, const char *factory_s, const BlastServiceData *data_p, const uint32 output_format, const char *custom_output_s) | |
| Create a BlastTool for a given ServiceJob. More... | |
| BlastTool (BlastServiceJob *job_p, const BlastServiceData *data_p, const json_t *json_p) | |
| Create a BlastTool for a given ServiceJob. More... | |
| virtual | ~BlastTool () |
| The BlastTool destructor,. More... | |
| uint32 | GetOutputFormat () const |
| Get the output format code that this BlastTool will produce its results in. More... | |
| virtual OperationStatus | Run ()=0 |
| Run this BlastTool. More... | |
| virtual bool | ParseParameters (ParameterSet *param_set_p, BlastAppParameters *app_params_p)=0 |
| Parse a ParameterSet to configure a BlastTool prior to it being ran. More... | |
| virtual bool | SetInputFilename (const char *const filename_s)=0 |
| Set the input filename for the BlastTool to use. More... | |
| virtual bool | SetUpOutputFile ()=0 |
| Set the output file parameter. More... | |
| virtual bool | PreRun () |
| Any custom functionality required before running a BlastTool. More... | |
| virtual void | PostRun () |
| Any custom functionality required after running a BlastTool. More... | |
| virtual OperationStatus | GetStatus (bool update_flag=true) |
| Get the status of a BlastTool. More... | |
| virtual char * | GetResults (BlastFormatter *formatter_p)=0 |
| Get the results after the ExternalBlastTool has finished running. More... | |
| virtual char * | GetLog ()=0 |
| Get the log after the BlastTool has finished running. More... | |
| virtual bool | AddErrorDetails () |
| const uuid_t & | GetUUID () const |
| Get the uuid for the ServiceJob that this BlastTool is linked with. More... | |
| const char * | GetName () const |
| Get the name asssociated with this BlastTool. More... | |
| json_t * | GetAsJSON () |
| Get the JSON-based persistent description of this BlastTool. More... | |
| const char * | GetFactoryName () const |
| Get the name of the BlastToolFactory that created this BlastTool. More... | |
| bool | SetCustomOutputColumns (const char *custom_columns_s) |
| void | FreeBlastTool (BlastTool *tool_p) |
| Free a BlastTool. More... | |
| OperationStatus | RunBlast (BlastTool *tool_p) |
| Run Blast using the parameters that have been previously using ConvertArguments. More... | |
| OperationStatus | GetBlastStatus (BlastTool *tool_p) |
| Get the current OperationStatus of a BlastTool. More... | |
| bool | IsBlastToolSynchronous (BlastTool *tool_p) |
| Is the BlastTool going to run asynchronously? More... | |
Protected Member Functions | |
| virtual bool | AddToJSON (json_t *root_p) |
| This method is used to serialise this BlastTool so that it can be recreated from another calling process when required. More... | |
Protected Attributes | |
| uint32 | bt_output_format |
| The output format code to use. More... | |
| char * | bt_custom_output_columns_s |
| Any custom columns for tabular output formats. More... | |
The base class for running Blast.
| BlastTool | ( | BlastServiceJob * | job_p, |
| const char * | name_s, | ||
| const char * | factory_s, | ||
| const BlastServiceData * | data_p, | ||
| const uint32 | output_format, | ||
| const char * | custom_output_s | ||
| ) |
Create a BlastTool for a given ServiceJob.
| job_p | The ServiceJob to associate with this BlastTool. |
| name_s | The name to give to this BlastTool. |
| data_p | The BlastServiceData for the Service that will run this BlastTool. |
| factory_s | The name of the BlastToolFactory that created this BlastTool. |
| output_format | The output format that this BlastTool will produce its results in. |
| BlastTool | ( | BlastServiceJob * | job_p, |
| const BlastServiceData * | data_p, | ||
| const json_t * | json_p | ||
| ) |
Create a BlastTool for a given ServiceJob.
| job_p | The ServiceJob to associate with this BlastTool. |
| data_p | The BlastServiceData for the Service that will run this BlastTool. |
| json_p | The JSON fragment representing a serialised version of the BlastTool. |
| uint32 GetOutputFormat | ( | ) | const |
Get the output format code that this BlastTool will produce its results in.
|
pure virtual |
Run this BlastTool.
Implemented in DrmaaBlastTool, SystemBlastTool, AsyncSystemBlastTool, and ThreadedBlastTool.
|
pure virtual |
Parse a ParameterSet to configure a BlastTool prior to it being ran.
| param_set_p | The ParameterSet to parse. |
| app_params_p | The BlastAppParameters to use process the values from the given ParameterSe |
true if the BlastTool was configured successfully and is ready to be ran, false otherwise. Implemented in SystemBlastTool, and ExternalBlastTool.
|
pure virtual |
Set the input filename for the BlastTool to use.
| filename_s | The filename. |
true if the input filename was set successfully, false otherwise. Implemented in ExternalBlastTool.
|
pure virtual |
Set the output file parameter.
true if the input filename was set successfully, false otherwise. Implemented in DrmaaBlastTool, and ExternalBlastTool.
|
virtual |
Any custom functionality required before running a BlastTool.
Reimplemented in AsyncSystemBlastTool.
|
virtual |
Any custom functionality required after running a BlastTool.
|
virtual |
Get the status of a BlastTool.
| update_flag | if this is true then the BlastTool will check the status of its running jobs if necessary, if this is false it will return the last cached value. |
Reimplemented in DrmaaBlastTool, AsyncSystemBlastTool, SystemBlastTool, and ThreadedBlastTool.
|
pure virtual |
Get the results after the ExternalBlastTool has finished running.
| formatter_p | The BlastFormatter to convert the results into a different format. If this is 0, then the results will be returned without any conversion. |
Implemented in ExternalBlastTool, AsyncSystemBlastTool, and ThreadedBlastTool.
|
pure virtual |
Get the log after the BlastTool has finished running.
Implemented in ExternalBlastTool.
|
virtual |
| const uuid_t& GetUUID | ( | ) | const |
Get the uuid for the ServiceJob that this BlastTool is linked with.
| const char* GetName | ( | ) | const |
Get the name asssociated with this BlastTool.
| json_t* GetAsJSON | ( | ) |
| const char* GetFactoryName | ( | ) | const |
Get the name of the BlastToolFactory that created this BlastTool.
| bool SetCustomOutputColumns | ( | const char * | custom_columns_s | ) |
|
protectedvirtual |
This method is used to serialise this BlastTool so that it can be recreated from another calling process when required.
This is used to store the BlastTool in the JobsManager.
| root_p | The json object to add the serialisation of this BlastTool to. |
true if the BlastTool was serialised successfully, false otherwise. Reimplemented in ExternalBlastTool, DrmaaBlastTool, and AsyncSystemBlastTool.
| void FreeBlastTool | ( | BlastTool * | tool_p | ) |
| OperationStatus RunBlast | ( | BlastTool * | tool_p | ) |
Run Blast using the parameters that have been previously using ConvertArguments.
| tool_p | The BlastTool to use. |
true if the tool completed successfully, false otherwise. | OperationStatus GetBlastStatus | ( | BlastTool * | tool_p | ) |
| bool IsBlastToolSynchronous | ( | BlastTool * | tool_p | ) |
|
protected |
The output format code to use.
|
protected |
Any custom columns for tabular output formats.