46 #define LOCAL_LN2 0.69314718055994530941723212145818
59 #ifndef COMPO_INTENSE_DEBUG
60 #define COMPO_INTENSE_DEBUG 0
64 #define EVALUE_STRETCH 5
68 #define CMP(a,b) ((a)>(b) ? 1 : ((a)<(b) ? -1 : 0))
72 #define KAPPA_CONTAINED_IN_HSP(a,b,c,d,e,f) \
73 ((a <= c && b >= c) && (d <= f && e >= f))
75 #define KAPPA_SIGN(a) (((a) > 0) ? 1 : (((a) < 0) ? -1 : 0))
105 int queryStart,
int queryEnd,
int queryIndex,
106 int matchStart,
int matchEnd,
int frame,
111 align->
score = score;
118 align->
frame = frame;
129 void (*free_context)(
void*))
133 align = *palign; *palign =
NULL;
134 while (align !=
NULL) {
154 list = *plist; new_list =
NULL;
155 while (list !=
NULL) {
157 list->
next = new_list;
173 0 == (
result =
CMP(
a->matchStart,
b->matchStart)) &&
175 0 == (
result =
CMP(
a->queryStart,
b->queryStart))) {
188 for (align = alignments; align !=
NULL; align = align->
next) {
203 for ( ; list !=
NULL; list = list->
next) {
226 int i, leftcnt, rightcnt;
230 rightcnt = hspcnt - leftcnt;
237 for (
i = 0;
i < leftcnt - 1 && list->
next !=
NULL;
i++) {
240 rightlist = list->
next;
256 while (leftlist !=
NULL || rightlist !=
NULL) {
257 if (leftlist ==
NULL) {
260 }
else if (rightlist ==
NULL) {
267 leftlist = leftlist->
next;
270 rightlist = rightlist->
next;
388 void free_align_context(
void *),
396 int include_new_align;
399 include_new_align = 1;
401 for (align = oldAlignments; align !=
NULL; align = align->
next) {
416 include_new_align = 0;
421 if (include_new_align) {
425 tail = &newAlign->
next;
426 align = oldAlignments;
427 while (align !=
NULL) {
446 *p_oldAlignments = newAlign;
456 if (self->buffer)
free(self->buffer);
457 self->data =
NULL;
self->buffer =
NULL;
470 int queryOrigin,
int queryLength,
int query_index,
476 if (window !=
NULL) {
483 window->
align = align;
485 for ( ; align !=
NULL; align = align->
next) {
501 range.begin =
self->subject_range.begin;
502 range.end =
self->subject_range.end;
503 range.context =
self->subject_range.context;
504 self->subject_range.begin =
self->query_range.begin;
505 self->subject_range.end =
self->query_range.end;
506 self->subject_range.context =
self->query_range.context;
507 self->query_range.begin =
range.begin;
508 self->query_range.end =
range.end;
509 self->query_range.context =
range.context;
522 if (*window !=
NULL) {
551 sbjct_range1->
end =
MAX(sbjct_range1->
end, sbjct_range2->
end);
555 for (align = win1->
align; align !=
NULL; align = align->
next) {
632 return ((length -
ABS(frame) + 1)/3);
646 int hspcnt,
int border,
int sequence_length,
648 int subject_is_translated,
int is_pos_based)
662 for (align = alignments, k = 0;
664 align = align->
next, k++) {
669 int translated_length;
675 frame = align->
frame;
677 query_length = query_info[query_index].
seq.
length;
681 if (align_copy ==
NULL)
684 if (subject_is_translated) {
688 query_length, query_index, align_copy);
694 sequence_length, 0, align_copy);
696 if (windows[k] ==
NULL)
707 for (k = 0; k < hspcnt; k++) {
715 nextWindow = ( k + 1 < hspcnt ) ? windows[k+1] :
NULL;
717 if(nextWindow !=
NULL &&
728 windows[length_joined] = window;
732 *nWindows = length_joined;
734 for (k = length_joined; k < hspcnt; k++) {
739 if (!subject_is_translated) {
740 for (k=0; k<length_joined; k++) {
745 for (k = 0; k < length_joined; k++) {
755 for (k = 0; k < *nWindows; k++) {
756 if (windows[k] !=
NULL)
793 *nWindows = numQueries;
794 for (align = alignments; align !=
NULL; align = align->
next) {
798 query_length = query_info[query_index].
seq.
length;
800 if (windows[query_index] ==
NULL) {
801 windows[query_index] =
803 0, query_length, query_index,
NULL);
804 if (windows[query_index] ==
NULL)
808 if (copiedAlign ==
NULL)
810 copiedAlign->
next = windows[query_index]->
align;
811 windows[query_index]->
align = copiedAlign;
812 windows[query_index]->
hspcnt++;
815 for (query_index = 0; query_index < numQueries; query_index++) {
816 if (windows[query_index] !=
NULL) {
817 windows[window_index] = windows[query_index];
825 if (window_index > 0)
826 new_windows = realloc(windows, window_index *
sizeof(
s_WindowInfo*));
828 if (new_windows ==
NULL) {
831 windows = new_windows;
832 *nWindows = window_index;
842 for (window_index = 0; window_index < *nWindows; window_index++) {
875 int numQueries,
int border,
int sequence_length,
877 int query_is_translated,
int subject_is_translated,
int is_pos_based)
879 if (subject_is_translated || query_is_translated) {
884 subject_is_translated, is_pos_based);
887 numQueries, sequence_length,
923 if (query_is_translated || subject_is_translated) {
926 start = ((query_is_translated) ?
928 end = ((query_is_translated) ?
946 return searchsp * exp(-(Lambda * score) + logK);
955 #define KAPPA_BIT_TOL 2.0
976 int subject_end = in_align->
matchEnd;
977 double score = in_align->
score;
980 for (align = alignments; align !=
NULL; align = align->
next ) {
990 scoreThresh <= align->score) {
1003 if (*pparams !=
NULL) {
1005 free((*pparams)->gapping_params);
1018 int query_is_translated,
1019 int subject_is_translated,
1020 int ccat_query_length,
int cutoff_s,
1021 double cutoff_e,
int do_link_hsps,
1023 double near_identical_cutoff)
1028 *pmatrix_info =
NULL;
1030 *pgapping_params =
NULL;
1044 free(*pmatrix_info); *pmatrix_info =
NULL;
1045 free(*pgapping_params); *pgapping_params =
NULL;
1050 #define MINIMUM_LENGTH_NEAR_IDENTICAL 50
1060 int queryIndex, queryLength, align_len;
1066 queryLength = query_info[queryIndex].
seq.
length;
1074 if ((
double)align->
score / (
double)align_len < cutoff) {
1086 queryLength = query_info[queryIndex].
seq.
length;
1107 int numQueries,
int ** matrix,
int alphsize,
1109 double *pvalueForThisPair,
1110 int compositionTestIndex,
1111 double *LambdaRatio)
1131 assert((
int) compo_adjust_mode < 2 || !params->positionBased);
1132 for (query_index = 0; query_index < numQueries; query_index++) {
1133 alignments[query_index] =
NULL;
1138 &nWindows, query_is_translated, subject_is_translated, params->
positionBased);
1140 goto function_level_cleanup;
1143 for (window_index = 0; window_index < nWindows; window_index++) {
1162 int num_adjustments = 0;
1168 window = windows[window_index];
1170 query_composition = &query_info[query_index].
composition;
1173 for (in_align = window->
align, hsp_index = 0;
1175 in_align = in_align->
next, hsp_index++) {
1181 if (hsp_index == 0 || subject_maybe_biased) {
1191 if (hsp_index == 0 ||
1192 (subject_maybe_biased &&
1193 (nearIdenticalStatus != oldNearIdenticalStatus))) {
1202 &query_info[query_index].
seq,
1205 query_info[query_index].
words,
1207 nearIdenticalStatus,
1210 &subject_maybe_biased
1214 goto window_index_loop_cleanup;
1219 if (query_is_translated) {
1227 if ( !
s_IsContained(in_align, alignments[query_index], Lambda) ) {
1231 int adjust_search_failed = 0;
1233 (subject_is_translated || hsp_index == 0
1234 || (nearIdenticalStatus != oldNearIdenticalStatus))) {
1239 in_align,
FALSE, subject_is_translated);
1240 adjust_search_failed =
1243 &subject_composition,
1245 scaledMatrixInfo, compo_adjust_mode,
1246 RE_pseudocounts, NRrecord,
1247 &matrix_adjust_rule,
1250 compositionTestIndex,
1252 if (adjust_search_failed < 0) {
1253 status = adjust_search_failed;
1254 goto window_index_loop_cleanup;
1259 if ( !adjust_search_failed ) {
1274 num_adjustments == 1);
1278 free_align_traceback);
1282 oldNearIdenticalStatus = nearIdenticalStatus;
1284 window_index_loop_cleanup:
1290 goto function_level_cleanup;
1292 function_level_cleanup:
1294 for (query_index = 0; query_index < numQueries; query_index++) {
1299 for (window_index = 0; window_index < nWindows; window_index++) {
1314 double Lambda,
double logK,
1318 int ** matrix,
int alphsize,
1322 double *pvalueForThisPair,
1323 int compositionTestIndex,
1324 double *LambdaRatio)
1346 int gap_open = gapping_params->
gap_open;
1349 assert((
int) compo_adjust_mode < 2 || !positionBased);
1350 for (query_index = 0; query_index < numQueries; query_index++) {
1351 alignments[query_index] =
NULL;
1357 &nWindows, query_is_translated, subject_is_translated, params->
positionBased);
1359 goto function_level_cleanup;
1361 for (window_index = 0; window_index < nWindows; window_index++) {
1373 int adjust_search_failed =
FALSE;
1376 window = windows[window_index];
1378 query_composition = &query_info[query_index].
composition;
1388 &query_info[query_index].
seq,
1391 query_info[query_index].
words,
1392 window->
align, nearIdenticalStatus,
1393 compo_adjust_mode,
TRUE,
1397 goto window_index_loop_cleanup;
1400 if (query_is_translated) {
1414 window->
align,
FALSE, subject_is_translated);
1415 adjust_search_failed =
1417 query_composition,
query.length,
1418 &subject_composition,
subject.length,
1419 scaledMatrixInfo, compo_adjust_mode,
1420 RE_pseudocounts, NRrecord,
1423 compositionTestIndex,
1425 if (adjust_search_failed < 0) {
1426 status = adjust_search_failed;
1427 goto window_index_loop_cleanup;
1430 if ( !adjust_search_failed ) {
1435 int alignment_is_significant;
1440 int matchEnd, queryEnd;
1449 query.length, matrix,
1450 gap_open, gap_extend,
1454 goto window_index_loop_cleanup;
1457 alignment_is_significant = aSwScore >= params->
cutoff_s;
1464 alignment_is_significant = newSwEvalue < params->
cutoff_e;
1465 if (alignments[query_index] ==
NULL) {
1469 alignment_is_significant =
1470 alignment_is_significant &&
1472 &significantMatches[query_index],
1473 newSwEvalue, aSwScore, matchingSeq->
index);
1476 if (alignment_is_significant) {
1479 int matchStart, queryStart;
1499 goto window_index_loop_cleanup;
1503 new_xdrop_align(&newAlign, &queryEnd, &matchEnd,
1504 queryStart, matchStart, aSwScore,
1509 gapping_params, matrix_adjust_rule);
1511 goto window_index_loop_cleanup;
1513 newAlign->
next = alignments[query_index];
1514 alignments[query_index] = newAlign;
1516 if (window->
hspcnt > 1) {
1521 queryStart, queryEnd,
1522 matchStart, matchEnd);
1525 goto window_index_loop_cleanup;
1529 }
while (alignment_is_significant && window->
hspcnt > 1);
1533 window_index_loop_cleanup:
1539 goto function_level_cleanup;
1542 function_level_cleanup:
1544 for (query_index = 0; query_index < numQueries; query_index++) {
1549 for (window_index = 0; window_index < nWindows; window_index++) {
1565 for (
i = 0;
i < numQueries;
i++) {
1567 double ecutoff = significantMatches[
i].
ecutoff;
Declares a "heap" data structure that is used to store computed alignments when composition adjustmen...
int BlastCompo_HeapFilledToCutoff(const BlastCompo_Heap *self)
Return true if only matches with evalue <= self->ecutoff may be inserted.
int BlastCompo_HeapWouldInsert(BlastCompo_Heap *self, double eValue, int score, int subject_index)
Return true if self may insert a match that had the given eValue, score and subject_index.
Definitions used in compositional score matrix adjustment.
int Blast_AdjustScores(int **matrix, const Blast_AminoAcidComposition *query_composition, int queryLength, const Blast_AminoAcidComposition *subject_composition, int subjectLength, const Blast_MatrixInfo *matrixInfo, ECompoAdjustModes composition_adjust_mode, int RE_pseudocounts, Blast_CompositionWorkspace *NRrecord, EMatrixAdjustRule *matrix_adjust_rule, double calc_lambda(double *, int, int, double), double *pvalueForThisPair, int compositionTestIndex, double *ratioToPassBack)
Compute a compositionally adjusted scoring matrix.
void Blast_MatrixInfoFree(Blast_MatrixInfo **ss)
Free memory associated with a Blast_MatrixInfo object.
void Blast_GetCompositionRange(int *pleft, int *pright, const Uint1 *subject_data, int length, int start, int finish)
Get the range of a sequence to be included when computing a composition.
void Blast_ReadAaComposition(Blast_AminoAcidComposition *composition, int alphsize, const Uint1 *sequence, int length)
Compute the true amino acid composition of a sequence, ignoring ambiguity characters and other nonsta...
Constants used in compositional score matrix adjustment.
ECompoAdjustModes
An collection of constants that specify all permissible modes of composition adjustment.
@ eNoCompositionBasedStats
Don't use composition based statistics.
EMatrixAdjustRule
An collection of constants that specify all rules that may be used to generate a compositionally adju...
uint8_t Uint1
1-byte (8-bit) unsigned integer
range(_Ty, _Ty) -> range< _Ty >
Type and macro definitions from C toolkit that are not defined in C++ toolkit.
#define MIN(a, b)
returns smaller of a and b.
Uint1 Boolean
bool replacment for C
#define ABS(a)
returns absolute value of a (|a|)
#define ASSERT
macro for assert.
#define MAX(a, b)
returns larger of a and b.
double lambda(size_t dimMatrix_, const Int4 *const *scoreMatrix_, const double *q_)
double f(double x_, const double &y_)
Declarations for several linear algebra routines.
static int s_DistinctAlignmentsLength(BlastCompo_Alignment *list)
Calculate the length of a list of BlastCompo_Alignment objects.
void BlastCompo_AlignmentsFree(BlastCompo_Alignment **palign, void(*free_context)(void *))
Recursively free all alignments in the singly linked list whose head is *palign.
static void s_SequenceDataRelease(BlastCompo_SequenceData *self)
Release the data associated with this object.
#define KAPPA_CONTAINED_IN_HSP(a, b, c, d, e, f)
Test of whether one set of HSP bounds is contained in another.
static Boolean s_IsSimilarEndPoint(const BlastCompo_Alignment *newAlign, const BlastCompo_Alignment *align)
Does at least one end point of newAlign is contined within align and lies on the same diagnol as the ...
static Boolean s_IsContained(BlastCompo_Alignment *in_align, BlastCompo_Alignment *alignments, double lambda)
Return true if an alignment is contained in a previously-computed alignment of sufficiently high scor...
static s_WindowInfo * s_WindowInfoNew(int begin, int end, int context, int queryOrigin, int queryLength, int query_index, BlastCompo_Alignment *align)
Create and initialize a new s_WindowInfo.
#define KAPPA_SIGN(a)
A macro that defines the mathematical "sign" function.
struct s_WindowInfo s_WindowInfo
s_WindowInfo - a struct whose instances represent a range of data in a sequence.
static void s_GetComposition(Blast_AminoAcidComposition *composition, int alphsize, BlastCompo_SequenceData *seq, BlastCompo_SequenceRange *range, BlastCompo_Alignment *align, Boolean query_is_translated, Boolean subject_is_translated)
Compute the amino acid composition of the sequence.
int Blast_RedoOneMatchSmithWaterman(BlastCompo_Alignment **alignments, Blast_RedoAlignParams *params, BlastCompo_Alignment *incoming_aligns, int hspcnt, double Lambda, double logK, BlastCompo_MatchingSequence *matchingSeq, BlastCompo_QueryInfo query_info[], int numQueries, int **matrix, int alphsize, Blast_CompositionWorkspace *NRrecord, Blast_ForbiddenRanges *forbidden, BlastCompo_Heap *significantMatches, double *pvalueForThisPair, int compositionTestIndex, double *LambdaRatio)
Recompute all alignments for one query/subject pair using the Smith-Waterman algorithm and possibly a...
static void s_AlignmentsRev(BlastCompo_Alignment **plist)
Reverse a list of BlastCompo_Alignments.
static int s_WindowsFromProteinAligns(BlastCompo_Alignment *alignments, BlastCompo_QueryInfo *query_info, int numQueries, int sequence_length, s_WindowInfo ***pwindows, int *nWindows)
Read a list of alignments from a protein search and create a new array of pointers to s_WindowInfo so...
#define COMPO_INTENSE_DEBUG
Define COMPO_INTENSE_DEBUG to be true to turn on rigorous but expensive consistency tests in the comp...
int Blast_RedoOneMatch(BlastCompo_Alignment **alignments, Blast_RedoAlignParams *params, BlastCompo_Alignment *incoming_aligns, int hspcnt, double Lambda, BlastCompo_MatchingSequence *matchingSeq, int ccat_query_length, BlastCompo_QueryInfo query_info[], int numQueries, int **matrix, int alphsize, Blast_CompositionWorkspace *NRrecord, double *pvalueForThisPair, int compositionTestIndex, double *LambdaRatio)
Recompute all alignments for one query/subject pair using composition-based statistics or composition...
int BlastCompo_EarlyTermination(double evalue, BlastCompo_Heap significantMatches[], int numQueries)
Return true if a heuristic determines that it is unlikely to be worthwhile to redo a query-subject pa...
static int s_GetTranslatedLength(int length, int frame, int is_pos_based)
#define LOCAL_LN2
The natural log of 2, defined in newer systems as M_LN2 in math.h, but missing in older systems.
#define MINIMUM_LENGTH_NEAR_IDENTICAL
#define EVALUE_STRETCH
by what factor might initially reported E-value exceed true E-value
static const int kReMatrixAdjustmentPseudocounts
pseudocounts for relative-entropy-based score matrix adjustment
static void s_WindowInfoFree(s_WindowInfo **window)
Free an instance of s_WindowInfo.
#define KAPPA_BIT_TOL
The number of bits by which the score of a previously computed alignment must exceed the score of the...
static int s_WindowsFromAligns(BlastCompo_Alignment *alignments, BlastCompo_QueryInfo *query_info, int hspcnt, int numQueries, int border, int sequence_length, s_WindowInfo ***pwindows, int *nWindows, int query_is_translated, int subject_is_translated, int is_pos_based)
Read a list of alignments from a search (protein or translated) and create a new array of pointers to...
static BlastCompo_Alignment * s_AlignmentCopy(const BlastCompo_Alignment *align)
Copy a BlastCompo_Alignment, setting the next field to NULL.
static int s_SubjectCompareWindows(const void *vp1, const void *vp2)
A comparison routine used to sort a list of windows by position in the subject, ignoring strand and f...
static void s_WithDistinctEnds(BlastCompo_Alignment **p_newAlign, BlastCompo_Alignment **p_oldAlignments, void free_align_context(void *), Boolean is_same_adjustment)
Given a list of alignments and a new alignment, create a new list of alignments that conditionally in...
static int s_WindowsFromTranslatedAligns(BlastCompo_Alignment *alignments, BlastCompo_QueryInfo *query_info, int hspcnt, int border, int sequence_length, s_WindowInfo ***pwindows, int *nWindows, int subject_is_translated, int is_pos_based)
Read a list of alignments from a translated search and create a new array of pointers to s_WindowInfo...
static int s_LocationCompareWindows(const void *vp1, const void *vp2)
A comparison routine used to sort a list of windows, first by frame and then by location.
static int s_AlignmentCmp(const BlastCompo_Alignment *a, const BlastCompo_Alignment *b)
Compare two BlastCompo_Alignments.
static Boolean s_IsSameEndPoint(const BlastCompo_Alignment *newAlign, const BlastCompo_Alignment *align)
Do given alignments have the same left or right end point.
static int s_AlignmentsAreSorted(BlastCompo_Alignment *alignments)
Temporary function to determine whether alignments are sorted.
static const int kWindowBorder
For translated subject sequences, the number of amino acids to include before and after the existing ...
void Blast_RedoAlignParamsFree(Blast_RedoAlignParams **pparams)
Free a set of Blast_RedoAlignParams.
BlastCompo_Alignment * BlastCompo_AlignmentNew(int score, EMatrixAdjustRule matrix_adjust_rule, int queryStart, int queryEnd, int queryIndex, int matchStart, int matchEnd, int frame, void *context)
Create a new BlastCompo_Alignment; parameters to this function correspond directly to fields of Blast...
static void s_WindowInfoJoin(s_WindowInfo *win1, s_WindowInfo **pwin2)
Join two instance of s_WindowInfo into a single window.
static Boolean s_preliminaryTestNearIdentical(BlastCompo_QueryInfo query_info[], s_WindowInfo *window, BlastCompo_Alignment *align, double cutoff)
#define CMP(a, b)
-1/0/1 if a is less than/greater than/equal to b
Blast_RedoAlignParams * Blast_RedoAlignParamsNew(Blast_MatrixInfo **pmatrix_info, BlastCompo_GappingParams **pgapping_params, ECompoAdjustModes compo_adjust_mode, int positionBased, int query_is_translated, int subject_is_translated, int ccat_query_length, int cutoff_s, double cutoff_e, int do_link_hsps, const Blast_RedoAlignCallbacks *callbacks, double near_identical_cutoff)
Create new Blast_RedoAlignParams object.
static void s_WindowSwapRange(s_WindowInfo *self)
Swap the query and subject range.
static void s_DistinctAlignmentsSort(BlastCompo_Alignment **plist, int hspcnt)
Sort a list of Blast_Compo_Alignment objects, using s_AlignmentCmp comparison function.
static double s_EvalueFromScore(int score, double Lambda, double logK, double searchsp)
Compute an e-value from a score and a set of statistical parameters.
Definitions used to redo a set of alignments, using either composition matrix adjustment or the Smith...
#define GET_NUCL_LENGTH(l)
#define GET_TRANSLATED_LENGTH(l, f)
Definitions for computing Smith-Waterman alignments.
int Blast_ForbiddenRangesPush(Blast_ForbiddenRanges *self, int queryStart, int queryEnd, int matchStart, int matchEnd)
Add some ranges to self.
void Blast_ForbiddenRangesClear(Blast_ForbiddenRanges *self)
Reset self to be empty.
int Blast_SmithWatermanFindStart(int *score_out, int *matchSeqStart, int *queryStart, const Uint1 *subject_data, int subject_length, const Uint1 *query_data, int **matrix, int gapOpen, int gapExtend, int matchSeqEnd, int queryEnd, int score_in, int positionSpecific, const Blast_ForbiddenRanges *forbiddenRanges)
Find the left-hand endpoints of the locally optimal Smith-Waterman alignment given the score and righ...
int Blast_SmithWatermanScoreOnly(int *score, int *matchSeqEnd, int *queryEnd, const Uint1 *subject_data, int subject_length, const Uint1 *query_data, int query_length, int **matrix, int gapOpen, int gapExtend, int positionSpecific, const Blast_ForbiddenRanges *forbiddenRanges)
Compute the score and right-hand endpoints of the locally optimal Smith-Waterman alignment,...
Within the composition adjustment module, an object of type BlastCompo_Alignment represents a distinc...
int frame
the subject frame
int matchStart
the start of the alignment in the subject
int score
the score of this alignment
int matchEnd
one past the end of the alignment in the subject
int queryStart
the start of the alignment in the query
EMatrixAdjustRule matrix_adjust_rule
how the score matrix was computed
struct BlastCompo_Alignment * next
the next alignment in the list
int queryIndex
index of the query in a concatenated query
int queryEnd
one past the end of the alignment in the query
void * context
traceback info for a gapped alignment
Parameters used to compute gapped alignments.
int gap_open
penalty for opening a gap
int gap_extend
penalty for extending a gapped alignment by one residue
A BlastCompo_Heap represents a collection of alignments between one query sequence and several matchi...
double ecutoff
matches with evalue below ecutoff may always be inserted in the BlastCompo_Heap
A BlastCompo_MatchingSequence represents a subject sequence to be aligned with the query.
Int4 index
index of this sequence in the database
Int4 length
length of this matching sequence
Collected information about a query.
Blast_AminoAcidComposition composition
the composition of the query
BlastCompo_SequenceData seq
sequence data for the query
double eff_search_space
effective search space of searches involving this query
Uint8 * words
list words in the query, needed for testing whether the query and a subject are nearly identical
BlastCompo_SequenceData - represents a string of amino acids or nucleotides.
int length
the length of data.
Uint1 * data
amino acid or nucleotide data
BlastCompo_SequenceRange - a struct whose instances represent a range of data in a sequence.
int begin
the starting index of the range
int end
one beyond the last item in the range
int context
integer identifier for this window, can indicate a translation frame or an index into a set of sequen...
Represents the composition of an amino-acid sequence, in the ncbistdaa alphabet.
Work arrays used to perform composition-based matrix adjustment.
An instance of Blast_ForbiddenRanges is used by the Smith-Waterman algorithm to represent ranges in t...
Information about a amino-acid substitution matrix.
Callbacks used by Blast_RedoOneMatch and Blast_RedoOneMatchSmithWaterman routines.
redo_one_alignment_type * redo_one_alignment
free_align_traceback_type * free_align_traceback
get_range_type * get_range
calc_lambda_type * calc_lambda
A parameter block for the Blast_RedoOneMatch and Blast_RedoOneMatchSmithWaterman routines.
const Blast_RedoAlignCallbacks * callbacks
callback functions used by the Blast_RedoAlign* functions
int query_is_translated
true if the query is translated
int cutoff_s
cutoff score for saving alignments when HSP linking is used
ECompoAdjustModes compo_adjust_mode
composition adjustment mode
int ccat_query_length
length of the concatenated query, or just the length of the query if not concatenated
int do_link_hsps
if true, then HSP linking and sum statistics are used to computed e-values
int subject_is_translated
true if the subject is translated
Blast_MatrixInfo * matrix_info
information about the scoring matrix used
BlastCompo_GappingParams * gapping_params
parameters for performing a gapped alignment
int RE_pseudocounts
number of pseudocounts to use in relative-entropy based composition adjustment.
int positionBased
true if the search is position-based
double near_identical_cutoff
alignments with raw score per residue above this value will be tested if sequences are near identical...
double cutoff_e
cutoff e-value for saving alignments
s_WindowInfo - a struct whose instances represent a range of data in a sequence.
BlastCompo_SequenceRange subject_range
range of the subject included in this window
BlastCompo_SequenceRange query_range
range of the query included in this window
BlastCompo_Alignment * align
list of existing alignments contained in this window
int hspcnt
number of alignment in this window
voidp calloc(uInt items, uInt size)