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.
drmaa_blast_tool.hpp
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
21 /*
22  * drmaa_blast_tool.hpp
23  *
24  * Created on: 27 Apr 2015
25  * Author: billy
26  */
27 
28 #ifndef DRMAA_BLAST_TOOL_HPP_
29 #define DRMAA_BLAST_TOOL_HPP_
30 
32 #include "external_blast_tool.hpp"
33 #include "drmaa_tool.h"
34 
35 
42 {
43 public:
44 
56  static DrmaaBlastTool *GetFromJSON (const json_t *json_p, const char *name_s, const char *program_name_s, ServiceJob *job_p, BlastServiceData *service_data_p);
57 
71  DrmaaBlastTool (BlastServiceJob *job_p, const char *name_s, const char *factory_s, const BlastServiceData *data_p, const char *blast_program_name_s, const char *queue_name_s, const char *const output_path_s, bool async_flag);
72 
73 
82  DrmaaBlastTool (BlastServiceJob *job_p, const BlastServiceData *data_p, const json_t *json_p);
83 
84 
94  void SetDrmaaOptions (DrmaaTool *drmaa_p, bool async_flag);
95 
99  virtual ~DrmaaBlastTool ();
100 
112  virtual OperationStatus Run ();
113 
114 
124  virtual OperationStatus GetStatus (bool update_flag = true);
125 
126 
134  void SetCoresPerSearch (uint32 cores);
135 
144  bool SetEmailNotifications (const char **email_addresses_ss);
145 
152  virtual bool SetUpOutputFile ();
153 
154 
155 protected:
156 
163 
164 
173  virtual ArgsProcessor *GetArgsProcessor ();
174 
187  virtual bool AddBlastArg (const char * const arg_s, const bool hyphen_flag);
188 
189 
190 
201  virtual bool AddToJSON (json_t *root_p);
202 
203 
204 private:
205 
206 
207 
208  static const char * const DBT_DRMAA_S;
209 
215  DrmaaTool *dbt_drmaa_tool_p;
216 
222  bool dbt_async_flag;
223 
224 
225  DrmaaBlastTool (ServiceJob *job_p, DrmaaTool *drmaa_p, bool async_flag);
226 };
227 
228 
229 
230 #endif /* DRMAA_BLAST_TOOL_HPP_ */
DrmaaBlastTool::dbt_args_processor_p
DrmaaToolArgsProcessor * dbt_args_processor_p
The DrmaaToolArgsProcessor that this DrmaaBlastTool will use.
Definition: drmaa_blast_tool.hpp:162
BlastServiceJob
This datatype stores the ServiceJob and its associated BlastTool.
Definition: blast_service_job.h:66
DrmaaToolArgsProcessor
An ArgsProcessor that adds all of its values to a given DrmaaTool.
Definition: drmaa_tool_args_processor.hpp:40
ExternalBlastTool::AddToJSON
virtual bool AddToJSON(json_t *root_p)
This method is used to serialise this ExternalBlastTool so that it can be recreated from another call...
ServiceJob
A datatype to represent a running task.
Definition: service_job.h:72
BlastServiceData
The configuration data for the Blast Service.
Definition: blast_service.h:143
external_blast_tool.hpp
BLAST_SERVICE_LOCAL
#define BLAST_SERVICE_LOCAL
Definition: blast_service_api.h:48
ExternalBlastTool
A class that will run Blast using an external application such as blastn rather than calling Blast li...
Definition: external_blast_tool.hpp:42
OperationStatus
OperationStatus
The current status of an Operation.
Definition: operation.h:96
drmaa_tool_args_processor.hpp
ExternalBlastTool::AddBlastArg
virtual bool AddBlastArg(const char *const arg_s, const bool hyphen_flag)
Add the argument to the command line arguments that this BlastTool will run with.
BlastTool::Run
virtual OperationStatus Run()=0
Run this BlastTool.
drmaa_tool.h
DrmaaTool
A Tool for running Drmaa jobs.
Definition: drmaa_tool.h:56
BlastTool::GetStatus
virtual OperationStatus GetStatus(bool update_flag=true)
Get the status of a BlastTool.
ExternalBlastTool::GetArgsProcessor
virtual ArgsProcessor * GetArgsProcessor()=0
Get the ArgsProcessor that this BlastTool will use to parse the input ParameterSet prior to running i...
ExternalBlastTool::SetUpOutputFile
virtual bool SetUpOutputFile()
Set the output file parameter.
DrmaaBlastTool
A class that will run Blast as a drmaa process.
Definition: drmaa_blast_tool.hpp:41
ArgsProcessor
An ArgsProcessor is a class to abstract out how a particular BlastTool stores a value when an argumen...
Definition: args_processor.hpp:46