NCBI C++ ToolKit
Macros | Functions
blast_hits_priv.h File Reference

Utilities for dealing with BLAST HSPs in the core of BLAST. More...

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_hits.h>
+ Include dependency graph for blast_hits_priv.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define CONTAINED_IN_HSP(a, b, c, d, e, f)    (((a <= c && b >= c) && (d <= f && e >= f)) ? TRUE : FALSE)
 TRUE if c is between a and b; f between d and e. More...
 

Functions

Int4 Blast_CheckHSPsForCommonEndpoints (BlastHSP **hsp_array, Int4 hsp_count)
 Check the gapped alignments for an overlap of two different alignments. More...
 
int ScoreCompareHSPs (const void *h1, const void *h2)
 Comparison callback function for sorting HSPs, first by score in descending order, then by location. More...
 

Detailed Description

Utilities for dealing with BLAST HSPs in the core of BLAST.

Definition in file blast_hits_priv.h.

Macro Definition Documentation

◆ CONTAINED_IN_HSP

#define CONTAINED_IN_HSP (   a,
  b,
  c,
  d,
  e,
  f 
)     (((a <= c && b >= c) && (d <= f && e >= f)) ? TRUE : FALSE)

TRUE if c is between a and b; f between d and e.

Determines if the coordinates are already in an HSP that has been evaluated.

Definition at line 68 of file blast_hits_priv.h.

Function Documentation

◆ Blast_CheckHSPsForCommonEndpoints()

Int4 Blast_CheckHSPsForCommonEndpoints ( BlastHSP **  hsp_array,
Int4  hsp_count 
)

Check the gapped alignments for an overlap of two different alignments.

A sufficient overlap is when two alignments have the same start values of have the same final values.

Parameters
hsp_arrayPointer to an array of BlastHSP structures [in]
hsp_countThe size of the hsp_array [in]
Returns
The number of valid alignments remaining.

◆ ScoreCompareHSPs()

int ScoreCompareHSPs ( const void *  h1,
const void *  h2 
)

Comparison callback function for sorting HSPs, first by score in descending order, then by location.

Among alignments with equal score, an HSP will precede any other HSPs that are completely contained within its endpoints.

H2 is contained in H1 if and only if H1.query.offset <= H2.query.offset <= H2.query.end <= H1.query.end H1.sbjct.offset <= H2.sbjct.offset <= H2.sbjct.end <= H1.sbjct.end

Definition at line 1330 of file blast_hits.c.

References BLAST_CMP, BlastSeg::end, BlastSeg::offset, BlastHSP::query, result, BlastHSP::score, and BlastHSP::subject.

Referenced by Blast_HSPListIsSortedByScore(), Blast_HSPListSaveHSP(), Blast_HSPListSortByScore(), s_BlastHSPListInsertHSPInHeap(), s_BlastHSPListsCombineByScore(), s_EvalueCompareHSPs(), s_ScoreCompareHSPWithContext(), and s_SumScoreCompareLinkedHSPSets().

Modified on Fri Sep 20 14:57:21 2024 by modify_doxy.py rev. 669887