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.
|
Services for the BLAST suite of tools. More...
Data Structures | |
class | ArgsProcessor |
An ArgsProcessor is a class to abstract out how a particular BlastTool stores a value when an argument is passed to it. More... | |
class | AsyncSystemBlastTool |
A class that will run Blast as an asynchronous system process. More... | |
struct | BlastAppParameters |
This datatype is used to parse a given ParameterSet in a method suitable for a particular BLAST configuration. More... | |
class | BlastFormatter |
This class is for converting the output of a blast job between the available different formats. More... | |
struct | DatabaseInfo |
A datatype describing the details of each database available to search against. More... | |
struct | BlastServiceData |
The configuration data for the Blast Service. More... | |
struct | BlastServiceJob |
This datatype stores the ServiceJob and its associated BlastTool. More... | |
struct | BlastTask |
This datatype is used for describing the algorithms that some of the BLAST tools allow the user to choose to optimise the search procedure. More... | |
class | BlastTool |
The base class for running Blast. More... | |
class | BlastToolFactory |
The base class for generating blast tools. More... | |
class | ByteBufferArgsProcessor |
An ArgsProcessor that adds all of its values to a given ByteBuffer. More... | |
class | DrmaaBlastTool |
A class that will run Blast as a drmaa process. More... | |
class | DrmaaBlastToolFactory |
The base class for generating DrmaaBlastTools. More... | |
class | DrmaaToolArgsProcessor |
An ArgsProcessor that adds all of its values to a given DrmaaTool. More... | |
class | ExternalBlastTool |
A class that will run Blast using an external application such as blastn rather than calling Blast library routines directly. More... | |
class | ExternalBlastToolFactory |
The base class for running blast tools as a separate process. More... | |
class | StringsArgsProcessor |
An ArgsProcessor that adds all of its values to an array of strings. More... | |
class | SystemBlastTool |
A class that will run Blast as a system process. More... | |
class | SystemBlastToolFactory |
The base class for generating system blast tools. More... | |
class | ThreadedBlastTool |
A class that will run Blast within a pthread. More... | |
Enumerations | |
enum | DatabaseType { DT_NUCLEOTIDE, DT_PROTEIN, DT_NUM_TYPES } |
An enumeration for differentiating between the different types of database that the BLAST algorithms can be used with. More... | |
enum | BlastServiceType { BST_BLASTN, BST_BLASTP, BST_BLASTX, BST_NUM_TYPES } |
An enumeration for differentiating between the differentBLAST algorithms that can be used. More... | |
enum | BlastOutputFormat { BOF_PAIRWISE, BOF_QUERY_ANCHORED_WITH_IDENTITIES, BOF_QUERY_ANCHORED_NO_IDENTITIES, BOF_FLAT_QUERY_ANCHORED_WITH_IDENTITIES, BOF_FLAT_QUERY_ANCHORED_NO_IDENTITIES, BOF_XML_BLAST, BOF_TABULAR, BOF_TABULAR_WITH_COMMENTS, BOF_TEXT_ASN1, BOF_BINARY_ASN1, BOF_CSV, BOF_BLAST_ASN1, BOF_JSON_SEQALIGN, BOF_MULTI_FILE_JSON_BLAST, BOF_MULTI_FILE_XML2_BLAST, BOF_SINGLE_FILE_JSON_BLAST, BOF_SINGLE_FILE_XML2_BLAST, BOF_SEQUENCE_ALIGNMENT, BOF_ORGANISM_REPORT, BOF_GRASSROOTS, BOF_NUM_TYPES } |
The different available output formats. More... | |
Functions | |
ServicesArray * | GetServices (User *user_p, GrassrootsServer *grassroots_p) |
Get the Services available for running BLAST jobs. More... | |
void | ReleaseServices (ServicesArray *services_p) |
Free the ServicesArray and its associated BLAST Services. More... | |
ServiceJobSet * | RunBlastService (Service *service_p, ParameterSet *param_set_p, User *user_p, ProvidersStateTable *providers_p, BlastAppParameters *app_params_p) |
Run a Blast Service. More... | |
bool | CloseBlastService (Service *service_p) |
Close a Blast Service. More... | |
ParameterSet * | IsResourceForBlastService (Service *service_p, DataResource *resource_p, Handler *handler_p) |
Check whether a given Resource is suitable for running a Blast Service for and if so return the partially-completed ParameterSet. More... | |
bool | AddBaseBlastServiceParameters (Service *blast_service_p, ParameterSet *param_set_p, DataResource *resource_p, const DatabaseType db_type, AddAdditionalParamsFn query_sequence_callback_fn, void *callback_data_p) |
Add the common Blast Service parameters to a given ParameterSet. More... | |
void | ReleaseBlastServiceParameters (Service *service_p, ParameterSet *params_p) |
Free a ParameterSet of Blast Service parameters. More... | |
bool | DetermineBlastResult (struct BlastServiceJob *job_p) |
Get the results of a given BlastServiceJob and store them within it. More... | |
OperationStatus | GetBlastServiceStatus (Service *service_p, const uuid_t service_id) |
Get the OperationStatus for a BlastServiceJob with the given job id. More... | |
TempFile * | GetInputTempFile (const ParameterSet *params_p, const char *working_directory_s, const uuid_t job_id) |
Get the TempFile detailing the query for a given BlastServiceJob UUID. More... | |
char * | GetBlastResultByUUID (const BlastServiceData *data_p, const uuid_t job_id, const uint32 output_format_code, const char *output_format_params_s) |
Get the result of a previously ran BlastServiceJob in a given output format. More... | |
char * | GetBlastResultByUUIDString (const BlastServiceData *data_p, const char *job_id_s, const uint32 output_format_code, const char *output_format_params_s) |
Get the result of a previously ran BlastServiceJob in a given output format. More... | |
ServiceJobSet * | GetPreviousJobResults (LinkedList *ids_p, BlastServiceData *blast_data_p, const uint32 output_format_code, const char *output_format_params_s) |
Get the results of previously ran BlastServiceJobs in a given output format. More... | |
ServiceJobSet * | CreateJobsForPreviousResults (ParameterSet *params_p, const char *ids_s, BlastServiceData *blast_data_p) |
Get the results of previously ran BlastServiceJobs in a given output format. More... | |
void | PrepareBlastServiceJobs (const DatabaseInfo *db_p, const ParameterSet *const param_set_p, Service *service_p, BlastServiceData *data_p) |
Prepare a ServiceJobSet of BlastServiceJobs prior to running them. More... | |
ServiceJob * | BuildBlastServiceJob (struct Service *service_p, const json_t *service_job_json_p) |
Create a BlastServiceJob from a JSON-based serialisation. More... | |
json_t * | BuildBlastServiceJobJSON (Service *service_p, ServiceJob *service_job_p, bool omit_results_flag) |
Get the JSON representation of a BlastServiceJob. More... | |
const char * | GetMatchingDatabaseFilename (const BlastServiceData *data_p, const char *name_s) |
For a given service-configured name, find the corresponding BLAST database filename. More... | |
const char * | GetMatchingDatabaseName (const BlastServiceData *data_p, const char *filename_s) |
For a given BLAST database filename, find the corresponding service-configured name. More... | |
const DatabaseInfo * | GetMatchingDatabaseByFilename (const BlastServiceData *data_p, const char *filename_s) |
For a given BLAST database filename, find the corresponding DatabaseInfo object. More... | |
bool | AddQuerySequenceParams (BlastServiceData *data_p, ParameterSet *param_set_p, AddAdditionalParamsFn callback_fn, void *callback_data_p) |
Add the common query sequence parameters for a Blast Service. More... | |
bool | AddGeneralAlgorithmParams (BlastServiceData *data_p, ParameterSet *param_set_p, AddAdditionalParamsFn callback_fn, const void *callback_data_p) |
Add the common general algorithm parameters for a Blast Service. More... | |
bool | AddProgramSelectionParameters (BlastServiceData *blast_data_p, ParameterSet *param_set_p, const BlastTask *tasks_p, const BlastTask *default_task_p, const size_t task_mem_size, const size_t num_tasks) |
Add the program selection parameters for a Blast Service. More... | |
uint16 | AddDatabaseParams (BlastServiceData *data_p, ParameterSet *param_set_p, DataResource *resource_p, const DatabaseType db_type) |
Add the database parameters for a Blast Service. More... | |
uint32 | GetNumberOfDatabases (const BlastServiceData *data_p, const DatabaseType dt) |
Get the number of databases of a given type that this BlastService has. More... | |
Parameter * | SetUpPreviousJobUUIDParameter (const BlastServiceData *service_data_p, ParameterSet *param_set_p, ParameterGroup *group_p) |
Create the Parameter for specifying the UUIDs for any previous Blast searches. More... | |
Parameter * | SetUpOutputFormatParameters (const char **formats_ss, const uint32 num_formats, const uint32 default_format, const BlastServiceData *service_data_p, ParameterSet *param_set_p, ParameterGroup *group_p) |
Create the Parameter for specifying the output format from a Blast search. More... | |
char * | CreateGroupName (const char *server_s) |
Create the group name to use for available databases from a given named Server. More... | |
int8 | GetOutputFormatCodeForString (const char *output_format_s) |
Get the output format code corresponding to the given string representation. More... | |
Service * | GetBlastNService (GrassrootsServer *grassroots_p) |
Get a Service capable of running BlastN searches. More... | |
Service * | GetBlastPService (GrassrootsServer *grassroots_p) |
Get a Service capable of running BlastP searches. More... | |
Service * | GetBlastXService (GrassrootsServer *grassroots_p) |
Get a Service capable of running BlastX searches. More... | |
Service * | GetMagicBlastService (GrassrootsServer *grassroots_p) |
Get a Service capable of running Magic-Blast searches. More... | |
bool | AddPairedServiceParameters (Service *service_p, ParameterSet *internal_params_p) |
Add the parameters for all PairedServices of a given Service to given ParameterSet. More... | |
char * | GetPreviousRemoteBlastServiceJob (const char *local_job_id_s, const uint32 output_format_code, const BlastServiceData *blast_data_p) |
Try to get the results of a previously run BlastServiceJob on a remote server. More... | |
bool | SaveRemoteBlastJobDetails (RemoteServiceJob *job_p, const ServiceData *blast_data_p) |
Save the results of a RemoteServiceJob to a local file for ease of access. More... | |
bool | GetBlastServiceConfig (BlastServiceData *data_p) |
Check whether the required configuration details contain the required information for a Blast Service to be used. More... | |
bool | GetAndAddBlastArgs (const ParameterSet *param_set_p, const char *param_name_s, bool required_flag, ArgsProcessor *ap_p) |
Get the named Parameter from a ParameterSet and add it to an ArgsProcessor. More... | |
bool | AddBlastArgs (const Parameter *param_p, ArgsProcessor *ap_p) |
Add an argument derived from the current value of a Parameter to an ArgsProcessor. More... | |
bool | AddArgsPair (const char *key_s, const char *value_s, ArgsProcessor *ap_p) |
Add a pair of arguments to the command line arguments stored in a ByteBuffer. More... | |
bool | AddArgsPairFromIntegerParameter (const ParameterSet *params_p, const char *const param_name_s, const char *key_s, ArgsProcessor *ap_p, const bool unsigned_flag, const bool required_flag) |
Get the value of an integer-based Parameter and add it as key-value pair to the command line arguments accessed by an ArgsProcessor. More... | |
bool | AddArgsPairFromStringParameter (const ParameterSet *params_p, const char *const param_name_s, const char *key_s, ArgsProcessor *ap_p, const bool required_flag) |
Get the value of an string-based Parameter and add it as key-value pair to the command line arguments accessed by an ArgsProcessor. More... | |
Variables | |
NamedParameterType | BS_JOB_ID { .npt_name_s = "job_id" , .npt_type = PT_STRING } |
The Blast Service NamedParameterType for specifying previous job UUIDs. More... | |
NamedParameterType | BS_SUBRANGE_FROM { .npt_name_s = "subrange_from" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the start of a subrange. More... | |
NamedParameterType | BS_SUBRANGE_TO { .npt_name_s = "subrange_to" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the end of a subrange. More... | |
NamedParameterType | BS_TASK { .npt_name_s = "task" , .npt_type = PT_STRING } |
The Blast Service NamedParameterType for specifying the algorithm-specific task to use. More... | |
NamedParameterType | BS_INPUT_QUERY { .npt_name_s = "query" , .npt_type = PT_FASTA } |
The Blast Service NamedParameterType for specifying the input query. More... | |
NamedParameterType | BS_MAX_SEQUENCES { .npt_name_s = "max_target_seqs" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the maximum number of sequences to return. More... | |
NamedParameterType | BS_EXPECT_THRESHOLD { .npt_name_s = "evalue" , .npt_type = PT_UNSIGNED_REAL } |
The Blast Service NamedParameterType for specifying the maximum number of e-value to use. More... | |
NamedParameterType | BS_OUTPUT_FORMAT { .npt_name_s = "outfmt" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the output format to use. More... | |
NamedParameterType | BS_CUSTOM_OUTPUT_FORMAT { .npt_name_s = "custom_outfmt" , .npt_type = PT_STRING } |
The Blast Service NamedParameterType for specifying any custom output format options to use. More... | |
NamedParameterType | BS_WORD_SIZE { .npt_name_s = "word_size" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the word size to use. More... | |
Services for the BLAST suite of tools.
This Module performs BLAST searches on both nucleotide and protein databases. It currently offers the functionality given by blastn, blastp and blastx. The BLAST jobs can be run locally or also on a computing cluster using DRMAA. General information can be found in the blast_services_guide documentation.
enum DatabaseType |
enum BlastServiceType |
enum BlastOutputFormat |
The different available output formats.
ServicesArray* GetServices | ( | User * | user_p, |
GrassrootsServer * | grassroots_p | ||
) |
Get the Services available for running BLAST jobs.
user_p | The details for the user accessing the BLAST Services. |
NULL
upon error. void ReleaseServices | ( | ServicesArray * | services_p | ) |
Free the ServicesArray and its associated BLAST Services.
services_p | The ServicesArray to free. |
ServiceJobSet* RunBlastService | ( | Service * | service_p, |
ParameterSet * | param_set_p, | ||
User * | user_p, | ||
ProvidersStateTable * | providers_p, | ||
BlastAppParameters * | app_params_p | ||
) |
Run a Blast Service.
service_p | The Blast Service to run. |
param_set_p | The ParameterSet specifying the Parameters to use. |
user_p | The User of the user requesting to run the Service. |
providers_p | The details of ExternalServers for any paired or external Blast Services. |
app_params_p | The parser used for the current type of BlastTool. |
NULL
upon error. bool CloseBlastService | ( | Service * | service_p | ) |
ParameterSet* IsResourceForBlastService | ( | Service * | service_p, |
DataResource * | resource_p, | ||
Handler * | handler_p | ||
) |
Check whether a given Resource is suitable for running a Blast Service for and if so return the partially-completed ParameterSet.
service_p | The Blast Service to check. |
resource_p | The given Resource to check for. |
handler_p | The appropriate Handler for accessing the given Resource. |
NULL
if it is not valid for running a Blast search against. bool AddBaseBlastServiceParameters | ( | Service * | blast_service_p, |
ParameterSet * | param_set_p, | ||
DataResource * | resource_p, | ||
const DatabaseType | db_type, | ||
AddAdditionalParamsFn | query_sequence_callback_fn, | ||
void * | callback_data_p | ||
) |
Add the common Blast Service parameters to a given ParameterSet.
blast_service_p | The Blast Service to add the Parameters for. |
param_set_p | The ParameterSet to add the common Parameters to. |
resource_p | Any data passed by the user's request. |
db_type | The type of databases that the given Blast Service will run against. |
add_additional_params_fn | If a Blast Service wishes to add additional parameters this optional callback function can be used. |
true
if the Parameters were added successfully, false
otherwise. void ReleaseBlastServiceParameters | ( | Service * | service_p, |
ParameterSet * | params_p | ||
) |
Free a ParameterSet of Blast Service parameters.
service_p | The BlastService of the same type that allocated the given ParameterSet. |
params_p | The ParameterSet to free. |
bool DetermineBlastResult | ( | struct BlastServiceJob * | job_p | ) |
Get the results of a given BlastServiceJob and store them within it.
job_p | The BlastServiceJob to get the results for. |
true
if the results were added successfully, false
otherwise. OperationStatus GetBlastServiceStatus | ( | Service * | service_p, |
const uuid_t | service_id | ||
) |
Get the OperationStatus for a BlastServiceJob with the given job id.
service_p | The Blast Service of the type which ran the BlastServiceJob. |
service_id | The UUID for the given BlastServiceJob. |
TempFile* GetInputTempFile | ( | const ParameterSet * | params_p, |
const char * | working_directory_s, | ||
const uuid_t | job_id | ||
) |
Get the TempFile detailing the query for a given BlastServiceJob UUID.
params_p | The ParameterSet used to run the ServiceJob. |
working_directory_s | The working directory specified in the Blast Service configuration. |
job_id | The UUID of the BlastServiceJob to check. |
NULL
upon error. char* GetBlastResultByUUID | ( | const BlastServiceData * | data_p, |
const uuid_t | job_id, | ||
const uint32 | output_format_code, | ||
const char * | output_format_params_s | ||
) |
Get the result of a previously ran BlastServiceJob in a given output format.
data_p | The BlastServiceData of the Blast Service that ran the job. |
job_id | The ServiceJob identifier to get the results for. |
output_format_code | The required output format code. |
NULL
upon error. char* GetBlastResultByUUIDString | ( | const BlastServiceData * | data_p, |
const char * | job_id_s, | ||
const uint32 | output_format_code, | ||
const char * | output_format_params_s | ||
) |
Get the result of a previously ran BlastServiceJob in a given output format.
data_p | The BlastServiceData of the Blast Service that ran the job. |
job_id_s | The ServiceJob identifier, as a string, to get the results for. |
output_format_code | The required output format code. |
NULL
upon error. ServiceJobSet* GetPreviousJobResults | ( | LinkedList * | ids_p, |
BlastServiceData * | blast_data_p, | ||
const uint32 | output_format_code, | ||
const char * | output_format_params_s | ||
) |
Get the results of previously ran BlastServiceJobs in a given output format.
ids_p | A LinkedList of StringListNodes each containing the UUIDs for the required ServiceJobs. |
blast_data_p | The BlastServiceData of the Blast Service that ran the job. |
output_format_code | The required output format code. |
NULL
upon error. ServiceJobSet* CreateJobsForPreviousResults | ( | ParameterSet * | params_p, |
const char * | ids_s, | ||
BlastServiceData * | blast_data_p | ||
) |
Get the results of previously ran BlastServiceJobs in a given output format.
params_p | The ParameterSet to get the output format from. |
ids_s | A string containing UUIDs separated by whitespace. |
blast_data_p | The Blast Service configuration data. |
NULL
upon error. void PrepareBlastServiceJobs | ( | const DatabaseInfo * | db_p, |
const ParameterSet *const | param_set_p, | ||
Service * | service_p, | ||
BlastServiceData * | data_p | ||
) |
Prepare a ServiceJobSet of BlastServiceJobs prior to running them.
db_p | The list of available databases terminated by NULL . |
param_set_p | The ParameterSet for specifying the configuration of the BlastServiceJobs. |
service_p | The BlastService. |
data_p | The Blast Service configuration data. |
ServiceJob* BuildBlastServiceJob | ( | struct Service * | service_p, |
const json_t * | service_job_json_p | ||
) |
Create a BlastServiceJob from a JSON-based serialisation.
service_p | The type of Blast Service that previously created the BlastServiceJob. |
service_job_json_p | The JSON fragment representing the BlastServiceJob. |
NULL
upon error. json_t* BuildBlastServiceJobJSON | ( | Service * | service_p, |
ServiceJob * | service_job_p, | ||
bool | omit_results_flag | ||
) |
Get the JSON representation of a BlastServiceJob.
service_p | The Service that ran the BlastServiceJob. |
service_job_p | The BlastServiceJob to serialise. |
omit_results_flag | If this is true then just the minimal status information for the ServiceJob will be returned. If it is false then the job results will be included too if possible. |
NULL
upon error. const char* GetMatchingDatabaseFilename | ( | const BlastServiceData * | data_p, |
const char * | name_s | ||
) |
For a given service-configured name, find the corresponding BLAST database filename.
data_p | The BlastServiceData with the service configuration details. |
name_s | The service-configured name. |
NULL
if it could not be found. const char* GetMatchingDatabaseName | ( | const BlastServiceData * | data_p, |
const char * | filename_s | ||
) |
For a given BLAST database filename, find the corresponding service-configured name.
data_p | The BlastServiceData with the service configuration details. |
filename_s | The BLAST database filename. |
NULL
if it could not be found. const DatabaseInfo* GetMatchingDatabaseByFilename | ( | const BlastServiceData * | data_p, |
const char * | filename_s | ||
) |
For a given BLAST database filename, find the corresponding DatabaseInfo object.
data_p | The BlastServiceData with the service configuration details. |
filename_s | The BLAST database filename. |
NULL
if it could not be found. bool AddQuerySequenceParams | ( | BlastServiceData * | data_p, |
ParameterSet * | param_set_p, | ||
AddAdditionalParamsFn | callback_fn, | ||
void * | callback_data_p | ||
) |
Add the common query sequence parameters for a Blast Service.
data_p | The configuration data for the Blast Service. |
param_set_p | The ParameterSet that the query sequence parameters will be added to. |
callback_fn | If the Blast Service wants to add extra Parameters to the query sequence group of Parameters, it can do so via this callback_fn. This can be NULL |
true
if the query sequence parameters were added successfully, false
otherwise. bool AddGeneralAlgorithmParams | ( | BlastServiceData * | data_p, |
ParameterSet * | param_set_p, | ||
AddAdditionalParamsFn | callback_fn, | ||
const void * | callback_data_p | ||
) |
Add the common general algorithm parameters for a Blast Service.
data_p | The configuration data for the Blast Service. |
param_set_p | The ParameterSet that the general algorithm parameters will be added to. |
callback_fn | If the Blast Service wants to add extra Parameters to the general algorithm group of Parameters, it can do so via this callback_fn. This can be NULL |
true
if the general algorithm parameters were added successfully, false
otherwise. bool AddProgramSelectionParameters | ( | BlastServiceData * | blast_data_p, |
ParameterSet * | param_set_p, | ||
const BlastTask * | tasks_p, | ||
const BlastTask * | default_task_p, | ||
const size_t | task_mem_size, | ||
const size_t | num_tasks | ||
) |
Add the program selection parameters for a Blast Service.
blast_data_p | The configuration data for the Blast Service. |
param_set_p | The ParameterSet that the general algorithm parameters will be added to. |
tasks_p | An optional array of BlastTasks that be can be chosen to alter the search. |
num_tasks | The number of BlastTasks in the array pointed to by tasks_p. |
true
if the general algorithm parameters were added successfully, false
otherwise. uint16 AddDatabaseParams | ( | BlastServiceData * | data_p, |
ParameterSet * | param_set_p, | ||
DataResource * | resource_p, | ||
const DatabaseType | db_type | ||
) |
Add the database parameters for a Blast Service.
data_p | The configuration data for the Blast Service. |
param_set_p | The ParameterSet that the general algorithm parameters will be added to. |
resource_p | The Resource detailing any data sent by the user's request. |
db_type | The type of databases to add. |
uint32 GetNumberOfDatabases | ( | const BlastServiceData * | data_p, |
const DatabaseType | dt | ||
) |
Get the number of databases of a given type that this BlastService has.
data_p | The configuration data for the BlastService to check. |
dt | The type of database to check. |
Parameter* SetUpPreviousJobUUIDParameter | ( | const BlastServiceData * | service_data_p, |
ParameterSet * | param_set_p, | ||
ParameterGroup * | group_p | ||
) |
Create the Parameter for specifying the UUIDs for any previous Blast searches.
service_data_p | The configuration data for the Blast Service. |
param_set_p | The ParameterSet that the UUID Parameter will be added to. |
group_p | The optional ParameterGroup to add the generated Parameter to. This can be NULL . |
NULL
upon error. Parameter* SetUpOutputFormatParameters | ( | const char ** | formats_ss, |
const uint32 | num_formats, | ||
const uint32 | default_format, | ||
const BlastServiceData * | service_data_p, | ||
ParameterSet * | param_set_p, | ||
ParameterGroup * | group_p | ||
) |
Create the Parameter for specifying the output format from a Blast search.
service_data_p | The configuration data for the Blast Service. |
param_set_p | The ParameterSet that the output format Parameter will be added to. |
group_p | The optional ParameterGroup to add the generated Parameter to. This can be NULL . |
NULL
upon error. char* CreateGroupName | ( | const char * | server_s | ) |
Create the group name to use for available databases from a given named Server.
server_s | The name of the Server. |
NULL
upon error. int8 GetOutputFormatCodeForString | ( | const char * | output_format_s | ) |
Get the output format code corresponding to the given string representation.
output_format_s | The output format string. |
Service* GetBlastNService | ( | GrassrootsServer * | grassroots_p | ) |
Service* GetBlastPService | ( | GrassrootsServer * | grassroots_p | ) |
Service* GetBlastXService | ( | GrassrootsServer * | grassroots_p | ) |
Service* GetMagicBlastService | ( | GrassrootsServer * | grassroots_p | ) |
bool AddPairedServiceParameters | ( | Service * | service_p, |
ParameterSet * | internal_params_p | ||
) |
Add the parameters for all PairedServices of a given Service to given ParameterSet.
service_p | The Blast Service whose PairedService Parameters will be added. |
internal_params_p | The ParameterSet to add the PairedService Parameters to. |
true
if the PairedServices were added successfully, false
otherwise. char* GetPreviousRemoteBlastServiceJob | ( | const char * | local_job_id_s, |
const uint32 | output_format_code, | ||
const BlastServiceData * | blast_data_p | ||
) |
Try to get the results of a previously run BlastServiceJob on a remote server.
local_job_id_s | The uuid as a c-style string on the local Server. |
output_format_code | The output format to convert the result to. |
blast_data_p | The configuration data for the local BlastService. |
NULL
upon error. bool SaveRemoteBlastJobDetails | ( | RemoteServiceJob * | job_p, |
const ServiceData * | blast_data_p | ||
) |
Save the results of a RemoteServiceJob to a local file for ease of access.
job_p | The RemoteServiceJob whose results will be saved. |
blast_data_p | The Service configuration data. |
true
if the results were saved successfully, false
otherwise. bool GetBlastServiceConfig | ( | BlastServiceData * | data_p | ) |
Check whether the required configuration details contain the required information for a Blast Service to be used.
data_p | The BlastServcieData to check. |
true
if the configuration details are sufficient, false
otherwise.bool GetAndAddBlastArgs | ( | const ParameterSet * | param_set_p, |
const char * | param_name_s, | ||
bool | required_flag, | ||
ArgsProcessor * | ap_p | ||
) |
Get the named Parameter from a ParameterSet and add it to an ArgsProcessor.
param_set_p | The ParameterSet to search for the named Parameter in. |
param_name_s | The name of the Parameter to search for. |
required_flag | true if the parameter refers to a required variable, false if it is optional. |
ap_p | The ArgsProcessor to use. |
true
if the value was successfully added to the ArgsProcessor or if the value could not be found and the required_flag was false. false
otherwise. bool AddBlastArgs | ( | const Parameter * | param_p, |
ArgsProcessor * | ap_p | ||
) |
Add an argument derived from the current value of a Parameter to an ArgsProcessor.
This will use the datatype of the current value (e.g. string, integer, etc.) when deciding how to add it to the ArgsProcessor
param_p | The Parameter to get the current value from. |
ap_p | The ArgsProcessor to use. |
true
if the value was successfully added to the ArgsProcessor, false
otherwise. bool AddArgsPair | ( | const char * | key_s, |
const char * | value_s, | ||
ArgsProcessor * | ap_p | ||
) |
Add a pair of arguments to the command line arguments stored in a ByteBuffer.
ap_p | The ArgsProcessor to use to store the argument. |
key_s | The first argument to add. |
value_s | The second argument to add. |
true
if the arguments were added successfully, false
otherwise. bool AddArgsPairFromIntegerParameter | ( | const ParameterSet * | params_p, |
const char *const | param_name_s, | ||
const char * | key_s, | ||
ArgsProcessor * | ap_p, | ||
const bool | unsigned_flag, | ||
const bool | required_flag | ||
) |
Get the value of an integer-based Parameter and add it as key-value pair to the command line arguments accessed by an ArgsProcessor.
params_p | The ParameterSet to get the Parameter from. |
param_name_s | The name of the desired Parameter. |
key_s | The key to use when creating the command line arguments. |
ap_p | The ArgsProcessor to use to store the argument. |
unsigned_flag | Is the parameter value unsigned or not? |
required_flag | If this is true then failure to find the Parameter will cause this function to return false . If the value is optional, then set this to false . |
true
if the arguments were added successfully, false
otherwise. bool AddArgsPairFromStringParameter | ( | const ParameterSet * | params_p, |
const char *const | param_name_s, | ||
const char * | key_s, | ||
ArgsProcessor * | ap_p, | ||
const bool | required_flag | ||
) |
Get the value of an string-based Parameter and add it as key-value pair to the command line arguments accessed by an ArgsProcessor.
params_p | The ParameterSet to get the Parameter from. |
param_name_s | The name of the desired Parameter. |
key_s | The key to use when creating the command line arguments. |
ap_p | The ArgsProcessor to use to store the argument. |
required_flag | If this is true then failure to find the Parameter will cause this function to return false . If the value is optional, then set this to false . |
true
if the arguments were added successfully, false
otherwise. NamedParameterType BS_JOB_ID { .npt_name_s = "job_id" , .npt_type = PT_STRING } |
The Blast Service NamedParameterType for specifying previous job UUIDs.
NamedParameterType BS_SUBRANGE_FROM { .npt_name_s = "subrange_from" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the start of a subrange.
NamedParameterType BS_SUBRANGE_TO { .npt_name_s = "subrange_to" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the end of a subrange.
NamedParameterType BS_TASK { .npt_name_s = "task" , .npt_type = PT_STRING } |
The Blast Service NamedParameterType for specifying the algorithm-specific task to use.
NamedParameterType BS_INPUT_QUERY { .npt_name_s = "query" , .npt_type = PT_FASTA } |
The Blast Service NamedParameterType for specifying the input query.
NamedParameterType BS_MAX_SEQUENCES { .npt_name_s = "max_target_seqs" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the maximum number of sequences to return.
NamedParameterType BS_EXPECT_THRESHOLD { .npt_name_s = "evalue" , .npt_type = PT_UNSIGNED_REAL } |
The Blast Service NamedParameterType for specifying the maximum number of e-value to use.
NamedParameterType BS_OUTPUT_FORMAT { .npt_name_s = "outfmt" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the output format to use.
NamedParameterType BS_CUSTOM_OUTPUT_FORMAT { .npt_name_s = "custom_outfmt" , .npt_type = PT_STRING } |
The Blast Service NamedParameterType for specifying any custom output format options to use.
NamedParameterType BS_WORD_SIZE { .npt_name_s = "word_size" , .npt_type = PT_UNSIGNED_INT } |
The Blast Service NamedParameterType for specifying the word size to use.