is_remote_search,
135blast::SDataLoaderConfig
149 #define BLAST_EXIT_SUCCESS 0 151 #define BLAST_INPUT_ERROR 1 153 #define BLAST_DATABASE_ERROR 2 155 #define BLAST_ENGINE_ERROR 3 157 #define BLAST_OUT_OF_MEMORY 4 159 #define BLAST_NETWORK_ERROR 5 161 #define BLAST_OUTPUT_ERROR 6 163 #define BLAST_UNKNOWN_ERROR 255 167 #define CATCH_ALL(exit_code) \ 168 catch (const CInvalidDataException& e) { \ 169 LOG_POST(Error << "BLAST options error: "<< e.GetMsg()); \
170exit_code = BLAST_INPUT_ERROR; \
172catch (const blast::CInputException& e) { \
173LOG_POST(Error << "BLAST query/options error: " << e.GetMsg()); \
174LOG_POST(Error << "Please refer to the BLAST+ user manual."); \
175exit_code = BLAST_INPUT_ERROR; \
177catch (const CArgException& e) { \
178LOG_POST(Error << "Command line argument error: " << e.GetMsg()); \
179exit_code = BLAST_INPUT_ERROR; \
181catch (const CObjReaderParseException& e) { \
182LOG_POST(Error << "BLAST query error: " << e.GetMsg()); \
183exit_code = BLAST_INPUT_ERROR; \
185catch (const CSeqDBException& e) { \
186if (e.GetErrCode() == CSeqDBException::eTooManyOpenFiles) { \
188"Too many open files, please raise the open file limit"; \
189LOG_POST(Error << "BLAST Database error: " << err_msg); \
190exit_code = BLAST_DATABASE_ERROR; \
192else if (e.GetErrCode() == CSeqDBException::eMemoryMappingFailure){ \
193string err_msg = "Database memory map file error"; \
194if (!e.GetMsg().empty()) \
195err_msg += " - " + e.GetMsg(); \
196LOG_POST(Error << "BLAST Database error: " << err_msg); \
197exit_code = BLAST_DATABASE_ERROR; \
200LOG_POST(Error << "BLAST Database error: " << e.GetMsg()); \
201exit_code = BLAST_DATABASE_ERROR; \
204catch (const blastdbindex::CDbIndex_Exception& e) { \
205LOG_POST(Error << "Indexed BLAST database error: " << e.GetMsg()); \
206exit_code = BLAST_DATABASE_ERROR; \
208catch (const CIndexedDbException& e) { \
209LOG_POST(Error << "Indexed BLAST database error: " << e.GetMsg()); \
210exit_code = BLAST_DATABASE_ERROR; \
212catch (const CWriteDBException& e) { \
213LOG_POST(Error << "BLAST Database creation error: " << e.GetMsg()); \
214exit_code = BLAST_INPUT_ERROR; \
216catch (const blast::CBlastException& e) { \
217const string& msg = e.GetMsg(); \
218if (e.GetErrCode() == CBlastException::eInvalidOptions) { \
219LOG_POST(Error << "BLAST options error: " << e.GetMsg()); \
220exit_code = BLAST_INPUT_ERROR; \
221} else if ((NStr::Find(msg, "Out of memory") != NPOS) || \
222(NStr::Find(msg, "Failed to allocate") != NPOS)) { \
223LOG_POST(Error << "BLAST ran out of memory: " << e.GetMsg()); \
224exit_code = BLAST_OUT_OF_MEMORY; \
226LOG_POST(Error << "BLAST engine error: " << e.GetMsg()); \
227exit_code = BLAST_ENGINE_ERROR; \
230catch (const blast::CBlastSystemException& e) { \
231if (e.GetErrCode() == CBlastSystemException::eOutOfMemory) { \
232LOG_POST(Error << "BLAST ran out of memory: " << e.GetMsg()); \
233exit_code = BLAST_OUT_OF_MEMORY; \
234} else if (e.GetErrCode() == CBlastSystemException::eNetworkError) {\
235LOG_POST(Error << "Network error: " << e.GetMsg()); \
236exit_code = BLAST_NETWORK_ERROR; \
238LOG_POST(Error << "System error: " << e.GetMsg()); \
239exit_code = BLAST_UNKNOWN_ERROR; \
242catch (const CIOException& e) { \
243if (e.GetErrCode() == CIOException::eFlush) { \
244LOG_POST(Error << "BLAST failed to write output: " << e.GetMsg());\
245exit_code = BLAST_OUTPUT_ERROR; \
248catch (const CException& e) { \
249LOG_POST(Error << "Error: " << e.what()); \
250exit_code = BLAST_UNKNOWN_ERROR; \
252catch (const std::ios::failure&) { \
253LOG_POST(Error << "BLAST failed to write output"); \
254exit_code = BLAST_OUTPUT_ERROR; \
256catch (const std::bad_alloc&) { \
257LOG_POST(Error << "BLAST ran out of memory"); \
258exit_code = BLAST_OUT_OF_MEMORY; \
260catch (const std::exception& e) { \
261LOG_POST(Error << "Error: " << e.what()); \
262exit_code = BLAST_UNKNOWN_ERROR; \
265LOG_POST(Error << "Unknown exception occurred"); \
266exit_code = BLAST_UNKNOWN_ERROR; \
280blast::CBlastAppArgs* cmdline_args,
285 unsigned intnum_iters = 0);
333 void LogQueryInfo(blast::CBlastUsageReport & report,
constblast::CBlastInput & q_info);
336 void LogBlastOptions(blast::CBlastUsageReport & report,
constblast::CBlastOptions & opt);
337 void LogCmdOptions(blast::CBlastUsageReport & report,
constblast::CBlastAppArgs & args);
User-defined methods of the data storage class.
BLAST formatter utilities.
void LogQueryInfo(blast::CBlastUsageReport &report, const blast::CBlastInput &q_info)
CRef< blast::CRemoteBlast > InitializeRemoteBlast(CRef< blast::IQueryFactory > queries, CRef< blast::CBlastDatabaseArgs > db_args, CRef< blast::CBlastOptionsHandle > opts_hndl, bool verbose_output, const string &client_id=kEmptyStr, CRef< objects::CPssmWithParameters > pssm=CRef< objects::CPssmWithParameters >())
Initializes a CRemoteBlast instance for usage by command line BLAST binaries.
void CheckMTByQueries_QuerySize(blast::EProgram prog, int batch_size)
blast::SDataLoaderConfig InitializeQueryDataLoaderConfiguration(bool query_is_protein, CRef< blast::CLocalDbAdapter > db_adapter)
Initialize the data loader configuration for the query.
void CheckForFreqRatioFile(const string &rps_dbname, CRef< blast::CBlastOptionsHandle > &opt_handle, bool isRpsblast)
void SaveSearchStrategy(const CArgs &args, blast::CBlastAppArgs *cmdline_args, CRef< blast::IQueryFactory > queries, CRef< blast::CBlastOptionsHandle > opts_hndl, CRef< objects::CPssmWithParameters > pssm=CRef< objects::CPssmWithParameters >(), unsigned int num_iters=0)
Save the search strategy corresponding to the current command line search.
void QueryBatchCleanup()
Clean up formatter scope and release.
string RegisterOMDataLoader(CRef< CSeqDB > db_handle)
Register the BLAST database data loader using the already initialized CSeqDB object.
string GetSubjectFile(const CArgs &args)
Get name of subject file @parameter args arguments class [in].
bool UseXInclude(const blast::CFormattingArgs &f, const string &s)
bool RecoverSearchStrategy(const CArgs &args, blast::CBlastAppArgs *cmdline_args)
Recover search strategy from input file.
void MTByQueries_DBSize_Warning(const Int8 length_limit, bool is_db_protein)
void PrintErrorArchive(const CArgs &a, const list< CRef< CBlast4_error > > &msg)
Function to print blast archive with only error messages (search failed) to output stream.
int GetMTByQueriesBatchSize(blast::EProgram p, int num_threads, const string &task="")
void InitializeSubject(CRef< blast::CBlastDatabaseArgs > db_args, CRef< blast::CBlastOptionsHandle > opts_hndl, bool is_remote_search, CRef< blast::CLocalDbAdapter > &db_adapter, CRef< objects::CScope > &scope)
Initializes the subject/database as well as its scope.
CRef< blast::CBlastAncillaryData > ExtractPssmAncillaryData(const objects::CPssmWithParameters &pssm)
Auxiliary function to extract the ancillary data from the PSSM.
string GetCmdlineArgs(const CNcbiArguments &a)
void BlastFormatter_PreFetchSequenceData(const blast::CSearchResultSet &results, CRef< CScope > scope, blast::CFormattingArgs::EOutputFormat format_type)
This method optimize the retrieval of sequence data to scope.
bool IsIStreamEmpty(CNcbiIstream &in)
void LogCmdOptions(blast::CBlastUsageReport &report, const blast::CBlastAppArgs &args)
void LogBlastOptions(blast::CBlastUsageReport &report, const blast::CBlastOptions &opt)
Log blast usage opts for rpsblast apps.
Interface for converting blast-related command line arguments into blast options.
Interface for converting sources of sequence data into blast sequence input.
Declares CBlastScopeSource class to create properly configured CScope objects to invoke the BLAST dat...
EProgram
This enumeration is to evolve into a task/program specific list that specifies sets of default parame...
Class to mix batch size for BLAST runs.
void SetTargetHits(Int4 target)
const Int4 k_MinBatchSize
Int4 GetBatchSize(Int4 hits=-1)
const Int4 k_MaxBatchSize
const Int4 k_MinTargetHits
CBatchSizeMixer(Int4 max_batch_size)
int32_t Int4
4-byte (32-bit) signed integer
int64_t Int8
8-byte (64-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
Declares class which provides internal BLAST database representations to the internal BLAST APIs.
std::istream & in(std::istream &in_, double &x_)
Declares the CRemoteBlast class.
Defines BLAST database access classes.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Uniform BLAST Search Interface.
Defines exception class for WriteDB.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4