1
/* $Id: blast_engine.h,v 1.44 2004/09/07 17:20:01 dondosha Exp $
2
* ===========================================================================
5
* National Center for Biotechnology Information
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.
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
22
* Please cite the author in any work or product based on this material.
24
* ===========================================================================
26
* Author: Ilya Dondoshansky
30
/** @file blast_engine.h
31
* High level BLAST functions
34
#ifndef __BLAST_ENGINE__
35
#define __BLAST_ENGINE__
37
#include <algo/blast/core/blast_def.h>
38
#include <algo/blast/core/blast_extend.h>
39
#include <algo/blast/core/blast_gapalign.h>
40
#include <algo/blast/core/blast_hits.h>
41
#include <algo/blast/core/blast_seqsrc.h>
42
#include <algo/blast/core/blast_diagnostics.h>
43
#include <algo/blast/core/blast_hspstream.h>
49
/** The high level function performing the BLAST search against a BLAST
50
* database after all the setup has been done.
51
* @param program_number Type of BLAST program [in]
52
* @param query The query sequence [in]
53
* @param query_info Additional query information [in]
54
* @param seq_src Structure containing BLAST database [in]
55
* @param sbp Scoring and statistical parameters [in]
56
* @param score_options Hit scoring options [in]
57
* @param lookup_wrap The lookup table, constructed earlier [in]
58
* @param word_options Options for processing initial word hits [in]
59
* @param ext_options Options and parameters for the gapped extension [in]
60
* @param hit_options Options for saving the HSPs [in]
61
* @param eff_len_options Options for setting effective lengths [in]
62
* @param psi_options Options specific to PSI-BLAST [in]
63
* @param db_options Options for handling BLAST database [in]
64
* @param hsp_stream Structure for streaming results [in] [out]
65
* @param diagnostics Return statistics containing numbers of hits on
66
* different stages of the search [out]
67
* @param results Results of the BLAST search [out]
70
BLAST_SearchEngine(EBlastProgramType program_number,
71
BLAST_SequenceBlk* query, BlastQueryInfo* query_info,
72
const BlastSeqSrc* seq_src, BlastScoreBlk* sbp,
73
const BlastScoringOptions* score_options,
74
LookupTableWrap* lookup_wrap,
75
const BlastInitialWordOptions* word_options,
76
const BlastExtensionOptions* ext_options,
77
const BlastHitSavingOptions* hit_options,
78
const BlastEffectiveLengthsOptions* eff_len_options,
79
const PSIBlastOptions* psi_options,
80
const BlastDatabaseOptions* db_options,
81
BlastHSPStream* hsp_stream, BlastDiagnostics* diagnostics,
82
BlastHSPResults** results);
84
/** The high level function performing an RPS BLAST search
85
* @param program_number Type of BLAST program [in]
86
* @param query The query sequence [in]
87
* @param query_info Additional query information [in]
88
* @param seq_src Structure containing BLAST database [in]
89
* @param sbp Scoring and statistical parameters [in]
90
* @param score_options Hit scoring options [in]
91
* @param lookup_wrap The lookup table, constructed earlier [in]
92
* @param word_options Options for processing initial word hits [in]
93
* @param ext_options Options and parameters for the gapped extension [in]
94
* @param hit_options Options for saving the HSPs [in]
95
* @param eff_len_options Options for setting effective lengths [in]
96
* @param psi_options Options specific to PSI-BLAST [in]
97
* @param db_options Options for handling BLAST database [in]
98
* @param hsp_stream Placeholder for saving results [in]
99
* @param diagnostics Return statistics containing numbers of hits on
100
* different stages of the search [out]
101
* @param results Structure holding all saved results [in] [out]
104
BLAST_RPSSearchEngine(EBlastProgramType program_number,
105
BLAST_SequenceBlk* query, BlastQueryInfo* query_info,
106
const BlastSeqSrc* seq_src, BlastScoreBlk* sbp,
107
const BlastScoringOptions* score_options,
108
LookupTableWrap* lookup_wrap,
109
const BlastInitialWordOptions* word_options,
110
const BlastExtensionOptions* ext_options,
111
const BlastHitSavingOptions* hit_options,
112
const BlastEffectiveLengthsOptions* eff_len_options,
113
const PSIBlastOptions* psi_options,
114
const BlastDatabaseOptions* db_options,
115
BlastHSPStream* hsp_stream, BlastDiagnostics* diagnostics,
116
BlastHSPResults** results);
118
/** Perform the preliminary stage of the BLAST search.
119
* @param program_number Type of BLAST program [in]
120
* @param query The query sequence [in]
121
* @param query_info Additional query information [in]
122
* @param seq_src Structure containing BLAST database [in]
123
* @param gap_align Structure containing scoring block and memory allocated
124
* for gapped alignment. [in]
125
* @param score_params Hit scoring parameters [in]
126
* @param lookup_wrap The lookup table, constructed earlier [in]
127
* @param word_options Options for processing initial word hits [in]
128
* @param ext_params Parameters for the gapped extension [in]
129
* @param hit_params Parameters for saving the HSPs [in]
130
* @param eff_len_params Parameters for setting effective lengths [in]
131
* @param psi_options Options specific to PSI-BLAST [in]
132
* @param db_options Options for handling BLAST database [in]
133
* @param hsp_stream Placeholder for saving HSP lists [in]
134
* @param diagnostics Return statistics containing numbers of hits on
135
* different stages of the search. Statistics saved only
136
* for the allocated parts of the structure. [in] [out]
139
BLAST_PreliminarySearchEngine(EBlastProgramType program_number,
140
BLAST_SequenceBlk* query, BlastQueryInfo* query_info,
141
const BlastSeqSrc* seq_src, BlastGapAlignStruct* gap_align,
142
BlastScoringParameters* score_params,
143
LookupTableWrap* lookup_wrap,
144
const BlastInitialWordOptions* word_options,
145
BlastExtensionParameters* ext_params,
146
BlastHitSavingParameters* hit_params,
147
BlastEffectiveLengthsParameters* eff_len_params,
148
const PSIBlastOptions* psi_options,
149
const BlastDatabaseOptions* db_options,
150
BlastHSPStream* hsp_stream, BlastDiagnostics* diagnostics);
152
/** Gapped extension function pointer type */
153
typedef Int2 (*BlastGetGappedScoreType)
154
(EBlastProgramType, BLAST_SequenceBlk*, BlastQueryInfo* query_info,
155
BLAST_SequenceBlk*, BlastGapAlignStruct*, const BlastScoringParameters*,
156
const BlastExtensionParameters*, const BlastHitSavingParameters*,
157
BlastInitHitList*, BlastHSPList**, BlastGappedStats*);
159
/** Word finder function pointer type */
160
typedef Int2 (*BlastWordFinderType)
161
(BLAST_SequenceBlk*, BLAST_SequenceBlk*,
162
LookupTableWrap*, Int4**, const BlastInitialWordParameters*,
163
Blast_ExtendWord*, Uint4*, Uint4*, Int4, BlastInitHitList*,
164
BlastUngappedStats*);
169
#endif /* !__BLAST_ENGINE__ */