NCBI C++ ToolKit
|
Structures for BLAST messages. More...
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | SMessageOrigin |
Structure to enclose the origin of an error message or warning. More... | |
struct | Blast_Message |
Structure to hold the a message from the core of the BLAST engine. More... | |
Macros | |
#define | Blast_PerrorWithLocation(msg, error_code, context) Blast_PerrorEx(msg, error_code, __FILE__, __LINE__, context) |
Convenient define to call the function Blast_PerrorEx. More... | |
#define | BLASTERR_MEMORY 50 |
System error: out of memory condition. More... | |
#define | BLASTERR_INVALIDPARAM 75 |
Invalid parameter: possible programmer error or pre-condition not met. More... | |
#define | BLASTERR_IDEALSTATPARAMCALC 100 |
Could not compute the ideal Karlin-Altschul parameters. More... | |
#define | BLASTERR_REDOALIGNMENTCORE_NOTSUPPORTED 101 |
Composition based statistics/Smith-Waterman not supported for a program type. More... | |
#define | BLASTERR_INVALIDQUERIES 102 |
All queries/contexts are determined invalid in the setup code. More... | |
#define | BLASTERR_INTERRUPTED 103 |
BLAST search was interrupted via a user-provided callback. More... | |
#define | BLASTERR_NOVALIDKARLINALTSCHUL 104 |
Could not calculate Karlin-Altschul statistics for any context. More... | |
#define | BLASTERR_OPTION_PROGRAM_INVALID 201 |
The option is not supported with the specified program. More... | |
#define | BLASTERR_OPTION_VALUE_INVALID 202 |
The value of the option is not supported (e.g., word size too small) More... | |
#define | BLASTERR_SUBJECT_LENGTH_INVALID 203 |
Subject seqs min avg length error. More... | |
#define | BLASTERR_SEQSRC 300 |
Blast seqsrc returns BLAST_SEQSRC_ERROR. More... | |
#define | BLASTERR_DB_MEMORY_MAP 400 |
Database file error. More... | |
#define | BLASTERR_DB_OPEN_FILES 401 |
Typedefs | |
typedef struct SMessageOrigin | SMessageOrigin |
Structure to enclose the origin of an error message or warning. More... | |
typedef struct Blast_Message | Blast_Message |
Structure to hold the a message from the core of the BLAST engine. More... | |
Enumerations | |
enum | EBlastSeverity { eBlastSevInfo = 1 , eBlastSevWarning , eBlastSevError , eBlastSevFatal } |
Blast error message severities . More... | |
Functions | |
Blast_Message * | Blast_MessageFree (Blast_Message *blast_msg) |
Deallocates message memory. More... | |
Int2 | Blast_MessageWrite (Blast_Message **blast_msg, EBlastSeverity severity, int context, const char *message) |
Writes a message to a structure. More... | |
Int2 | Blast_MessagePost (Blast_Message *blast_msg) |
Print a message with ErrPostEx. More... | |
void | Blast_Perror (Blast_Message **msg, Int2 error_code, int context) |
Analogous to perror. More... | |
void | Blast_PerrorEx (Blast_Message **msg, Int2 error_code, const char *file_name, int lineno, int context) |
Extended version of Blast_Perror which includes parameters for the file name and line number where the error/warning occurred. More... | |
Variables | |
const int | kBlastMessageNoContext |
Declared in blast_message.h as extern const. More... | |
const char * | kBlastErrMsg_CantCalculateUngappedKAParams |
Structures for BLAST messages.
Definition in file blast_message.h.
#define Blast_PerrorWithLocation | ( | msg, | |
error_code, | |||
context | |||
) | Blast_PerrorEx(msg, error_code, __FILE__, __LINE__, context) |
Convenient define to call the function Blast_PerrorEx.
Definition at line 119 of file blast_message.h.
#define BLASTERR_DB_MEMORY_MAP 400 |
Database file error.
Definition at line 177 of file blast_message.h.
#define BLASTERR_DB_OPEN_FILES 401 |
Definition at line 178 of file blast_message.h.
#define BLASTERR_IDEALSTATPARAMCALC 100 |
Could not compute the ideal Karlin-Altschul parameters.
Definition at line 149 of file blast_message.h.
#define BLASTERR_INTERRUPTED 103 |
BLAST search was interrupted via a user-provided callback.
Definition at line 159 of file blast_message.h.
#define BLASTERR_INVALIDPARAM 75 |
Invalid parameter: possible programmer error or pre-condition not met.
Definition at line 146 of file blast_message.h.
#define BLASTERR_INVALIDQUERIES 102 |
All queries/contexts are determined invalid in the setup code.
Definition at line 156 of file blast_message.h.
#define BLASTERR_MEMORY 50 |
System error: out of memory condition.
Definition at line 143 of file blast_message.h.
#define BLASTERR_NOVALIDKARLINALTSCHUL 104 |
Could not calculate Karlin-Altschul statistics for any context.
Definition at line 162 of file blast_message.h.
#define BLASTERR_OPTION_PROGRAM_INVALID 201 |
The option is not supported with the specified program.
Definition at line 165 of file blast_message.h.
#define BLASTERR_OPTION_VALUE_INVALID 202 |
The value of the option is not supported (e.g., word size too small)
Definition at line 168 of file blast_message.h.
#define BLASTERR_REDOALIGNMENTCORE_NOTSUPPORTED 101 |
Composition based statistics/Smith-Waterman not supported for a program type.
Definition at line 153 of file blast_message.h.
#define BLASTERR_SEQSRC 300 |
Blast seqsrc returns BLAST_SEQSRC_ERROR.
Definition at line 174 of file blast_message.h.
#define BLASTERR_SUBJECT_LENGTH_INVALID 203 |
Subject seqs min avg length error.
Definition at line 171 of file blast_message.h.
typedef struct Blast_Message Blast_Message |
Structure to hold the a message from the core of the BLAST engine.
typedef struct SMessageOrigin SMessageOrigin |
Structure to enclose the origin of an error message or warning.
enum EBlastSeverity |
Blast error message severities .
These start with 1 to be consistent with the C toolkit severity numbers.
Enumerator | |
---|---|
eBlastSevInfo | |
eBlastSevWarning | |
eBlastSevError | |
eBlastSevFatal |
Definition at line 55 of file blast_message.h.
Blast_Message* Blast_MessageFree | ( | Blast_Message * | blast_msg | ) |
Deallocates message memory.
blast_msg | structure to be deallocated [in] |
Definition at line 80 of file blast_message.c.
References Blast_Message::message, Blast_Message::next, next(), NULL, Blast_Message::origin, sfree, and SMessageOriginFree().
Referenced by Blast_PerrorEx(), BlastErrorCode2String(), BOOST_AUTO_TEST_CASE(), s_BlastMessageToException(), s_Validate(), TestFixture::SetUpLookupTable(), LinkHspTestFixture::setupScoreBlk(), CBlastExtendTestFixture::setupStructures(), CPssmEngine::x_InitializeScoreBlock(), and CTracebackTestFixture::~CTracebackTestFixture().
Int2 Blast_MessagePost | ( | Blast_Message * | blast_msg | ) |
Print a message with ErrPostEx.
blast_msg | message to be printed [in] |
Definition at line 136 of file blast_message.c.
References Blast_Message::message, and NULL.
Int2 Blast_MessageWrite | ( | Blast_Message ** | blast_msg, |
EBlastSeverity | severity, | ||
int | context, | ||
const char * | message | ||
) |
Writes a message to a structure.
The Blast_Message* is allocated.
blast_msg | structure to be filled in [in] |
severity | severity code [in] |
context | query context to which this error applies [in] |
message | User message to be saved [in] |
Definition at line 102 of file blast_message.c.
References calloc(), Blast_Message::context, context, Blast_Message::message, Blast_Message::next, NULL, Blast_Message::severity, and strdup.
Referenced by Blast_GumbelBlkCalc(), Blast_KarlinBlkGappedCalc(), Blast_KarlinBlkNuclGappedCalc(), Blast_ScoreBlkKbpUngappedCalc(), Blast_SetPHIPatternInfo(), BLAST_ValidateOptions(), BlastExtensionOptionsValidate(), BlastFilteringOptionsFromString(), BlastHitSavingOptionsValidate(), BlastInitialWordOptionsValidate(), BlastKarlinReportAllowedValues(), BlastScoringOptionsValidate(), BlastSetUp_GetFilteringLocations(), LookupTableOptionsValidate(), PSIBlastOptionsValidate(), s_BlastExtensionScoringOptionsValidate(), s_DiscWordOptionsValidate(), s_GetEffectiveSearchSpaceForContext(), s_GetNuclValuesArray(), s_PHIScoreBlkFill(), SBlastFilterOptionsValidate(), and SPHIPatternSearchBlkNew().
void Blast_Perror | ( | Blast_Message ** | msg, |
Int2 | error_code, | ||
int | context | ||
) |
Analogous to perror.
msg | object to be appended to or created [in|out] |
error_code | error code returned from BLAST function [in] |
context | context number so that query or frame can be found [in] |
Definition at line 147 of file blast_message.c.
References Blast_PerrorEx(), context, msg(), and NULL.
void Blast_PerrorEx | ( | Blast_Message ** | msg, |
Int2 | error_code, | ||
const char * | file_name, | ||
int | lineno, | ||
int | context | ||
) |
Extended version of Blast_Perror which includes parameters for the file name and line number where the error/warning occurred.
This function should be invoked via the Blast_PerrorWithLocation macro.
msg | object to be appended to or created [in|out] |
error_code | one of the error codes defined below [in] |
file_name | name of the file where the error ocurred [in] |
lineno | line number where the error ocurred in the file above [in] |
context | context number so that query or frame can be found [in] |
Definition at line 154 of file blast_message.c.
References ASSERT, Blast_MessageFree(), BLASTERR_DB_MEMORY_MAP, BLASTERR_DB_OPEN_FILES, BLASTERR_IDEALSTATPARAMCALC, BLASTERR_INTERRUPTED, BLASTERR_INVALIDPARAM, BLASTERR_INVALIDQUERIES, BLASTERR_MEMORY, BLASTERR_NOVALIDKARLINALTSCHUL, BLASTERR_REDOALIGNMENTCORE_NOTSUPPORTED, BLASTERR_SEQSRC, BLASTERR_SUBJECT_LENGTH_INVALID, buf, calloc(), Blast_Message::context, context, eBlastSevError, eBlastSevFatal, eBlastSevInfo, file_name, kBlastErrMsg_CantCalculateUngappedKAParams, lineno, Blast_Message::message, msg(), Blast_Message::next, Blast_Message::origin, Blast_Message::severity, SMessageOriginNew(), and strdup.
Referenced by Blast_Perror().
|
extern |
Definition at line 37 of file blast_message.c.
Referenced by Blast_PerrorEx(), Blast_ScoreBlkKbpUngappedCalc(), BlastSetupPreliminarySearchEx(), BOOST_AUTO_TEST_CASE(), and CBlastPrelimSearch::Run().
Declared in blast_message.h as extern const.
Definition at line 36 of file blast_message.c.
Referenced by TSearchMessages::AddMessageAllQueries(), Blast_GumbelBlkCalc(), Blast_KarlinBlkGappedCalc(), Blast_KarlinBlkNuclGappedCalc(), BLAST_MainSetUp(), Blast_Message2TSearchMessages(), Blast_ScoreBlkKbpUngappedCalc(), Blast_SetPHIPatternInfo(), BLAST_ValidateOptions(), BlastErrorCode2String(), BlastExtensionOptionsValidate(), BlastFilteringOptionsFromString(), BlastHitSavingOptionsValidate(), BlastInitialWordOptionsValidate(), BlastKarlinReportAllowedValues(), BlastScoringOptionsValidate(), BlastSetup_ScoreBlkInit(), CRemoteBlast::GetResultSet(), LookupTableOptionsValidate(), PSIBlastOptionsValidate(), CBlastPrelimSearch::Run(), s_BlastExtensionScoringOptionsValidate(), s_DiscWordOptionsValidate(), s_GetNuclValuesArray(), s_PHIScoreBlkFill(), SBlastFilterOptionsValidate(), and SPHIPatternSearchBlkNew().