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.
|
Go to the documentation of this file.
23 #ifndef BLAST_SERVICE_H
24 #define BLAST_SERVICE_H
189 #ifndef DOXYGEN_SHOULD_SKIP_THIS
191 #ifdef ALLOCATE_BLAST_SERVICE_CONSTANTS
192 #define BLAST_SERVICE_PREFIX BLAST_SERVICE_LOCAL
193 #define BLAST_SERVICE_VAL(x) = x
194 #define BLAST_SERVICE_STRUCT_VAL(x,y) = { x, y}
196 #define BLAST_SERVICE_PREFIX extern
197 #define BLAST_SERVICE_VAL(x)
198 #define BLAST_SERVICE_STRUCT_VAL(x,y)
209 #define BS_DEFAULT_OUTPUT_FORMAT (11)
247 BLAST_SERVICE_PREFIX
const char *
BS_APP_NAME_S BLAST_SERVICE_VAL (
"blast_app_type");
251 #define BS_GROUP_ALIAS_PREFIX_S "blast"
This datatype stores the ServiceJob and its associated BlastTool.
Definition: blast_service_job.h:66
BlastToolFactory * bsd_tool_factory_p
The BlastToolFactory used to generate each BlastTool that actually run the Blast jobs.
Definition: blast_service.h:164
A datatype to tell the system that certain parameters should be grouped together in the client's user...
Definition: parameter_group.h:85
#define BLAST_SERVICE_API
Definition: blast_service_api.h:47
const char * di_search_description_s
The description to use for indexing in the Grassroots search service.
Definition: blast_service.h:95
const char * di_filename_s
The filename for the database.
Definition: blast_service.h:89
bool di_active_flag
Sets whether the database defaults to being searched against or not.
Definition: blast_service.h:107
ServiceJobSet * RunBlastService(Service *service_p, ParameterSet *param_set_p, User *user_p, ProvidersStateTable *providers_p, BlastAppParameters *app_params_p)
Run a Blast Service.
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.
bool(* AddAdditionalParamsFn)(BlastServiceData *data_p, ParameterSet *param_set_p, ParameterGroup *group_p, const void *callback_data_p)
A callback function used to amend a given ParameterSet.
Definition: blast_service.h:186
DatabaseType di_type
The DatabaseType for this database.
Definition: blast_service.h:110
const char * GetMatchingDatabaseName(const BlastServiceData *data_p, const char *filename_s)
For a given BLAST database filename, find the corresponding service-configured name.
ParameterType
The different types that a Parameter can take.
Definition: parameter_type.h:35
This datatype is used to parse a given ParameterSet in a method suitable for a particular BLAST confi...
Definition: blast_app_parameters.h:47
A datatype to represent a running task.
Definition: service_job.h:72
const DatabaseInfo * GetMatchingDatabaseByFilename(const BlastServiceData *data_p, const char *filename_s)
For a given BLAST database filename, find the corresponding DatabaseInfo object.
DatabaseInfo * bsd_databases_p
A NULL-terminated array of the databases available to search.
Definition: blast_service.h:161
The configuration data for the Blast Service.
Definition: blast_service.h:143
A search using the BlastX program.
Definition: blast_service.h:71
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 parti...
A datatype representing a URI.
Definition: data_resource.h:40
DatabaseType
An enumeration for differentiating between the different types of database that the BLAST algorithms ...
Definition: blast_service.h:42
BlastServiceData * AllocateBlastServiceData(Service *blast_service_p, DatabaseType database_type)
Allocate a BlastServiceData.
const char * BS_DATABASE_GROUP_NAME_S
The prefix to use for the ParameterGroup names for available databases from all of the connected serv...
Definition: blast_service.h:228
BlastFormatter * bsd_formatter_p
The BlastFormatter used to convert the Blast output between the different output formats.
Definition: blast_service.h:158
const char * BS_LOG_SUFFIX_S
The suffix to use for Blast Service log files.
Definition: blast_service.h:218
const char * BS_OUTPUT_SUFFIX_S
The suffix to use for Blast Service output files.
Definition: blast_service.h:215
The database is a protein sequence.
Definition: blast_service.h:48
const char * BS_DATABASES_S
Definition: blast_service.h:231
void ReleaseServices(ServicesArray *services_p)
Free the ServicesArray and its associated BLAST Services.
void CustomiseBlastServiceJob(Service *service_p, ServiceJob *job_p)
Initialise a BlastServiceJob with its required functions for updating and freeing itself.
void ReleaseBlastService(Service *service_p)
A datatype which defines an available service, its capabilities and its parameters.
Definition: service.h:153
void FreeBlastServiceData(BlastServiceData *data_p)
Free a BlastServiceData.
A datatype for having a set of Services.
Definition: service.h:422
ServiceData bsd_base_data
The base ServiceData.
Definition: blast_service.h:146
const char * GetMatchingDatabaseFilename(const BlastServiceData *data_p, const char *name_s)
For a given service-configured name, find the corresponding BLAST database filename.
OperationStatus GetBlastServiceStatus(Service *service_p, const uuid_t service_id)
Get the OperationStatus for a BlastServiceJob with the given job id.
#define BLAST_SERVICE_LOCAL
Definition: blast_service_api.h:48
A search using the BlastP program.
Definition: blast_service.h:68
ServiceJob * BuildBlastServiceJob(struct Service *service_p, const json_t *service_job_json_p)
Create a BlastServiceJob from a JSON-based serialisation.
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
ServicesArray * GetServices(User *user_p, GrassrootsServer *grassroots_p)
Get the Services available for running BLAST jobs.
json_t * BuildBlastServiceJobJSON(Service *service_p, ServiceJob *service_job_p, bool omit_results_flag)
Get the JSON representation of a BlastServiceJob.
This is a datatype that is used to keep track of which servers and services have already been process...
Definition: providers_state_table.h:49
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.
The database is a nucleotide sequence.
Definition: blast_service.h:45
const char * BS_APP_NAME_S
The configuration key used to declare the type of Blast application to use.
Definition: blast_service.h:247
OperationStatus
The current status of an Operation.
Definition: operation.h:96
const char * di_name_s
The name of the database to display to the user.
Definition: blast_service.h:86
const char * BS_TOOL_TYPE_NAME_S
The configuration key used to declare which type of BlastTool to use.
Definition: blast_service.h:236
void ReleaseBlastServiceParameters(Service *service_p, ParameterSet *params_p)
Free a ParameterSet of Blast Service parameters.
Create a temporary file to read and write data to.
Definition: blast/include/temp_file.hpp:46
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.
A datatype for storing AsyncTasks in a collection.
Definition: async_tasks_manager.h:24
DatabaseType bsd_type
Specifies whether the databases are nucleotide or protein databases.
Definition: blast_service.h:168
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.
Definition: grassroots_server.h:45
A search using the BlastN program.
Definition: blast_service.h:65
A datatype describing the details of each database available to search against.
Definition: blast_service.h:83
const char * di_download_uri_s
The URI to download any associated resources for this database.
Definition: blast_service.h:98
char * bsd_working_dir_s
The directory where the Blast input, output and log files will be stored.
Definition: blast_service.h:152
A datatype to represent a collection of ServiceJobs.
Definition: service_job.h:185
const char * di_scaffold_key_s
The key used to get the scaffold name for any hits from BLAST searches from within the "BlastOutput2....
Definition: blast_service.h:119
const char * di_description_s
The description of the database to display to the user.
Definition: blast_service.h:92
A datatype to store user credentials.
Definition: user_details.h:40
ServiceMetadata * GetGeneralBlastServiceMetadata(Service *service_p)
The number of different Blast service types.
Definition: blast_service.h:74
const char * BS_COMMAND_NAME_S
The configuration key used to declare the Blast executable file to use.
Definition: blast_service.h:241
const char * BS_DEFAULT_OUTPUT_FORMAT_S
The default output format as a string to use.
Definition: blast_service.h:225
The number of different database types.
Definition: blast_service.h:51
A datatype for holding the configuration data for a Service.
Definition: service.h:126
const char * BS_INPUT_SUFFIX_S
The suffix to use for Blast Service input files.
Definition: blast_service.h:212
bool GetBlastServiceConfig(BlastServiceData *data_p)
Check whether the required configuration details contain the required information for a Blast Service...
bool GetBaseBlastServiceParameterTypeForNamedParameter(const Service *service_p, const char *param_name_s, ParameterType *pt_p)
A Handler is a datatype for accessing data.
Definition: handler.h:72
A set of Parameters along with an optional name and description.
Definition: parameter_set.h:46
json_t * GetBlastIndexingData(Service *service_p)
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.
const char * di_scaffold_regex_s
The regular expression used to get the scaffold name for the value associated with the value retrieve...
Definition: blast_service.h:127
BlastServiceType
An enumeration for differentiating between the differentBLAST algorithms that can be used.
Definition: blast_service.h:62
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.
bool CloseBlastService(Service *service_p)
Close a Blast Service.
bool DetermineBlastResult(struct BlastServiceJob *job_p)
Get the results of a given BlastServiceJob and store them within it.
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.
AsyncTasksManager * bsd_task_manager_p
Definition: blast_service.h:171
const char * di_info_uri_s
The URI to for any supplementary information about the database.
Definition: blast_service.h:101
Definition: windows_uuid.h:43