NCBI C++ ToolKit
Typedefs | Functions | Variables
blast_engine.h File Reference

Function calls to actually perform a BLAST search (high level). More...

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_export.h>
#include <algo/blast/core/blast_def.h>
#include <algo/blast/core/blast_program.h>
#include <algo/blast/core/blast_extend.h>
#include <algo/blast/core/blast_gapalign.h>
#include <algo/blast/core/blast_hits.h>
#include <algo/blast/core/blast_options.h>
#include <algo/blast/core/blast_parameters.h>
#include <algo/blast/core/blast_seqsrc.h>
#include <algo/blast/core/blast_diagnostics.h>
#include <algo/blast/core/blast_hspstream.h>
#include <algo/blast/core/na_ungapped.h>
+ Include dependency graph for blast_engine.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.

Typedefs

typedef Int2(* BlastGetGappedScoreType) (EBlastProgramType, BLAST_SequenceBlk *, BlastQueryInfo *, BLAST_SequenceBlk *, BlastGapAlignStruct *, const BlastScoringParameters *, const BlastExtensionParameters *, const BlastHitSavingParameters *, BlastInitHitList *, BlastHSPList **, BlastGappedStats *, Boolean *fence_hit)
 Gapped extension function pointer type. More...
 
typedef Int2(* BlastWordFinderType) (BLAST_SequenceBlk *, BLAST_SequenceBlk *, BlastQueryInfo *, LookupTableWrap *, Int4 **, const BlastInitialWordParameters *, Blast_ExtendWord *, BlastOffsetPair *, Int4, BlastInitHitList *, BlastUngappedStats *)
 Word finder function pointer type. More...
 
typedef Int2(* JumperGappedType) (BLAST_SequenceBlk *, BLAST_SequenceBlk *, BlastQueryInfo *, LookupTableWrap *, const BlastInitialWordParameters *, const BlastScoringParameters *, const BlastHitSavingParameters *, BlastOffsetPair *offset_pairs, MapperWordHits *mapper_wordhits, Int4, BlastGapAlignStruct *, BlastInitHitList *, BlastHSPList **, BlastUngappedStats *, BlastGappedStats *)
 Short read mapper function pointer type. More...
 

Functions

Int4 Blast_RunFullSearch (EBlastProgramType program_number, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, const BlastSeqSrc *seq_src, BlastScoreBlk *sbp, const BlastScoringOptions *score_options, LookupTableWrap *lookup_wrap, const BlastInitialWordOptions *word_options, const BlastExtensionOptions *ext_options, const BlastHitSavingOptions *hit_options, const BlastEffectiveLengthsOptions *eff_len_options, const PSIBlastOptions *psi_options, const BlastDatabaseOptions *db_options, BlastHSPStream *hsp_stream, const BlastRPSInfo *rps_info, BlastDiagnostics *diagnostics, BlastHSPResults **results, TInterruptFnPtr interrupt_search, SBlastProgress *progress_info)
 The high level function performing the BLAST search against a BLAST database after all the setup has been done. More...
 
Int4 BLAST_PreliminarySearchEngine (EBlastProgramType program_number, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, const BlastSeqSrc *seq_src, BlastGapAlignStruct *gap_align, BlastScoringParameters *score_params, LookupTableWrap *lookup_wrap, const BlastInitialWordOptions *word_options, BlastExtensionParameters *ext_params, BlastHitSavingParameters *hit_params, BlastEffectiveLengthsParameters *eff_len_params, const PSIBlastOptions *psi_options, const BlastDatabaseOptions *db_options, BlastHSPStream *hsp_stream, BlastDiagnostics *diagnostics, TInterruptFnPtr interrupt_search, SBlastProgress *progress_info)
 Perform the preliminary stage of the BLAST search. More...
 
Int2 Blast_RunPreliminarySearch (EBlastProgramType program, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, const BlastSeqSrc *seq_src, const BlastScoringOptions *score_options, BlastScoreBlk *sbp, LookupTableWrap *lookup_wrap, const BlastInitialWordOptions *word_options, const BlastExtensionOptions *ext_options, const BlastHitSavingOptions *hit_options, const BlastEffectiveLengthsOptions *eff_len_options, const PSIBlastOptions *psi_options, const BlastDatabaseOptions *db_options, BlastHSPStream *hsp_stream, BlastDiagnostics *diagnostics)
 The high level function performing the BLAST search against a BLAST database after all the setup has been done. More...
 
Int2 Blast_RunPreliminarySearchWithInterrupt (EBlastProgramType program, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, const BlastSeqSrc *seq_src, const BlastScoringOptions *score_options, BlastScoreBlk *sbp, LookupTableWrap *lookup_wrap, const BlastInitialWordOptions *word_options, const BlastExtensionOptions *ext_options, const BlastHitSavingOptions *hit_options, const BlastEffectiveLengthsOptions *eff_len_options, const PSIBlastOptions *psi_options, const BlastDatabaseOptions *db_options, BlastHSPStream *hsp_stream, BlastDiagnostics *diagnostics, TInterruptFnPtr interrupt_search, SBlastProgress *progress_info)
 Same as above, with support for user interrupt function. More...
 

Variables

const int kBlastMajorVersion
 Major version. More...
 
const int kBlastMinorVersion
 Minor version. More...
 
const int kBlastPatchVersion
 Patch version. More...
 
const char * kBlastReleaseDate
 Date of the most recent BLAST release (kept for historical reasons) More...
 

Detailed Description

Function calls to actually perform a BLAST search (high level).

Definition in file blast_engine.h.

Typedef Documentation

Gapped extension function pointer type.

Definition at line 214 of file blast_engine.h.

Word finder function pointer type.

Definition at line 229 of file blast_engine.h.

Short read mapper function pointer type.

Definition at line 243 of file blast_engine.h.

Function Documentation

Int4 BLAST_PreliminarySearchEngine ( EBlastProgramType  program_number,
BLAST_SequenceBlk query,
BlastQueryInfo query_info,
const BlastSeqSrc seq_src,
BlastGapAlignStruct gap_align,
BlastScoringParameters score_params,
LookupTableWrap lookup_wrap,
const BlastInitialWordOptions word_options,
BlastExtensionParameters ext_params,
BlastHitSavingParameters hit_params,
BlastEffectiveLengthsParameters eff_len_params,
const PSIBlastOptions psi_options,
const BlastDatabaseOptions db_options,
BlastHSPStream hsp_stream,
BlastDiagnostics diagnostics,
TInterruptFnPtr  interrupt_search,
SBlastProgress progress_info 
)

Perform the preliminary stage of the BLAST search.

Parameters
program_numberType of BLAST program [in]
queryThe query sequence [in]
query_infoAdditional query information [in]
seq_srcStructure containing BLAST database [in]
gap_alignStructure containing scoring block and memory allocated for gapped alignment. [in]
score_paramsHit scoring parameters [in]
lookup_wrapThe lookup table, constructed earlier [in]
word_optionsOptions for processing initial word hits [in]
ext_paramsParameters for the gapped extension [in]
hit_paramsParameters for saving the HSPs [in]
eff_len_paramsParameters for setting effective lengths [in]
psi_optionsOptions specific to PSI-BLAST [in]
db_optionsOptions for handling BLAST database [in]
hsp_streamPlaceholder for saving HSP lists [in]
diagnosticsReturn statistics containing numbers of hits on different stages of the search. Statistics saved only for the allocated parts of the structure. [in] [out]
interrupt_searchfunction callback to allow interruption of BLAST search [in, optional]
progress_infocontains information about the progress of the current BLAST search [in|out]

Definition at line 1460 of file blast_engine.c.

References ASSERT, BLAST_SequenceBlk::bases_offset, Blast_HSPListFree(), Blast_HSPListGetBitScores(), Blast_HSPListGetEvalues(), Blast_HSPListReapByQueryCoverage(), Blast_HSPListReapByRawScore(), Blast_HSPListReevaluateUngapped(), BLAST_LinkHsps(), BLAST_OneSubjectUpdateParameters(), Blast_ProgramIsMapping(), Blast_ProgramIsNucleotide(), Blast_ProgramIsRpsBlast(), BLAST_SEQSRC_EOF, BLAST_SEQSRC_ERROR, Blast_SubjectIsTranslated(), BLASTERR_INTERRUPTED, BLASTERR_SEQSRC, BlastHSPStreamWrite(), BlastInitialWordParametersFree(), BlastInitialWordParametersNew(), BlastLinkHSPParametersUpdate(), BlastSeqSrcGetAvgSeqLen(), BlastSeqSrcGetNumSeqs(), BlastSeqSrcGetSequence(), BlastSeqSrcGetTotLen(), BlastSeqSrcIteratorFree(), BlastSeqSrcIteratorNewEx(), BlastSeqSrcIteratorNext(), BlastSeqSrcReleaseSequence(), BlastSequenceBlkFree(), CalculateLinkHSPCutoffs(), LookupTableWrap::check_index_oid, CODON_LENGTH, BlastDiagnostics::cutoffs, DoAnchoredSearch(), eBlastEncodingProtein, BlastSeqSrcGetSeqArg::encoding, LookupTableWrap::end_search_indication, eNoResults, ePrelimSearch, FALSE, BlastScoringOptions::gapped_calculation, BLAST_SequenceBlk::gen_code_string, GenCodeSingletonFind(), BlastDatabaseOptions::genetic_code, BlastHitList::heapified, BlastHSPResults::hitlist_array, BlastHSPList::hspcnt, if(), LAST_VOL_IDX_INIT, BLAST_SequenceBlk::length, BlastHitSavingParameters::link_hsp_params, BlastHitList::low_score, BlastHitSavingParameters::low_score, BlastHitSavingOptions::low_score_perc, BlastScoreBlk::matrix_only_scoring, MAX, NULL, BlastHSPResults::num_queries, BlastSeqSrcGetSeqArg::oid, BlastExtensionParameters::options, BlastHitSavingParameters::options, BlastScoringParameters::options, BlastHSPStream::results, s_AdjustSubjectForSraSearch(), s_AdjustSubjectForTranslatedSraSearch(), s_Blast_HSPListReapByPrelimEvalue(), s_BlastCoreAuxStructFree(), s_BlastSearchEngineCore(), s_BlastSetUpAuxStructures(), s_FillReturnCutoffsInfo(), s_GetMinimumSubjSeqLen(), s_RPSPreliminarySearchEngine(), BlastGapAlignStruct::sbp, BlastSeqSrcGetSeqArg::seq, SBlastProgress::stage, and TRUE.

Referenced by Blast_RunFullSearch(), and Blast_RunPreliminarySearchWithInterrupt().

Int4 Blast_RunFullSearch ( EBlastProgramType  program_number,
BLAST_SequenceBlk query,
BlastQueryInfo query_info,
const BlastSeqSrc seq_src,
BlastScoreBlk sbp,
const BlastScoringOptions score_options,
LookupTableWrap lookup_wrap,
const BlastInitialWordOptions word_options,
const BlastExtensionOptions ext_options,
const BlastHitSavingOptions hit_options,
const BlastEffectiveLengthsOptions eff_len_options,
const PSIBlastOptions psi_options,
const BlastDatabaseOptions db_options,
BlastHSPStream hsp_stream,
const BlastRPSInfo rps_info,
BlastDiagnostics diagnostics,
BlastHSPResults **  results,
TInterruptFnPtr  interrupt_search,
SBlastProgress progress_info 
)

The high level function performing the BLAST search against a BLAST database after all the setup has been done.

Parameters
program_numberType of BLAST program [in]
queryThe query sequence [in]
query_infoAdditional query information [in]
seq_srcStructure containing BLAST database [in]
sbpScoring and statistical parameters [in]
score_optionsHit scoring options [in]
lookup_wrapThe lookup table, constructed earlier [in]
word_optionsOptions for processing initial word hits [in]
ext_optionsOptions and parameters for the gapped extension [in]
hit_optionsOptions for saving the HSPs [in]
eff_len_optionsOptions for setting effective lengths [in]
psi_optionsOptions specific to PSI-BLAST [in]
db_optionsOptions for handling BLAST database [in]
hsp_streamStructure for streaming results [in] [out]
rps_infoRPS BLAST auxiliary data structure [in]
diagnosticsReturn statistics containing numbers of hits on different stages of the search [out]
resultsResults of the BLAST search [out]
interrupt_searchfunction callback to allow interruption of BLAST search [in, optional]
progress_infocontains information about the progress of the current BLAST search [in|out]

Definition at line 1841 of file blast_engine.c.

References BLAST_ComputeTraceback(), BLAST_GapAlignSetUp(), BLAST_PreliminarySearchEngine(), Blast_ProgramIsPhiBlast(), BlastHSPStreamClose(), BlastUngappedStats::lookup_hits, LookupTableWrap::lut, NULL, SPHIPatternSearchBlk::num_patterns_db, s_BlastRunFullSearchCleanUp(), and BlastDiagnostics::ungapped_stat.

Int2 Blast_RunPreliminarySearch ( EBlastProgramType  program,
BLAST_SequenceBlk query,
BlastQueryInfo query_info,
const BlastSeqSrc seq_src,
const BlastScoringOptions score_options,
BlastScoreBlk sbp,
LookupTableWrap lookup_wrap,
const BlastInitialWordOptions word_options,
const BlastExtensionOptions ext_options,
const BlastHitSavingOptions hit_options,
const BlastEffectiveLengthsOptions eff_len_options,
const PSIBlastOptions psi_options,
const BlastDatabaseOptions db_options,
BlastHSPStream hsp_stream,
BlastDiagnostics diagnostics 
)

The high level function performing the BLAST search against a BLAST database after all the setup has been done.

Parameters
program_numberType of BLAST program [in]
queryThe query sequence [in]
query_infoAdditional query information [in]
seq_srcStructure containing BLAST database [in]
score_optionsHit scoring options [in]
sbpScoring and statistical parameters [in]
lookup_wrapThe lookup table, constructed earlier [in]
word_optionsOptions for processing initial word hits [in]
ext_optionsOptions and parameters for the gapped extension [in]
hit_optionsOptions for saving the HSPs [in]
eff_len_optionsOptions for setting effective lengths [in]
psi_optionsOptions specific to PSI-BLAST [in]
db_optionsOptions for handling BLAST database [in]
hsp_streamStructure for streaming results [in] [out]
diagnosticsReturn statistics containing numbers of hits on different stages of the search [out]

Definition at line 1735 of file blast_engine.c.

References Blast_RunPreliminarySearchWithInterrupt(), and NULL.

Int2 Blast_RunPreliminarySearchWithInterrupt ( EBlastProgramType  program,
BLAST_SequenceBlk query,
BlastQueryInfo query_info,
const BlastSeqSrc seq_src,
const BlastScoringOptions score_options,
BlastScoreBlk sbp,
LookupTableWrap lookup_wrap,
const BlastInitialWordOptions word_options,
const BlastExtensionOptions ext_options,
const BlastHitSavingOptions hit_options,
const BlastEffectiveLengthsOptions eff_len_options,
const PSIBlastOptions psi_options,
const BlastDatabaseOptions db_options,
BlastHSPStream hsp_stream,
BlastDiagnostics diagnostics,
TInterruptFnPtr  interrupt_search,
SBlastProgress progress_info 
)

Same as above, with support for user interrupt function.

Parameters
program_numberType of BLAST program [in]
queryThe query sequence [in]
query_infoAdditional query information [in]
seq_srcStructure containing BLAST database [in]
score_optionsHit scoring options [in]
sbpScoring and statistical parameters [in]
lookup_wrapThe lookup table, constructed earlier [in]
word_optionsOptions for processing initial word hits [in]
ext_optionsOptions and parameters for the gapped extension [in]
hit_optionsOptions for saving the HSPs [in]
eff_len_optionsOptions for setting effective lengths [in]
psi_optionsOptions specific to PSI-BLAST [in]
db_optionsOptions for handling BLAST database [in]
hsp_streamStructure for streaming results [in] [out]
diagnosticsReturn statistics containing numbers of hits on different stages of the search [out]
interrupt_searchUser defined function to interrupt search [in]
progress_infoUser supplied data structure to aid interrupt [in]

Definition at line 1758 of file blast_engine.c.

References Blast_DiagnosticsFree(), Blast_DiagnosticsInit(), Blast_DiagnosticsUpdate(), BLAST_GapAlignSetUp(), BLAST_GapAlignStructFree(), BLAST_PreliminarySearchEngine(), BlastEffectiveLengthsParametersFree(), BlastExtensionParametersFree(), BlastHitSavingParametersFree(), BlastScoringParametersFree(), NULL, and BlastGapAlignStruct::sbp.

Referenced by Blast_RunPreliminarySearch(), and CPrelimSearchRunner::operator()().

Variable Documentation

const int kBlastMajorVersion

Major version.

Definition at line 81 of file blast_engine.c.

const int kBlastMinorVersion

Minor version.

Definition at line 82 of file blast_engine.c.

const int kBlastPatchVersion

Patch version.

Definition at line 83 of file blast_engine.c.

const char* kBlastReleaseDate

Date of the most recent BLAST release (kept for historical reasons)

Definition at line 84 of file blast_engine.c.

Modified on Mon Mar 27 16:06:57 2017 by modify_doxy.py rev. 506947