NCBI C++ ToolKit
|
Functions to link with use of sum statistics. More...
#include <algo/blast/core/link_hsps.h>
#include <algo/blast/core/blast_util.h>
#include "blast_hits_priv.h"
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | BlastHSPLink |
The following structure is used in "link_hsps" to decide between two different "gapping" models. More... | |
struct | LinkHSPStruct |
Structure containing all information internal to the process of linking HSPs. More... | |
struct | LinkHelpStruct |
The helper array contains the info used frequently in the inner for loops of the HSP linking algorithm. More... | |
struct | BlastLinkedHSPSet |
Simple doubly linked list of HSPs, used for calculating sum statistics. More... | |
Typedefs | |
typedef enum ELinkOrderingMethod | ELinkOrderingMethod |
Describes the method for ordering HSPs. More... | |
typedef struct BlastHSPLink | BlastHSPLink |
The following structure is used in "link_hsps" to decide between two different "gapping" models. More... | |
typedef struct LinkHSPStruct | LinkHSPStruct |
Structure containing all information internal to the process of linking HSPs. More... | |
typedef struct LinkHelpStruct | LinkHelpStruct |
The helper array contains the info used frequently in the inner for loops of the HSP linking algorithm. More... | |
typedef struct BlastLinkedHSPSet | BlastLinkedHSPSet |
Simple doubly linked list of HSPs, used for calculating sum statistics. More... | |
Enumerations | |
enum | ELinkOrderingMethod { eLinkSmallGaps = 0 , eLinkLargeGaps = 1 , eOrderingMethods = 2 } |
Describes the method for ordering HSPs. More... | |
Functions | |
static int | s_FwdCompareHSPs (const void *v1, const void *v2) |
Callback used by qsort to sort a list of HSPs, encapsulated in LinkHSPStruct structures, in order of increasing query start offset. More... | |
static int | s_FwdCompareHSPsTransl (const void *v1, const void *v2) |
Like s_FwdCompareHSPs, except with additional logic to distinguish HSPs that lie within different strands of a single translated query sequence. More... | |
static int | s_RevCompareHSPs (const void *v1, const void *v2) |
Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of decreasing query start offset. More... | |
static int | s_RevCompareHSPsTransl (const void *v1, const void *v2) |
Like s_RevCompareHSPs, except with additional logic to distinguish HSPs that lie within different strands of a single translated query sequence. More... | |
static int | s_RevCompareHSPsTbn (const void *v1, const void *v2) |
Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of decreasing query start offset (suitable for use with tblastn). More... | |
static int | s_RevCompareHSPsTbx (const void *v1, const void *v2) |
Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of decreasing query start offset (suitable for use with tblastx). More... | |
static LinkHSPStruct * | s_LinkHSPStructReset (LinkHSPStruct *lhsp) |
Initialize a LinkHSPStruct. More... | |
static Int2 | s_BlastEvenGapLinkHSPs (EBlastProgramType program_number, BlastHSPList *hsp_list, const BlastQueryInfo *query_info, Int4 subject_length, const BlastScoreBlk *sbp, const BlastLinkHSPParameters *link_hsp_params, Boolean gapped_calculation) |
Perform even gap linking on a list of HSPs. More... | |
static double | s_SumHSPEvalue (EBlastProgramType program_number, const BlastQueryInfo *query_info, Int4 subject_length, const BlastLinkHSPParameters *link_hsp_params, BlastLinkedHSPSet *head_hsp, BlastLinkedHSPSet *new_hsp, double *sum_score) |
Calculates e-value of a set of HSPs with sum statistics. More... | |
static int | s_FwdCompareLinkedHSPSets (const void *v1, const void *v2) |
Callback for sorting an array of HSPs, encapsulated in BlastLinkedHSPSet structures, in order of increasing query starting offset. More... | |
static int | s_SumScoreCompareLinkedHSPSets (const void *v1, const void *v2) |
Callback used by qsort to sort a list of BlastLinkedHSPSet structures in order of decreasing sum score. More... | |
static Int4 | s_HSPOffsetBinarySearch (BlastLinkedHSPSet **hsp_array, Int4 size, Uint4 queryId, Int4 offset) |
Find an HSP on the same queryId as the one given, with closest start offset that is greater than a specified value. More... | |
static Int4 | s_HSPOffsetEndBinarySearch (BlastLinkedHSPSet **hsp_array, Int4 size, Int4 *qend_index_array, Uint4 queryId, Int4 offset) |
Find an HSP in an array sorted in increasing order of query offsets and increasing order of queryId, with the smallest index such that its query end is >= to a given offset. More... | |
static BlastLinkedHSPSet ** | s_MergeLinkedHSPSets (BlastLinkedHSPSet *hsp_set1, BlastLinkedHSPSet *hsp_set2, Int4 *merged_size) |
Merges HSPs from two linked HSP sets into an array of HSPs, sorted in increasing order of contexts and increasing order of query offsets. More... | |
static BlastLinkedHSPSet * | s_CombineLinkedHSPSets (BlastLinkedHSPSet *hsp_set1, BlastLinkedHSPSet *hsp_set2, double sum_score, double evalue) |
Combines two linked sets of HSPs into a single set. More... | |
static Boolean | s_LinkedHSPSetsAdmissible (BlastLinkedHSPSet *hsp_set1, BlastLinkedHSPSet *hsp_set2, const BlastLinkHSPParameters *link_hsp_params, EBlastProgramType program) |
Checks if new candidate HSP is admissible to be linked to a set of HSPs on the left. More... | |
static BlastLinkedHSPSet ** | s_LinkedHSPSetArraySetUp (BlastHSP **hsp_array, Int4 hspcnt, Blast_KarlinBlk **kbp_array, EBlastProgramType program) |
Sets up an array of wrapper structures for an array of BlastHSP's. More... | |
static BlastLinkedHSPSet ** | s_LinkedHSPSetArrayCleanUp (BlastLinkedHSPSet **link_hsp_array, Int4 hspcnt) |
Frees the array of special structures, used for linking HSPs and restores the original contexts and subject/query order in BlastHSP structures, when necessary. More... | |
static Int2 | s_LinkedHSPSetArrayIndexQueryEnds (BlastLinkedHSPSet **hsp_array, Int4 hspcnt, Int4 **qend_index_ptr) |
Given an array of HSPs (H), sorted in increasing order of query offsets, fills an array of indices into array H such that for each i, the index is the smallest HSP index, for which query ending offset is >= than query ending offset of H[i]. More... | |
static Int2 | s_BlastUnevenGapLinkHSPs (EBlastProgramType program, BlastHSPList *hsp_list, const BlastQueryInfo *query_info, Int4 subject_length, const BlastScoreBlk *sbp, const BlastLinkHSPParameters *link_hsp_params, Boolean gapped_calculation) |
Greedy algorithm to link HSPs with uneven gaps. More... | |
Int2 | BLAST_LinkHsps (EBlastProgramType program_number, BlastHSPList *hsp_list, const BlastQueryInfo *query_info, Int4 subject_length, const BlastScoreBlk *sbp, const BlastLinkHSPParameters *link_hsp_params, Boolean gapped_calculation) |
Link HSPs using sum statistics. More... | |
Functions to link with use of sum statistics.
Definition in file link_hsps.c.
typedef struct BlastHSPLink BlastHSPLink |
The following structure is used in "link_hsps" to decide between two different "gapping" models.
Here link is used to hook up a chain of HSP's, num is the number of links, and sum is the sum score. Once the best gapping model has been found, this information is transferred up to the LinkHSPStruct. This structure should not be used outside of the function Blast_EvenGapLinkHSPs.
typedef struct BlastLinkedHSPSet BlastLinkedHSPSet |
Simple doubly linked list of HSPs, used for calculating sum statistics.
typedef enum ELinkOrderingMethod ELinkOrderingMethod |
Describes the method for ordering HSPs.
Note that these values are used to index an array, so their values must linearly increase
typedef struct LinkHelpStruct LinkHelpStruct |
The helper array contains the info used frequently in the inner for loops of the HSP linking algorithm.
One array of helpers will be allocated for each thread.
typedef struct LinkHSPStruct LinkHSPStruct |
Structure containing all information internal to the process of linking HSPs.
enum ELinkOrderingMethod |
Describes the method for ordering HSPs.
Note that these values are used to index an array, so their values must linearly increase
Enumerator | |
---|---|
eLinkSmallGaps | favor small gaps when linking an HSP |
eLinkLargeGaps | favor large gaps when linking an HSP |
eOrderingMethods | number of methods (last in list) |
Definition at line 47 of file link_hsps.c.
Int2 BLAST_LinkHsps | ( | EBlastProgramType | program_number, |
BlastHSPList * | hsp_list, | ||
const BlastQueryInfo * | query_info, | ||
Int4 | subject_length, | ||
const BlastScoreBlk * | sbp, | ||
const BlastLinkHSPParameters * | link_hsp_params, | ||
Boolean | gapped_calculation | ||
) |
Link HSPs using sum statistics.
program_number | BLAST program [in] |
hsp_list | List of HSPs [in] |
query_info | Query information block [in] |
subject_length | Subject sequence length [in] |
sbp | Scoring and statistical data [in] |
link_hsp_params | Parameters for linking of HSPs [in] |
gapped_calculation | Is this a gapped search? [in] |
Definition at line 1761 of file link_hsps.c.
References ASSERT, BlastHSPList::best_evalue, Blast_HSPListAdjustOddBlastnScores(), Blast_HSPListGetEvalues(), Blast_HSPListSortByScore(), Blast_SubjectIsTranslated(), CODON_LENGTH, BlastHSP::evalue, FALSE, BlastLinkHSPParameters::gap_decay_rate, BlastHSPList::hsp_array, BlastHSPList::hspcnt, if(), BlastLinkHSPParameters::longest_intron, BlastHSP::num, s_BlastEvenGapLinkHSPs(), and s_BlastUnevenGapLinkHSPs().
Referenced by BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), s_BlastSearchEngineCore(), s_HitlistEvaluateAndPurge(), s_HSPListPostTracebackUpdate(), and LinkHspTestFixture::testUnevenGapLinkHsps().
|
static |
Perform even gap linking on a list of HSPs.
program_number | The blast program that generated the HSPs [in] |
hsp_list | List of HSPs to link [in/modified] |
query_info | List of structures describing all query sequences [in] |
subject_length | Number of letters in the subject sequence [in] |
sbp | Score block [in] |
link_hsp_params | Configuration information for the linking process [in] |
gapped_calculation | TRUE if the HSPs are from a gapped search [in] |
Definition at line 415 of file link_hsps.c.
References BLAST_GapDecayDivisor(), BLAST_LargeGapSumE(), Blast_QueryIsNucleotide(), Blast_QueryIsTranslated(), BLAST_SmallGapSumE(), Blast_SubjectIsTranslated(), calloc(), BlastHSPLink::changed, CODON_LENGTH, BlastHSP::context, BlastQueryInfo::contexts, BlastLinkHSPParameters::cutoff_big_gap, BlastLinkHSPParameters::cutoff_small_gap, BlastContextInfo::eff_searchsp, eLinkLargeGaps, eLinkSmallGaps, BlastSeg::end, eOrderingMethods, BlastHSP::evalue, FALSE, BlastLinkHSPParameters::gap_decay_rate, BlastLinkHSPParameters::gap_prob, BlastLinkHSPParameters::gap_size, H, LinkHSPStruct::hsp, BlastHSPList::hsp_array, LinkHSPStruct::hsp_link, BlastHSPList::hspcnt, i, if(), INT4_MAX, BlastScoreBlk::kbp, BlastScoreBlk::kbp_gap, Blast_KarlinBlk::Lambda, BlastContextInfo::length_adjustment, LinkHSPStruct::linked_set, LinkHSPStruct::linked_to, Blast_KarlinBlk::logK, malloc(), MAX, max(), LinkHelpStruct::maxsum1, MIN, next(), LinkHSPStruct::next, LinkHelpStruct::next_larger, NULL, BlastHSPLink::num, BlastQueryInfo::num_queries, NUM_STRANDS, BlastSeg::offset, BlastLinkHSPParameters::overlap_size, prev(), LinkHSPStruct::prev, prob(), LinkHelpStruct::ptr, LinkHelpStruct::q_off_trim, BlastHSP::query, BlastContextInfo::query_length, s_FwdCompareHSPs(), s_FwdCompareHSPsTransl(), s_LinkHSPStructReset(), LinkHelpStruct::s_off_trim, s_RevCompareHSPs(), s_RevCompareHSPsTbn(), s_RevCompareHSPsTbx(), s_RevCompareHSPsTransl(), sfree, SIGN, LinkHSPStruct::start_of_chain, BlastHSP::subject, BlastHSPLink::sum, LinkHelpStruct::sum, TRUE, window_size, and BlastHSPLink::xsum.
Referenced by BLAST_LinkHsps().
|
static |
Greedy algorithm to link HSPs with uneven gaps.
Sorts HSPs by score. Starting with the highest scoring HSP, finds an HSP that produces the best sum e-value when added to the HSP set under consideration. The neighboring HSPs in a set must have endpoints within a window of each other on the protein axis, and within the longest allowed intron length on the nucleotide axis. When no more HSPs can be added to the highest scoring set, the next highest scoring HSP is considered that is not yet part of any set.
program | Type of BLAST program (blastx or tblastn) [in] |
hsp_list | Structure containing all HSPs for a given subject [in] [out] |
query_info | Query information, including effective lengths [in] |
subject_length | Subject sequence length [in] |
sbp | Scoring and statistical parameters [in] |
link_hsp_params | Parameters for linking HSPs [in] |
gapped_calculation | TRUE if input HSPs are from a gapped search [in] |
Definition at line 1613 of file link_hsps.c.
References eBlastTypeBlastx, BlastSeg::end, BlastHSP::evalue, BlastLinkHSPParameters::gap_size, BlastLinkedHSPSet::hsp, BlastHSPList::hsp_array, BlastHSPList::hspcnt, BlastScoreBlk::kbp, BlastScoreBlk::kbp_gap, BlastLinkHSPParameters::longest_intron, malloc(), MIN, next(), BlastLinkedHSPSet::next, NULL, BlastSeg::offset, prev(), BlastLinkedHSPSet::prev, BlastHSP::query, BlastLinkedHSPSet::queryId, s_CombineLinkedHSPSets(), s_FwdCompareLinkedHSPSets(), s_HSPOffsetBinarySearch(), s_HSPOffsetEndBinarySearch(), s_LinkedHSPSetArrayCleanUp(), s_LinkedHSPSetArrayIndexQueryEnds(), s_LinkedHSPSetArraySetUp(), s_LinkedHSPSetsAdmissible(), s_SumHSPEvalue(), s_SumScoreCompareLinkedHSPSets(), sfree, and BlastLinkedHSPSet::sum_score.
Referenced by BLAST_LinkHsps().
|
static |
Combines two linked sets of HSPs into a single set.
hsp_set1 | First set of HSPs [in] |
hsp_set2 | Second set of HSPs [in] |
sum_score | The sum score of the combined linked set |
evalue | The E-value of the combined linked set |
Definition at line 1359 of file link_hsps.c.
References BlastHSP::evalue, BlastLinkedHSPSet::hsp, BlastLinkedHSPSet::next, NULL, BlastHSP::num, BlastLinkedHSPSet::prev, s_MergeLinkedHSPSets(), sfree, and BlastLinkedHSPSet::sum_score.
Referenced by s_BlastUnevenGapLinkHSPs().
Callback used by qsort to sort a list of HSPs, encapsulated in LinkHSPStruct structures, in order of increasing query start offset.
The subject start offset of HSPs is used as a tiebreaker, and no HSPs may be NULL.
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 120 of file link_hsps.c.
References BlastHSP::context, BlastSeg::offset, BlastHSP::query, BlastHSP::subject, and v2.
Referenced by s_BlastEvenGapLinkHSPs().
Like s_FwdCompareHSPs, except with additional logic to distinguish HSPs that lie within different strands of a single translated query sequence.
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 157 of file link_hsps.c.
References BlastHSP::context, NUM_FRAMES, BlastSeg::offset, BlastHSP::query, BlastHSP::subject, and v2.
Referenced by s_BlastEvenGapLinkHSPs().
Callback for sorting an array of HSPs, encapsulated in BlastLinkedHSPSet structures, in order of increasing query starting offset.
The subject end offset of HSPs is used as a tiebreaker, and no HSPs may be NULL. The comparison is applied only to HSPs from the same context. Otherwise, the sorting is in increasing order of contexts.
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 1170 of file link_hsps.c.
References if(), BlastSeg::offset, BlastHSP::query, BlastHSP::subject, and v2.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Find an HSP on the same queryId as the one given, with closest start offset that is greater than a specified value.
The list of HSPs to search must be sorted by query offset and in increasing order of queryId.
hsp_array | List of pointers to HSPs, encapsulated within BlastLinkedHSPSet structures [in] |
size | Number of elements in the array [in] |
queryId | Context of the target HSP [in] |
offset | The target offset to search for [in] |
Definition at line 1242 of file link_hsps.c.
References BlastLinkedHSPSet::hsp, BlastSeg::offset, offset, BlastHSP::query, BlastLinkedHSPSet::queryId, and ncbi::grid::netcache::search::fields::size.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Find an HSP in an array sorted in increasing order of query offsets and increasing order of queryId, with the smallest index such that its query end is >= to a given offset.
hsp_array | Array of pointers to HSPs, encapsulated within BlastLinkedHSPSet structures. Must be sorted by queryId and query offsets. [in] |
size | Number of elements in the array [in] |
qend_index_array | Array indexing query ends in the hsp_array [in] |
queryId | Context of the target HSP [in] |
offset | The target offset to search for [in] |
Definition at line 1280 of file link_hsps.c.
References BlastSeg::end, BlastLinkedHSPSet::hsp, offset, BlastHSP::query, BlastLinkedHSPSet::queryId, and ncbi::grid::netcache::search::fields::size.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Frees the array of special structures, used for linking HSPs and restores the original contexts and subject/query order in BlastHSP structures, when necessary.
link_hsp_array | Array of wrapper HSP structures, used for linking. [in] |
hspcnt | Size of the array. [in] |
Definition at line 1543 of file link_hsps.c.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Given an array of HSPs (H), sorted in increasing order of query offsets, fills an array of indices into array H such that for each i, the index is the smallest HSP index, for which query ending offset is >= than query ending offset of H[i].
This indexing is performed before any of the HSPs in H are linked.
hsp_array | Array of wrapper HSP structures. [in] |
hspcnt | Size of the hsp_array. [in] |
qend_index_ptr | Pointer to an array of special structures indexing the largest query ends in an HSP array sorting by query offset. |
Definition at line 1567 of file link_hsps.c.
References calloc(), BlastSeg::end, BlastLinkedHSPSet::hsp, NULL, BlastHSP::query, and BlastLinkedHSPSet::queryId.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Sets up an array of wrapper structures for an array of BlastHSP's.
hsp_array | Original array of HSP structures. [in] |
hspcnt | Size of hsp_array. [in] |
kbp_array | Array of Karlin blocks - structures containing Karlin-Altschul parameters. [in] |
program | BLAST program (tblastn or blastx) [in] |
Definition at line 1508 of file link_hsps.c.
References calloc(), BlastHSP::context, eBlastTypeBlastx, BlastLinkedHSPSet::hsp, Blast_KarlinBlk::Lambda, Blast_KarlinBlk::logK, malloc(), BlastHSP::num, BlastLinkedHSPSet::queryId, BlastHSP::score, and BlastLinkedHSPSet::sum_score.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Checks if new candidate HSP is admissible to be linked to a set of HSPs on the left.
The new HSP must start strictly before the parent HSP in both query and subject, and its end must lie within an interval from the parent HSP's start, determined by the allowed gap and overlap sizes in query and subject. This function also indicates whether parent is already too far to the right of the candidate HSP, via a boolean pointer.
hsp_set1 | First linked set of HSPs. [in] |
hsp_set2 | Second linked set of HSPs. [in] |
link_hsp_params | Parameters for linking HSPs. [in] |
program | Type of BLAST program (blastx or tblastn) [in] |
Definition at line 1407 of file link_hsps.c.
References eBlastTypeBlastx, BlastSeg::end, FALSE, BlastSeg::frame, BlastLinkHSPParameters::gap_size, BlastLinkedHSPSet::hsp, BlastLinkHSPParameters::longest_intron, BlastSeg::offset, BlastLinkHSPParameters::overlap_size, BlastLinkedHSPSet::prev, BlastHSP::query, BlastLinkedHSPSet::queryId, s_MergeLinkedHSPSets(), sfree, SIGN, BlastHSP::subject, and TRUE.
Referenced by s_BlastUnevenGapLinkHSPs().
|
static |
Initialize a LinkHSPStruct.
lhsp | Pointer to struct to initialize. If NULL, struct gets allocated and then initialized [in/modified] |
Definition at line 384 of file link_hsps.c.
References calloc(), and LinkHSPStruct::hsp.
Referenced by s_BlastEvenGapLinkHSPs().
|
static |
Merges HSPs from two linked HSP sets into an array of HSPs, sorted in increasing order of contexts and increasing order of query offsets.
hsp_set1 | First linked set. [in] |
hsp_set2 | Second linked set. [in] |
merged_size | The total number of HSPs in two sets. [out] |
Definition at line 1314 of file link_hsps.c.
References BlastLinkedHSPSet::hsp, malloc(), BlastLinkedHSPSet::next, BlastHSP::num, BlastSeg::offset, BlastLinkedHSPSet::prev, and BlastHSP::query.
Referenced by s_CombineLinkedHSPSets(), and s_LinkedHSPSetsAdmissible().
Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of decreasing query start offset.
The subject start offset of HSPs is used as a tiebreaker, and no HSPs may be NULL
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 198 of file link_hsps.c.
References BlastHSP::context, BlastSeg::offset, BlastHSP::query, BlastHSP::subject, and v2.
Referenced by s_BlastEvenGapLinkHSPs().
Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of decreasing query start offset (suitable for use with tblastn).
HSPs are first separated by frame of a translated subject sequence, and tiebreaking is by decreasing query end offset, then subject start offset, then subject end offset. HSPs may not be NULL
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 277 of file link_hsps.c.
References BlastHSP::context, BlastSeg::end, BlastSeg::frame, BlastSeg::offset, BlastHSP::query, SIGN, BlastHSP::subject, and v2.
Referenced by s_BlastEvenGapLinkHSPs().
Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of decreasing query start offset (suitable for use with tblastx).
HSPs are first separated by frame of a translated query sequence and then by frame of a translated subject sequence. Tiebreaking is by decreasing query end offset, then subject start offset, then subject end offset. HSPs may not be NULL
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 331 of file link_hsps.c.
References BlastHSP::context, BlastSeg::end, BlastSeg::frame, NUM_FRAMES, BlastSeg::offset, BlastHSP::query, SIGN, BlastHSP::subject, and v2.
Referenced by s_BlastEvenGapLinkHSPs().
Like s_RevCompareHSPs, except with additional logic to distinguish HSPs that lie within different strands of a single translated query sequence.
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 234 of file link_hsps.c.
References BlastHSP::context, NUM_FRAMES, BlastSeg::offset, BlastHSP::query, BlastHSP::subject, and v2.
Referenced by s_BlastEvenGapLinkHSPs().
|
static |
Calculates e-value of a set of HSPs with sum statistics.
program_number | Type of BLAST program [in] |
query_info | Query information structure [in] |
subject_length | Subject sequence length [in] |
link_hsp_params | Parameters for linking HSPs [in] |
head_hsp | Set of HSPs with previously calculated sum score/evalue [in] |
new_hsp | New HSP candidate to join the set [in] |
sum_score | Normalized score for the collection if HSPs[out] |
Definition at line 1117 of file link_hsps.c.
References ASSERT, BLAST_GapDecayDivisor(), Blast_SubjectIsTranslated(), BLAST_UnevenGapSumE(), BlastHSP::context, context, BlastQueryInfo::contexts, eBlastTypeTblastx, BlastContextInfo::eff_searchsp, BlastLinkHSPParameters::gap_decay_rate, BlastLinkHSPParameters::gap_size, BlastLinkedHSPSet::hsp, BlastContextInfo::length_adjustment, BlastLinkHSPParameters::longest_intron, MAX, BlastHSP::num, BlastLinkHSPParameters::overlap_size, BlastContextInfo::query_length, and BlastLinkedHSPSet::sum_score.
Referenced by s_BlastUnevenGapLinkHSPs().
Callback used by qsort to sort a list of BlastLinkedHSPSet structures in order of decreasing sum score.
Entries in the list may be NULL
v1 | first HSP in list [in] |
v2 | second HSP in list [in] |
Definition at line 1205 of file link_hsps.c.
References BlastLinkedHSPSet::hsp, ScoreCompareHSPs(), BlastLinkedHSPSet::sum_score, and v2.
Referenced by s_BlastUnevenGapLinkHSPs().