NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions
blast_parameters.h File Reference

Structure and function definitions for BLAST parameter structures, which are internal to the CORE of BLAST. More...

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_export.h>
#include <algo/blast/core/blast_program.h>
#include <algo/blast/core/blast_query_info.h>
#include <algo/blast/core/blast_options.h>
#include <algo/blast/core/blast_message.h>
#include <algo/blast/core/blast_stat.h>
#include <algo/blast/core/lookup_wrap.h>
+ Include dependency graph for blast_parameters.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.

Classes

struct  BlastUngappedCutoffs
 All the ungapped cutoff values that can change from context to context. More...
 
struct  BlastInitialWordParameters
 Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it. More...
 
struct  BlastExtensionParameters
 Computed values used as parameters for gapped alignments. More...
 
struct  BlastLinkHSPParameters
 Parameter block for linking HSPs with sum statistics. More...
 
struct  BlastGappedCutoffs
 All the gapped cutoff values that can change from context to context. More...
 
struct  BlastHitSavingParameters
 Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it. More...
 
struct  BlastScoringParameters
 Scoring parameters block Contains scoring-related information that is actually used for the blast search. More...
 
struct  BlastEffectiveLengthsParameters
 Parameters for setting up effective lengths and search spaces. More...
 

Macros

#define BLAST_GAP_PROB   0.5
 Default parameters for linking HSPs. More...
 
#define BLAST_GAP_PROB_GAPPED   1.0
 Gap probability for gapped search. More...
 
#define BLAST_GAP_DECAY_RATE   0.5
 Gap decay rate for ungapped search. More...
 
#define BLAST_GAP_DECAY_RATE_GAPPED   0.1
 Gap decay rate for gapped search. More...
 
#define BLAST_GAP_SIZE   40
 Default gap size. More...
 
#define BLAST_OVERLAP_SIZE   9
 Default overlap size. More...
 
#define CUTOFF_E_BLASTN   0.05
 Expect values corresponding to the default cutoff scores for all ungapped and gapped blastn alignments. More...
 
#define CUTOFF_E_BLASTP   1e-300
 default evalue (ungapped blastp) More...
 
#define CUTOFF_E_BLASTX   1.0
 default evalue (ungapped blastx) More...
 
#define CUTOFF_E_TBLASTN   1.0
 default evalue (ungapped tblastn) More...
 
#define CUTOFF_E_TBLASTX   1e-300
 default evalue (tblastx) More...
 
#define RESTRICTED_ALIGNMENT_WORST_EVALUE   10.0
 Because approximate gapped alignment adds extra overhead, it should be avoided if there is no performance benefit to using it. More...
 

Typedefs

typedef enum ESeedContainerType ESeedContainerType
 specifies the data structures used for bookkeeping during computation of ungapped extensions More...
 
typedef struct BlastUngappedCutoffs BlastUngappedCutoffs
 All the ungapped cutoff values that can change from context to context. More...
 
typedef struct BlastInitialWordParameters BlastInitialWordParameters
 Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it. More...
 
typedef struct BlastExtensionParameters BlastExtensionParameters
 Computed values used as parameters for gapped alignments. More...
 
typedef struct BlastLinkHSPParameters BlastLinkHSPParameters
 Parameter block for linking HSPs with sum statistics. More...
 
typedef struct BlastGappedCutoffs BlastGappedCutoffs
 All the gapped cutoff values that can change from context to context. More...
 
typedef struct BlastHitSavingParameters BlastHitSavingParameters
 Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it. More...
 
typedef struct BlastScoringParameters BlastScoringParameters
 Scoring parameters block Contains scoring-related information that is actually used for the blast search. More...
 
typedef struct BlastEffectiveLengthsParameters BlastEffectiveLengthsParameters
 Parameters for setting up effective lengths and search spaces. More...
 

Enumerations

enum  ESeedContainerType { eDiagArray , eDiagHash , eMaxContainerType }
 specifies the data structures used for bookkeeping during computation of ungapped extensions More...
 

Functions

BlastInitialWordParametersBlastInitialWordParametersFree (BlastInitialWordParameters *parameters)
 Deallocate memory for BlastInitialWordParameters. More...
 
Int2 BlastInitialWordParametersNew (EBlastProgramType program_number, const BlastInitialWordOptions *word_options, const BlastHitSavingParameters *hit_params, const LookupTableWrap *lookup_wrap, const BlastScoreBlk *sbp, BlastQueryInfo *query_info, Uint4 subject_length, BlastInitialWordParameters **parameters)
 Allocate memory for BlastInitialWordParameters and set x_dropoff. More...
 
Int2 BlastInitialWordParametersUpdate (EBlastProgramType program_number, const BlastHitSavingParameters *hit_params, const BlastScoreBlk *sbp, BlastQueryInfo *query_info, Uint4 subject_length, BlastInitialWordParameters *parameters)
 Update cutoff scores in BlastInitialWordParameters structure. More...
 
Int2 BlastExtensionParametersNew (EBlastProgramType blast_program, const BlastExtensionOptions *options, BlastScoreBlk *sbp, BlastQueryInfo *query_info, BlastExtensionParameters **parameters)
 Calculate the raw values for the X-dropoff parameters. More...
 
BlastExtensionParametersBlastExtensionParametersFree (BlastExtensionParameters *parameters)
 Deallocate memory for BlastExtensionParameters. More...
 
BlastScoringParametersBlastScoringParametersFree (BlastScoringParameters *parameters)
 Deallocate memory for BlastScoringParameters. More...
 
Int2 BlastScoringParametersNew (const BlastScoringOptions *options, BlastScoreBlk *sbp, BlastScoringParameters **parameters)
 Calculate scaled cutoff scores and gap penalties. More...
 
BlastEffectiveLengthsParametersBlastEffectiveLengthsParametersFree (BlastEffectiveLengthsParameters *parameters)
 Deallocate memory for BlastEffectiveLengthsParameters*. More...
 
Int2 BlastEffectiveLengthsParametersNew (const BlastEffectiveLengthsOptions *options, Int8 db_length, Int4 num_seqs, BlastEffectiveLengthsParameters **parameters)
 Allocate memory for BlastEffectiveLengthsParameters. More...
 
BlastLinkHSPParametersBlastLinkHSPParametersFree (BlastLinkHSPParameters *parameters)
 Deallocate memory for BlastLinkHSPParameters;. More...
 
Int2 BlastLinkHSPParametersNew (EBlastProgramType program_number, Boolean gapped_calculation, BlastLinkHSPParameters **link_hsp_params)
 Initialize the linking HSPs parameters with default values. More...
 
Int2 BlastLinkHSPParametersUpdate (const BlastInitialWordParameters *word_params, const BlastHitSavingParameters *hit_params, Boolean gapped_calculation)
 Update BlastLinkHSPParameters, using calculated values of other parameters. More...
 
BlastHitSavingParametersBlastHitSavingParametersFree (BlastHitSavingParameters *parameters)
 Deallocate memory for BlastHitSavingOptions*. More...
 
Int2 BlastHitSavingParametersNew (EBlastProgramType program_number, const BlastHitSavingOptions *options, const BlastScoreBlk *sbp, const BlastQueryInfo *query_info, Int4 avg_subject_length, Int4 compositionBasedStats, BlastHitSavingParameters **parameters)
 Allocate memory and initialize the BlastHitSavingParameters structure. More...
 
Int2 BlastHitSavingParametersUpdate (EBlastProgramType program_number, const BlastScoreBlk *sbp, const BlastQueryInfo *query_info, Int4 avg_subject_length, Int4 compositionBasedStats, BlastHitSavingParameters *parameters)
 Updates cutoff scores in hit saving parameters. More...
 
void CalculateLinkHSPCutoffs (EBlastProgramType program, BlastQueryInfo *query_info, const BlastScoreBlk *sbp, BlastLinkHSPParameters *link_hsp_params, const BlastInitialWordParameters *word_params, Int8 db_length, Int4 subject_length)
 Calculates cutoff scores and returns them. More...
 
void printBlastScoringParameters (BlastScoringParameters *params)
 
void printBlastInitialWordParamters (BlastInitialWordParameters *word_params, BlastQueryInfo *query_info)
 
void printBlastExtensionParameters (BlastExtensionParameters *ext_params)
 
void printBlastHitSavingParameters (BlastHitSavingParameters *hit_params, BlastQueryInfo *query_info)
 
void printAllParameters (BlastHitSavingParameters *hit_params, BlastExtensionParameters *ext_params, BlastInitialWordParameters *word_params, BlastQueryInfo *query_info)
 

Detailed Description

Structure and function definitions for BLAST parameter structures, which are internal to the CORE of BLAST.

These parameters are normally set by:
   1.) reading the options in blast_options.[ch] to find user preferences
   2.) making intelligent choices based upon the program, user preferences, 
       and other data such as the sequence's length.

NOTE: These parameters should be set by calls in algo/blast/core, 
      preferrably to functions in this file. User preferences should be 
      controlled by the structures and functions in blast_options.[ch]. 
      The parameter structures belong to algo/blast/core, the options
      structures belong to the user.

Definition in file blast_parameters.h.

Macro Definition Documentation

◆ BLAST_GAP_DECAY_RATE

#define BLAST_GAP_DECAY_RATE   0.5

Gap decay rate for ungapped search.

Definition at line 68 of file blast_parameters.h.

◆ BLAST_GAP_DECAY_RATE_GAPPED

#define BLAST_GAP_DECAY_RATE_GAPPED   0.1

Gap decay rate for gapped search.

Definition at line 69 of file blast_parameters.h.

◆ BLAST_GAP_PROB

#define BLAST_GAP_PROB   0.5

Default parameters for linking HSPs.

Gap probability for ungapped search

Definition at line 66 of file blast_parameters.h.

◆ BLAST_GAP_PROB_GAPPED

#define BLAST_GAP_PROB_GAPPED   1.0

Gap probability for gapped search.

Definition at line 67 of file blast_parameters.h.

◆ BLAST_GAP_SIZE

#define BLAST_GAP_SIZE   40

Default gap size.

Definition at line 70 of file blast_parameters.h.

◆ BLAST_OVERLAP_SIZE

#define BLAST_OVERLAP_SIZE   9

Default overlap size.

Definition at line 71 of file blast_parameters.h.

◆ CUTOFF_E_BLASTN

#define CUTOFF_E_BLASTN   0.05

Expect values corresponding to the default cutoff scores for all ungapped and gapped blastn alignments.

default evalue (blastn)

Definition at line 76 of file blast_parameters.h.

◆ CUTOFF_E_BLASTP

#define CUTOFF_E_BLASTP   1e-300

default evalue (ungapped blastp)

Definition at line 77 of file blast_parameters.h.

◆ CUTOFF_E_BLASTX

#define CUTOFF_E_BLASTX   1.0

default evalue (ungapped blastx)

Definition at line 78 of file blast_parameters.h.

◆ CUTOFF_E_TBLASTN

#define CUTOFF_E_TBLASTN   1.0

default evalue (ungapped tblastn)

Definition at line 79 of file blast_parameters.h.

◆ CUTOFF_E_TBLASTX

#define CUTOFF_E_TBLASTX   1e-300

default evalue (tblastx)

Definition at line 80 of file blast_parameters.h.

◆ RESTRICTED_ALIGNMENT_WORST_EVALUE

#define RESTRICTED_ALIGNMENT_WORST_EVALUE   10.0

Because approximate gapped alignment adds extra overhead, it should be avoided if there is no performance benefit to using it.

To be benficial, most score-only gapped alignments should be the restricted kind, and we can only assure that if the e-value cutoff is not too generous

Definition at line 193 of file blast_parameters.h.

Typedef Documentation

◆ BlastEffectiveLengthsParameters

Parameters for setting up effective lengths and search spaces.

The real database size values to be used for statistical calculations, if there are no overriding values in options.

◆ BlastExtensionParameters

Computed values used as parameters for gapped alignments.

Note that currently the value of the X-dropoff parameter is fixed for all search contexts

◆ BlastGappedCutoffs

All the gapped cutoff values that can change from context to context.

◆ BlastHitSavingParameters

Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.

◆ BlastInitialWordParameters

Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it.

◆ BlastLinkHSPParameters

Parameter block for linking HSPs with sum statistics.

◆ BlastScoringParameters

Scoring parameters block Contains scoring-related information that is actually used for the blast search.

◆ BlastUngappedCutoffs

All the ungapped cutoff values that can change from context to context.

◆ ESeedContainerType

specifies the data structures used for bookkeeping during computation of ungapped extensions

Enumeration Type Documentation

◆ ESeedContainerType

specifies the data structures used for bookkeeping during computation of ungapped extensions

Enumerator
eDiagArray 

use diagonal structures with array of last hits and levels.

eDiagHash 

use hash table (blastn only)

eMaxContainerType 

maximum value for this enumeration

Definition at line 85 of file blast_parameters.h.

Function Documentation

◆ BlastEffectiveLengthsParametersFree()

BlastEffectiveLengthsParameters* BlastEffectiveLengthsParametersFree ( BlastEffectiveLengthsParameters parameters)

◆ BlastEffectiveLengthsParametersNew()

Int2 BlastEffectiveLengthsParametersNew ( const BlastEffectiveLengthsOptions options,
Int8  db_length,
Int4  num_seqs,
BlastEffectiveLengthsParameters **  parameters 
)

Allocate memory for BlastEffectiveLengthsParameters.

Parameters
optionsThe user provided options [in]
db_lengthThe database length [in]
num_seqsNumber of sequences in database [in]
parametersThe parameters structure returned [out]

Definition at line 579 of file blast_parameters.c.

References calloc().

Referenced by BLAST_GapAlignSetUp(), BOOST_AUTO_TEST_CASE(), CEffectiveSearchSpaceCalculator::CEffectiveSearchSpaceCalculator(), LinkHspTestFixture::fillEffectiveLengths(), CBlastExtendTestFixture::fillEffectiveLengths(), and CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest().

◆ BlastExtensionParametersFree()

BlastExtensionParameters* BlastExtensionParametersFree ( BlastExtensionParameters parameters)

◆ BlastExtensionParametersNew()

Int2 BlastExtensionParametersNew ( EBlastProgramType  blast_program,
const BlastExtensionOptions options,
BlastScoreBlk sbp,
BlastQueryInfo query_info,
BlastExtensionParameters **  parameters 
)

Calculate the raw values for the X-dropoff parameters.

Parameters
blast_programProgram number [in]
optionsAlready allocated extension options [in]
sbpStructure containing statistical information [in]
query_infoQuery information, needed only for determining the first context [in]
parametersExtension parameters [out]

Definition at line 422 of file blast_parameters.c.

References ASSERT, Blast_ProgramIsRpsBlast(), calloc(), eBlastTypeBlastn, eBlastTypeMapping, BlastExtensionOptions::gap_x_dropoff, BlastExtensionParameters::gap_x_dropoff, BlastExtensionOptions::gap_x_dropoff_final, BlastExtensionParameters::gap_x_dropoff_final, BlastScoreBlk::kbp, BlastScoreBlk::kbp_gap, BlastScoreBlk::matrix_only_scoring, MAX, NCBIMATH_LN2, NULL, BlastExtensionParameters::options, s_BlastFindSmallestLambda(), s_BlastFindValidKarlinBlk(), and BlastScoreBlk::scale_factor.

Referenced by BLAST_GapAlignSetUp(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), LinkHspTestFixture::setupCutoffScores(), and CBlastExtendTestFixture::setupStructures().

◆ BlastHitSavingParametersFree()

BlastHitSavingParameters* BlastHitSavingParametersFree ( BlastHitSavingParameters parameters)

◆ BlastHitSavingParametersNew()

Int2 BlastHitSavingParametersNew ( EBlastProgramType  program_number,
const BlastHitSavingOptions options,
const BlastScoreBlk sbp,
const BlastQueryInfo query_info,
Int4  avg_subject_length,
Int4  compositionBasedStats,
BlastHitSavingParameters **  parameters 
)

Allocate memory and initialize the BlastHitSavingParameters structure.

Calculates the (raw) score cutoff given an expect value and puts it in the "cutoff_score" field of the returned BlastHitSavingParameters*

Parameters
program_numberNumber of the BLAST program [in]
optionsThe given hit saving options [in]
sbpScoring block, needed for calculating score cutoff from e-value [in]
query_infoQuery information, needed for calculating score cutoff from e-value [in]
avg_subject_lengthaverage length of subject sequence [in]
compositionBasedStatsfollows -t option in blastp [in]
parametersResulting parameters [out]

Definition at line 734 of file blast_parameters.c.

References ASSERT, Blast_QueryIsTranslated(), Blast_SubjectIsTranslated(), BlastHitSavingParametersUpdate(), BlastLinkHSPParametersFree(), BlastLinkHSPParametersNew(), calloc(), BlastHitSavingParameters::cutoffs, DEFAULT_LONGEST_INTRON, BlastHitSavingOptions::do_sum_stats, BlastHitSavingParameters::do_sum_stats, eBlastTypeTblastx, FALSE, BlastScoreBlk::kbp_gap, BlastQueryInfo::last_context, BlastHitSavingParameters::link_hsp_params, BlastHitSavingOptions::longest_intron, BlastLinkHSPParameters::longest_intron, BlastHitSavingParameters::low_score, BlastHitSavingOptions::low_score_perc, BlastHitSavingParameters::mask_level, MAX, NULL, BlastQueryInfo::num_queries, BlastHitSavingParameters::options, and TRUE.

Referenced by BLAST_GapAlignSetUp(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), LinkHspTestFixture::setupCutoffScores(), CBlastExtendTestFixture::setupStructures(), and TestFixture::SkipMaskedRangesCore().

◆ BlastHitSavingParametersUpdate()

Int2 BlastHitSavingParametersUpdate ( EBlastProgramType  program_number,
const BlastScoreBlk sbp,
const BlastQueryInfo query_info,
Int4  avg_subject_length,
Int4  compositionBasedStats,
BlastHitSavingParameters parameters 
)

Updates cutoff scores in hit saving parameters.

Parameters
program_numberNumber of the BLAST program [in]
sbpScoring block, needed for calculating score cutoff from e-value [in]
query_infoQuery information, needed for calculating score cutoff from e-value [in]
avg_subject_lengthaverage length of subject sequence, used in sum_stats mode [in]
compositionBasedStatsfollows -t option in blastp [in]
parametersPreallocated parameters [in] [out]

Definition at line 831 of file blast_parameters.c.

References ASSERT, BLAST_Cutoffs(), Blast_ProgramIsPhiBlast(), BLAST_SpougeEtoS(), context, BlastQueryInfo::contexts, BlastHitSavingOptions::cutoff_score, BlastGappedCutoffs::cutoff_score, BlastGappedCutoffs::cutoff_score_max, BlastHitSavingParameters::cutoff_score_min, BlastHitSavingParameters::cutoffs, eBlastTypeBlastn, eBlastTypeBlastp, eBlastTypeMapping, eBlastTypeRpsTblastn, BlastContextInfo::eff_searchsp, BlastHitSavingOptions::expect_value, FALSE, Blast_GumbelBlk::filled, BlastQueryInfo::first_context, for(), BlastLinkHSPParameters::gap_decay_rate, BlastScoreBlk::gbp, INT4_MAX, BlastContextInfo::is_valid, BlastScoreBlk::kbp, BlastScoreBlk::kbp_gap, BlastQueryInfo::last_context, BlastHitSavingParameters::link_hsp_params, BlastHitSavingOptions::mask_level, BlastHitSavingParameters::mask_level, BlastScoreBlk::matrix_only_scoring, MIN, NUM_FRAMES, BlastHitSavingParameters::options, BlastHitSavingParameters::prelim_evalue, BlastContextInfo::query_length, BlastContextInfo::query_offset, BlastHitSavingParameters::restricted_align, RESTRICTED_ALIGNMENT_WORST_EVALUE, s_BlastKarlinBlkIsValid(), s_PhiBlastCutoffScore(), BlastScoreBlk::scale_factor, and TRUE.

Referenced by BLAST_OneSubjectUpdateParameters(), BlastHitSavingParametersNew(), and BOOST_AUTO_TEST_CASE().

◆ BlastInitialWordParametersFree()

BlastInitialWordParameters* BlastInitialWordParametersFree ( BlastInitialWordParameters parameters)

◆ BlastInitialWordParametersNew()

Int2 BlastInitialWordParametersNew ( EBlastProgramType  program_number,
const BlastInitialWordOptions word_options,
const BlastHitSavingParameters hit_params,
const LookupTableWrap lookup_wrap,
const BlastScoreBlk sbp,
BlastQueryInfo query_info,
Uint4  subject_length,
BlastInitialWordParameters **  parameters 
)

Allocate memory for BlastInitialWordParameters and set x_dropoff.

Calling BlastInitialWordParametersNew calculates the raw x_dropoff from the bit x_dropoff and puts it into the x_dropoff field of BlastInitialWordParameters*. The container type is also set. For blastn queries over a certain length eDiagHash is set, otherwise it's eDiagArray. The extension method is also set via a call to s_GetBestExtensionMethod

Parameters
program_numberType of BLAST program [in]
word_optionsThe initial word options [in]
hit_paramsThe hit saving options (needed to calculate cutoff score for ungapped extensions) [in]
lookup_wrapcontains lookup table so the proper extension method can be set [in]
sbpStatistical (Karlin-Altschul) information [in]
query_infoQuery information [in]
subject_lengthAverage subject sequence length [in]
parametersResulting parameters [out]

Definition at line 159 of file blast_parameters.c.

References ASSERT, Blast_ProgramIsNucleotide(), Blast_ProgramIsPhiBlast(), Blast_QueryIsPattern(), BlastInitialWordParametersUpdate(), calloc(), BlastInitialWordParameters::container_type, context, BlastQueryInfo::contexts, BlastInitialWordParameters::cutoffs, eBlastTypeBlastn, eBlastTypeMapping, eDiagArray, eDiagHash, FALSE, BlastQueryInfo::first_context, i, BlastContextInfo::is_valid, BlastScoreBlk::kbp, Blast_KarlinBlk::Lambda, BlastQueryInfo::last_context, BlastInitialWordParameters::matrix_only_scoring, BlastScoreBlk::matrix_only_scoring, NCBIMATH_LN2, BlastInitialWordParameters::nucl_score_table, BlastInitialWordParameters::options, BlastScoreBlk::penalty, BlastContextInfo::query_length, BlastContextInfo::query_offset, BlastScoreBlk::reward, s_BlastFindValidKarlinBlk(), s_BlastKarlinBlkIsValid(), BlastScoreBlk::scale_factor, table, TRUE, BlastInitialWordParameters::ungapped_extension, BlastInitialWordOptions::x_dropoff, and BlastUngappedCutoffs::x_dropoff_init.

Referenced by BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), s_GetInitialWordParameters(), LinkHspTestFixture::setupCutoffScores(), CBlastExtendTestFixture::setupStructures(), and TestFixture::SkipMaskedRangesCore().

◆ BlastInitialWordParametersUpdate()

Int2 BlastInitialWordParametersUpdate ( EBlastProgramType  program_number,
const BlastHitSavingParameters hit_params,
const BlastScoreBlk sbp,
BlastQueryInfo query_info,
Uint4  subject_length,
BlastInitialWordParameters parameters 
)

Update cutoff scores in BlastInitialWordParameters structure.

Parameters
program_numberType of BLAST program [in]
hit_paramsThe hit saving parameters, needed to calculate cutoff score for ungapped extensions. The HSP linking cutoff might have to be adjusted here. [in] [out]
sbpStatistical (Karlin-Altschul) information [in]
query_infoQuery information [in]
subject_lengthAverage subject sequence length [in]
parametersPreallocated parameters [in] [out]

Definition at line 280 of file blast_parameters.c.

References ASSERT, BLAST_Cutoffs(), context, BlastQueryInfo::contexts, BlastUngappedCutoffs::cutoff_score, BlastGappedCutoffs::cutoff_score_max, BlastInitialWordParameters::cutoff_score_min, BlastInitialWordParameters::cutoffs, BlastHitSavingParameters::cutoffs, eBlastTypeBlastn, eBlastTypeMapping, FALSE, BlastQueryInfo::first_context, BlastLinkHSPParameters::gap_decay_rate, BlastInitialWordOptions::gap_trigger, INT4_MAX, BlastContextInfo::is_valid, BlastScoreBlk::kbp_gap, BlastScoreBlk::kbp_std, Blast_KarlinBlk::Lambda, BlastHitSavingParameters::link_hsp_params, Blast_KarlinBlk::logK, BlastScoreBlk::matrix_only_scoring, MIN, NCBIMATH_LN2, BlastInitialWordParameters::options, BlastContextInfo::query_length, BlastUngappedCutoffs::reduced_nucl_cutoff_score, s_BlastKarlinBlkIsValid(), s_GetCutoffEvalue(), BlastScoreBlk::scale_factor, TRUE, BlastUngappedCutoffs::x_dropoff, BlastUngappedCutoffs::x_dropoff_init, and BlastInitialWordParameters::x_dropoff_max.

Referenced by BLAST_OneSubjectUpdateParameters(), and BlastInitialWordParametersNew().

◆ BlastLinkHSPParametersFree()

BlastLinkHSPParameters* BlastLinkHSPParametersFree ( BlastLinkHSPParameters parameters)

Deallocate memory for BlastLinkHSPParameters;.

Parameters
parametersStructure to free [in]

Definition at line 592 of file blast_parameters.c.

References NULL, and sfree.

Referenced by BlastHitSavingParametersNew().

◆ BlastLinkHSPParametersNew()

Int2 BlastLinkHSPParametersNew ( EBlastProgramType  program_number,
Boolean  gapped_calculation,
BlastLinkHSPParameters **  link_hsp_params 
)

Initialize the linking HSPs parameters with default values.

Parameters
program_numberType of BLAST program [in]
gapped_calculationIs this a gapped search? [in]
link_hsp_paramsInitialized parameters structure [out]

Definition at line 598 of file blast_parameters.c.

References BLAST_GAP_DECAY_RATE, BLAST_GAP_DECAY_RATE_GAPPED, BLAST_GAP_PROB, BLAST_GAP_PROB_GAPPED, BLAST_GAP_SIZE, BLAST_OVERLAP_SIZE, calloc(), eBlastTypeBlastn, BlastLinkHSPParameters::gap_decay_rate, BlastLinkHSPParameters::gap_prob, BlastLinkHSPParameters::gap_size, and BlastLinkHSPParameters::overlap_size.

Referenced by BlastHitSavingParametersNew(), and LinkHspTestFixture::setupHitParams().

◆ BlastLinkHSPParametersUpdate()

Int2 BlastLinkHSPParametersUpdate ( const BlastInitialWordParameters word_params,
const BlastHitSavingParameters hit_params,
Boolean  gapped_calculation 
)

Update BlastLinkHSPParameters, using calculated values of other parameters.

Parameters
word_paramsInitial word parameters [in]
hit_paramsHit saving parameters, including the link HSP parameters [in] [out]
gapped_calculationIs this a gapped search? [in]

Definition at line 625 of file blast_parameters.c.

References BlastInitialWordParameters::cutoff_score_min, BlastLinkHSPParameters::cutoff_small_gap, and BlastHitSavingParameters::link_hsp_params.

Referenced by BLAST_OneSubjectUpdateParameters(), BLAST_PreliminarySearchEngine(), and LinkHspTestFixture::setupCutoffScores().

◆ BlastScoringParametersFree()

BlastScoringParameters* BlastScoringParametersFree ( BlastScoringParameters parameters)

◆ BlastScoringParametersNew()

Int2 BlastScoringParametersNew ( const BlastScoringOptions options,
BlastScoreBlk sbp,
BlastScoringParameters **  parameters 
)

◆ CalculateLinkHSPCutoffs()

void CalculateLinkHSPCutoffs ( EBlastProgramType  program,
BlastQueryInfo query_info,
const BlastScoreBlk sbp,
BlastLinkHSPParameters link_hsp_params,
const BlastInitialWordParameters word_params,
Int8  db_length,
Int4  subject_length 
)

Calculates cutoff scores and returns them.

Equations provided by Stephen Altschul.

Parameters
programBLAST program type [in]
query_infoQuery(ies) information [in]
sbpScoring statistical parameters [in]
link_hsp_paramsParameters for linking HSPs [in] [out]
word_paramsInitialWordParameters (cutoff_score used for small gaps) [in]
db_lengthTotal length of database (non-database search if 0) [in]
subject_lengthLength of the subject sequence. [in]

Definition at line 998 of file blast_parameters.c.

References BLAST_GAP_PROB, BLAST_Nint(), Blast_SubjectIsTranslated(), CODON_LENGTH, BlastQueryInfo::contexts, BlastLinkHSPParameters::cutoff_big_gap, BlastInitialWordParameters::cutoff_score_min, BlastLinkHSPParameters::cutoff_small_gap, eBlastTypeRpsTblastn, BlastLinkHSPParameters::gap_decay_rate, BlastLinkHSPParameters::gap_prob, BlastLinkHSPParameters::gap_size, Blast_KarlinBlk::H, Blast_KarlinBlk::K, BlastScoreBlk::kbp, kEpsilon, Blast_KarlinBlk::Lambda, BlastQueryInfo::last_context, log, MAX, NULL, BlastLinkHSPParameters::overlap_size, BlastContextInfo::query_length, BlastContextInfo::query_offset, s_BlastFindSmallestLambda(), BlastScoreBlk::scale_factor, and window_size.

Referenced by BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), and LinkHspTestFixture::setupCutoffScores().

◆ printAllParameters()

void printAllParameters ( BlastHitSavingParameters hit_params,
BlastExtensionParameters ext_params,
BlastInitialWordParameters word_params,
BlastQueryInfo query_info 
)

◆ printBlastExtensionParameters()

void printBlastExtensionParameters ( BlastExtensionParameters ext_params)

◆ printBlastHitSavingParameters()

void printBlastHitSavingParameters ( BlastHitSavingParameters hit_params,
BlastQueryInfo query_info 
)

◆ printBlastInitialWordParamters()

void printBlastInitialWordParamters ( BlastInitialWordParameters word_params,
BlastQueryInfo query_info 
)

◆ printBlastScoringParameters()

void printBlastScoringParameters ( BlastScoringParameters params)
Modified on Fri Sep 20 14:57:03 2024 by modify_doxy.py rev. 669887