NCBI C++ ToolKit
blast_sw.h
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: blast_sw.h 40601 2009-01-05 16:51:12Z camacho $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Jason Papadopoulos
27  *
28  */
29 
30 /** @file blast_sw.h
31  * Smith-Waterman alignment for use within the infrastructure of BLAST
32  */
33 
34 #ifndef ALGO_BLAST_CORE___BLAST_SW__H
35 #define ALGO_BLAST_CORE___BLAST_SW__H
36 
45 
46 /** @addtogroup AlgoBlast
47  *
48  * @{
49  */
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 /** Find all local alignments between two (unpacked) sequences, using
56  * the Smith-Waterman algorithm, then save the list of alignments found.
57  * The algorithm to recover all high-scoring local alignments, and not
58  * just the best one, is described in
59  * <PRE>
60  * Geoffrey J. Barton, "An Efficient Algorithm to Locate All
61  * Locally Optimal Alignments Between Two Sequences Allowing for Gaps".
62  * Computer Applications in the Biosciences, (1993), 9, pp. 729-734
63  * </PRE>
64  * @param program_number Blast program requesting traceback [in]
65  * @param A The first sequence [in]
66  * @param a_size Length of the first sequence [in]
67  * @param B The second sequence [in]
68  * @param b_size Length of the second sequence [in]
69  * @param template_hsp Placeholder alignment, used only to
70  * determine contexts and frames [in]
71  * @param hsp_list Collection of alignments found so far [in][out]
72  * @param score_params Structure containing gap penalties [in]
73  * @param hit_params Structure used for percent identity calculation [in]
74  * @param gap_align Auxiliary data for gapped alignment
75  * (used for score matrix info) [in]
76  * @param start_shift Bias to be applied to subject offsets [in]
77  * @param cutoff Alignments are saved if their score exceeds this value [in]
78  */
80  const Uint1 *A, Int4 a_size,
81  const Uint1 *B, Int4 b_size,
82  BlastHSP *template_hsp,
83  BlastHSPList *hsp_list,
84  const BlastScoringParameters *score_params,
85  const BlastHitSavingParameters *hit_params,
86  BlastGapAlignStruct *gap_align,
87  Int4 start_shift, Int4 cutoff);
88 
89 /** Performs score-only Smith-Waterman gapped alignment of the subject
90  * sequence with all contexts in the query.
91  * @param program_number Type of BLAST program [in]
92  * @param query The query sequence block [in]
93  * @param query_info Query information structure, containing offsets into
94  * the concatenated sequence [in]
95  * @param subject The subject sequence block [in]
96  * @param gap_align The auxiliary structure for gapped alignment [in]
97  * @param score_params Options and parameters related to scoring [in]
98  * @param ext_params Options and parameters related to extensions [in]
99  * @param hit_params Options related to saving hits [in]
100  * @param init_hitlist List of initial HSPs (ignored)
101  * @param hsp_list_ptr Structure containing all saved HSPs. Note that
102  * there will be at most one HSP for each context that
103  * contains a gapped alignment that exceeds a cutoff
104  * score. [out]
105  * @param gapped_stats Return statistics (not filled if NULL) [out]
106  * @param fence_hit Partial range support (not used for S/W). [in]
107  */
109  BLAST_SequenceBlk* query, BlastQueryInfo* query_info,
111  BlastGapAlignStruct* gap_align,
112  const BlastScoringParameters* score_params,
113  const BlastExtensionParameters* ext_params,
114  const BlastHitSavingParameters* hit_params,
115  BlastInitHitList* init_hitlist,
116  BlastHSPList** hsp_list_ptr, BlastGappedStats* gapped_stats,
117  Boolean * fence_hit);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 /* @} */
124 
125 #endif /* ALGO_BLAST_CORE___BLAST_SW__H */
Definitions used throughout BLAST.
Various diagnostics (hit counts, etc.) returned from the BLAST engine.
Structures and functions prototypes used for BLAST gapped extension.
Structures and API used for saving BLAST hits.
Structure and function definitions for BLAST parameter structures, which are internal to the CORE of ...
Definitions for various programs supported by core BLAST.
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Definition: blast_program.h:72
Definitions and functions associated with the BlastQueryInfo structure.
void SmithWatermanScoreWithTraceback(EBlastProgramType program_number, const Uint1 *A, Int4 a_size, const Uint1 *B, Int4 b_size, BlastHSP *template_hsp, BlastHSPList *hsp_list, const BlastScoringParameters *score_params, const BlastHitSavingParameters *hit_params, BlastGapAlignStruct *gap_align, Int4 start_shift, Int4 cutoff)
Find all local alignments between two (unpacked) sequences, using the Smith-Waterman algorithm,...
Definition: blast_sw.c:414
Int2 BLAST_SmithWatermanGetGappedScore(EBlastProgramType program_number, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, BLAST_SequenceBlk *subject, BlastGapAlignStruct *gap_align, const BlastScoringParameters *score_params, const BlastExtensionParameters *ext_params, const BlastHitSavingParameters *hit_params, BlastInitHitList *init_hitlist, BlastHSPList **hsp_list_ptr, BlastGappedStats *gapped_stats, Boolean *fence_hit)
Performs score-only Smith-Waterman gapped alignment of the subject sequence with all contexts in the ...
Definition: blast_sw.c:629
uint8_t Uint1
1-byte (8-bit) unsigned integer
Definition: ncbitype.h:99
int16_t Int2
2-byte (16-bit) signed integer
Definition: ncbitype.h:100
int32_t Int4
4-byte (32-bit) signed integer
Definition: ncbitype.h:102
Type and macro definitions from C toolkit that are not defined in C++ toolkit.
Uint1 Boolean
bool replacment for C
Definition: ncbi_std.h:94
Structure to hold a sequence.
Definition: blast_def.h:242
Computed values used as parameters for gapped alignments.
Structure supporting the gapped alignment.
Structure containing hit counts from the gapped stage of a BLAST search.
The structure to hold all HSPs for a given sequence after the gapped alignment.
Definition: blast_hits.h:153
Structure holding all information about an HSP.
Definition: blast_hits.h:126
Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.
Structure to hold all initial HSPs for a given subject sequence.
Definition: blast_extend.h:158
The query related information.
Scoring parameters block Contains scoring-related information that is actually used for the blast sea...
static string subject
static string query
Modified on Sun May 19 04:47:58 2024 by modify_doxy.py rev. 669887