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.
AsyncSystemPolymarkerTool Class Reference

#include <async_system_polymarker_tool.hpp>

Inheritance diagram for AsyncSystemPolymarkerTool:
[legend]
Collaboration diagram for AsyncSystemPolymarkerTool:
[legend]

Public Member Functions

 AsyncSystemPolymarkerTool (PolymarkerServiceJob *job_p, const PolymarkerSequence *seq_p, const PolymarkerServiceData *data_p)
 
 AsyncSystemPolymarkerTool (PolymarkerServiceJob *job_p, const PolymarkerSequence *seq_p, const PolymarkerServiceData *data_p, const json_t *root_p)
 
virtual ~AsyncSystemPolymarkerTool ()
 
virtual bool PreRun ()
 The function that will be called before trying to run this PolymarkerTool. More...
 
virtual bool PostRun ()
 The function that will be called after running this PolymarkerTool. More...
 
virtual char * GetLog ()
 Get the log after the PolymarkerTool has finished running. More...
 
virtual char * GetResults (PolymarkerFormatter *formatter_p)
 Get the results from the run of this PolymarkerTool. More...
 
virtual OperationStatus Run ()
 
virtual OperationStatus GetStatus (bool update_flag)
 Get the OperationStatus for the ServiceJob that this PolymarkerTool is running. More...
 
virtual bool ParseParameters (const ParameterSet *const param_set_p)
 Parse a ParameterSet to set the variables that the PolymarkerTool's ServiceJob will run with. More...
 
virtual bool AddToJSON (json_t *root_p)
 Add the required information for this PolymarkerTool to be serialised to JSON and deserialised again. More...
 
virtual PolymarkerToolType GetToolType () const
 Get the PolymarkerToolType for this PolymarkerTool. More...
 
- Public Member Functions inherited from PolymarkerTool
 PolymarkerTool (PolymarkerServiceJob *job_p, const PolymarkerSequence *seq_p, const PolymarkerServiceData *data_p)
 
 PolymarkerTool (PolymarkerServiceJob *job_p, const PolymarkerSequence *seq_p, const PolymarkerServiceData *data_p, const json_t *root_p)
 
virtual ~PolymarkerTool ()
 The PolymarkerTool destructor. More...
 
const char * GetName ()
 Get the name of this PolymarkerTool. More...
 
bool AddSectionToResult (json_t *result_p, const char *const filename_s, const char *const key_s, PolymarkerFormatter *formatter_p)
 
void SetPolymarkerSequence (const PolymarkerSequence *seq_p)
 Set the PolymarkerSequence that this PolymarkerTool will run against. More...
 
bool SaveJobMetadata () const
 
bool SetJobMetadata ()
 
bool SetJobUUID (const uuid_t id)
 
void FreePolymarkerTool (PolymarkerTool *tool_p)
 Free a given PolymarkerTool. More...
 
OperationStatus RunPolymarkerTool (PolymarkerTool *tool_p)
 Run a given PolymarkerTool. More...
 

Protected Member Functions

bool CreateArgs (const char *input_s, char *output_s, char *contigs_s)
 
TempFileGetInputFile (const char *gene_id_s, const char *target_chromosome_s, const char *sequence_s)
 
char * GetOutputFolder ()
 
bool GetStringParameter (const ParameterSet *const params_p, const char *param_name_s, char **param_value_ss)
 
void FreeCommandLineArgs ()
 
bool SetExecutable (const PolymarkerServiceData *data_p)
 

Protected Attributes

const char * aspt_executable_s
 
char * aspt_command_line_args_s
 
- Protected Attributes inherited from PolymarkerTool
PolymarkerServiceJobpt_service_job_p
 The PolymarkerServiceJob that this PolymarkerTool will run. More...
 
const PolymarkerSequencept_seq_p
 The PolymarkerSequence that this PolymarkerTool's ServiceJob will be running against. More...
 
const PolymarkerServiceDatapt_service_data_p
 The PolymarkerServiceData for the PolymarkerService that will be running this PolymarkerTool. More...
 
char * pt_job_dir_s
 The local directory where the results and logging data will be stored. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from PolymarkerTool
static const char *const PT_JOB_DIR_S
 The key used for specifying the PolymarkerTool's job directory within and JSON-based serialisations of a PolymarkerTool. More...
 

Constructor & Destructor Documentation

◆ AsyncSystemPolymarkerTool() [1/2]

AsyncSystemPolymarkerTool ( PolymarkerServiceJob job_p,
const PolymarkerSequence seq_p,
const PolymarkerServiceData data_p 
)

◆ AsyncSystemPolymarkerTool() [2/2]

AsyncSystemPolymarkerTool ( PolymarkerServiceJob job_p,
const PolymarkerSequence seq_p,
const PolymarkerServiceData data_p,
const json_t *  root_p 
)

◆ ~AsyncSystemPolymarkerTool()

virtual ~AsyncSystemPolymarkerTool ( )
virtual

Member Function Documentation

◆ PreRun()

virtual bool PreRun ( )
virtual

The function that will be called before trying to run this PolymarkerTool.

Returns
true if the call was successful, false otherwise

Reimplemented from PolymarkerTool.

◆ PostRun()

virtual bool PostRun ( )
virtual

The function that will be called after running this PolymarkerTool.

Returns
true if the call was successful, false otherwise

Implements PolymarkerTool.

◆ GetLog()

virtual char* GetLog ( )
virtual

Get the log after the PolymarkerTool has finished running.

Returns
The logging messages as a c-style string or 0 upon error.

Implements PolymarkerTool.

◆ GetResults()

virtual char* GetResults ( PolymarkerFormatter formatter_p)
virtual

Get the results from the run of this PolymarkerTool.

Parameters
formatter_pThe PolymarkerFormatter used to
Returns
The results as a c-style string or 0 upon error.

Implements PolymarkerTool.

◆ Run()

virtual OperationStatus Run ( )
virtual

Implements PolymarkerTool.

◆ GetStatus()

virtual OperationStatus GetStatus ( bool  update_flag)
virtual

Get the OperationStatus for the ServiceJob that this PolymarkerTool is running.

Parameters
update_flagIf this is true, then the ServiceJob will be checked for its latest status. If this is false, then the last cached value will be used.
Returns
The OperationStatus for this PolymarkerTool's ServiceJob.

Implements PolymarkerTool.

◆ ParseParameters()

virtual bool ParseParameters ( const ParameterSet *const  param_set_p)
virtual

Parse a ParameterSet to set the variables that the PolymarkerTool's ServiceJob will run with.

Parameters
param_set_pThe ParameterSet that the variables will be set from.
Returns
true if the required variables were collected successfully, false otherwise

Implements PolymarkerTool.

◆ AddToJSON()

virtual bool AddToJSON ( json_t *  root_p)
virtual

Add the required information for this PolymarkerTool to be serialised to JSON and deserialised again.

This is called by each child class of PolymarkerTool all the way down to the actual PolymarkerTool child object that is being used.

Parameters
root_pThe JSON fragment that the required details will be added to
Returns
true if the information was added successfully, false otherwise

Reimplemented from PolymarkerTool.

◆ GetToolType()

virtual PolymarkerToolType GetToolType ( ) const
virtual

Get the PolymarkerToolType for this PolymarkerTool.

Returns
The PolymarkerToolType.

Implements PolymarkerTool.

◆ CreateArgs()

bool CreateArgs ( const char *  input_s,
char *  output_s,
char *  contigs_s 
)
protected

◆ GetInputFile()

TempFile* GetInputFile ( const char *  gene_id_s,
const char *  target_chromosome_s,
const char *  sequence_s 
)
protected

◆ GetOutputFolder()

char* GetOutputFolder ( )
protected

◆ GetStringParameter()

bool GetStringParameter ( const ParameterSet *const  params_p,
const char *  param_name_s,
char **  param_value_ss 
)
protected

◆ FreeCommandLineArgs()

void FreeCommandLineArgs ( )
protected

◆ SetExecutable()

bool SetExecutable ( const PolymarkerServiceData data_p)
protected

Field Documentation

◆ aspt_executable_s

const char* aspt_executable_s
protected

◆ aspt_command_line_args_s

char* aspt_command_line_args_s
protected

The documentation for this class was generated from the following file: