38 =
"Could not calculate ungapped Karlin-Altschul parameters due "
39 "to an invalid query sequence or its translation. Please verify the "
40 "query sequence(s) and/or filtering options";
52 if ( !filename || !(strlen(filename) > 0) ) {
85 if (blast_msg ==
NULL)
103 int context,
const char *message)
107 if (blast_msg ==
NULL)
121 while (var_msg->
next)
123 var_msg = var_msg->
next;
125 var_msg->
next = new_msg;
129 *blast_msg = new_msg;
138 if (blast_msg ==
NULL)
141 fprintf(stderr,
"%s", blast_msg->
message);
163 switch (error_code) {
166 new_msg->
message =
strdup(
"Failed to calculate ideal Karlin-Altschul "
173 "Smith-Waterman not supported for your "
179 new_msg->
message =
strdup(
"BLAST search interrupted at user's request");
209 new_msg->
message =
strdup(
"search cannot proceed due to errors in all "
210 "contexts/frames of query sequences");
216 new_msg->
message =
strdup(
"The average subject length is too short");
222 new_msg->
message =
strdup(
"search cannot proceed due to errors "
223 "retrieving sequences from databases");
233 new_msg->
message =
strdup(
"Too many open files, please raise the open file limit");
246 snprintf(
buf,
sizeof(
buf) - 1,
"Unknown error code %d", error_code);
Definitions used throughout BLAST.
#define sfree(x)
Safe free a pointer: belongs to a higher level header.
const char * kBlastErrMsg_CantCalculateUngappedKAParams
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 th...
void Blast_Perror(Blast_Message **msg, Int2 error_code, int context)
Analogous to perror.
Int2 Blast_MessagePost(Blast_Message *blast_msg)
Print a message with ErrPostEx.
SMessageOrigin * SMessageOriginFree(SMessageOrigin *msgo)
Deallocate a SMessageOrigin structure.
Int2 Blast_MessageWrite(Blast_Message **blast_msg, EBlastSeverity severity, int context, const char *message)
Writes a message to a structure.
const int kBlastMessageNoContext
Declared in blast_message.h as extern const.
SMessageOrigin * SMessageOriginNew(const char *filename, unsigned int lineno)
Allocate a new SMessageOrigin structure.
Blast_Message * Blast_MessageFree(Blast_Message *blast_msg)
Deallocates message memory.
Structures for BLAST messages.
EBlastSeverity
Blast error message severities .
#define BLASTERR_INTERRUPTED
BLAST search was interrupted via a user-provided callback.
#define BLASTERR_IDEALSTATPARAMCALC
Could not compute the ideal Karlin-Altschul parameters.
#define BLASTERR_SUBJECT_LENGTH_INVALID
Subject seqs min avg length error.
#define BLASTERR_NOVALIDKARLINALTSCHUL
Could not calculate Karlin-Altschul statistics for any context.
#define BLASTERR_INVALIDQUERIES
All queries/contexts are determined invalid in the setup code.
#define BLASTERR_SEQSRC
Blast seqsrc returns BLAST_SEQSRC_ERROR.
#define BLASTERR_DB_MEMORY_MAP
Database file error.
#define BLASTERR_REDOALIGNMENTCORE_NOTSUPPORTED
Composition based statistics/Smith-Waterman not supported for a program type.
#define BLASTERR_MEMORY
System error: out of memory condition.
#define BLASTERR_INVALIDPARAM
Invalid parameter: possible programmer error or pre-condition not met.
#define BLASTERR_DB_OPEN_FILES
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
int16_t Int2
2-byte (16-bit) signed integer
#define ASSERT
macro for assert.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Structure to hold the a message from the core of the BLAST engine.
int context
Context, allows us to print message for query number.
EBlastSeverity severity
severity code
SMessageOrigin * origin
Optional: origin of the message.
char * message
User message to be saved.
struct Blast_Message * next
next message in this list
Structure to enclose the origin of an error message or warning.
int lineno
Line number in the file above.
char * filename
Name of the file.
static CS_CONTEXT * context
voidp calloc(uInt items, uInt size)