NCBI C++ ToolKit
|
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>
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... | |
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.
#define BLAST_GAP_DECAY_RATE 0.5 |
Gap decay rate for ungapped search.
Definition at line 68 of file blast_parameters.h.
#define BLAST_GAP_DECAY_RATE_GAPPED 0.1 |
Gap decay rate for gapped search.
Definition at line 69 of file blast_parameters.h.
#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.
#define BLAST_GAP_PROB_GAPPED 1.0 |
Gap probability for gapped search.
Definition at line 67 of file blast_parameters.h.
#define BLAST_GAP_SIZE 40 |
Default gap size.
Definition at line 70 of file blast_parameters.h.
#define BLAST_OVERLAP_SIZE 9 |
Default overlap size.
Definition at line 71 of file blast_parameters.h.
#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.
#define CUTOFF_E_BLASTP 1e-300 |
default evalue (ungapped blastp)
Definition at line 77 of file blast_parameters.h.
#define CUTOFF_E_BLASTX 1.0 |
default evalue (ungapped blastx)
Definition at line 78 of file blast_parameters.h.
#define CUTOFF_E_TBLASTN 1.0 |
default evalue (ungapped tblastn)
Definition at line 79 of file blast_parameters.h.
#define CUTOFF_E_TBLASTX 1e-300 |
default evalue (tblastx)
Definition at line 80 of file blast_parameters.h.
#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 struct BlastEffectiveLengthsParameters 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.
typedef struct BlastExtensionParameters 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
typedef struct BlastGappedCutoffs BlastGappedCutoffs |
All the gapped cutoff values that can change from context to context.
typedef struct BlastHitSavingParameters BlastHitSavingParameters |
Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.
typedef struct BlastInitialWordParameters BlastInitialWordParameters |
Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it.
typedef struct BlastLinkHSPParameters BlastLinkHSPParameters |
Parameter block for linking HSPs with sum statistics.
typedef struct BlastScoringParameters BlastScoringParameters |
Scoring parameters block Contains scoring-related information that is actually used for the blast search.
typedef struct BlastUngappedCutoffs BlastUngappedCutoffs |
All the ungapped cutoff values that can change from context to context.
typedef enum ESeedContainerType ESeedContainerType |
specifies the data structures used for bookkeeping during computation of ungapped extensions
enum 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.
BlastEffectiveLengthsParameters* BlastEffectiveLengthsParametersFree | ( | BlastEffectiveLengthsParameters * | parameters | ) |
Deallocate memory for BlastEffectiveLengthsParameters*.
parameters | Structure to free [in] |
Definition at line 570 of file blast_parameters.c.
Referenced by BLAST_GapAlignSetUp(), Blast_RunPreliminarySearchWithInterrupt(), BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::fillEffectiveLengths(), CBlastExtendTestFixture::fillEffectiveLengths(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), s_BlastRunFullSearchCleanUp(), SThreadLocalDataFree(), and CTracebackTestFixture::~CTracebackTestFixture().
Int2 BlastEffectiveLengthsParametersNew | ( | const BlastEffectiveLengthsOptions * | options, |
Int8 | db_length, | ||
Int4 | num_seqs, | ||
BlastEffectiveLengthsParameters ** | parameters | ||
) |
Allocate memory for BlastEffectiveLengthsParameters.
options | The user provided options [in] |
db_length | The database length [in] |
num_seqs | Number of sequences in database [in] |
parameters | The 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().
BlastExtensionParameters* BlastExtensionParametersFree | ( | BlastExtensionParameters * | parameters | ) |
Deallocate memory for BlastExtensionParameters.
parameters | Structure to free [in] |
Definition at line 493 of file blast_parameters.c.
Referenced by BLAST_GapAlignSetUp(), Blast_RunPreliminarySearchWithInterrupt(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), s_BlastRunFullSearchCleanUp(), LinkHspTestFixture::setupCutoffScores(), SThreadLocalDataFree(), and CTracebackTestFixture::~CTracebackTestFixture().
Int2 BlastExtensionParametersNew | ( | EBlastProgramType | blast_program, |
const BlastExtensionOptions * | options, | ||
BlastScoreBlk * | sbp, | ||
BlastQueryInfo * | query_info, | ||
BlastExtensionParameters ** | parameters | ||
) |
Calculate the raw values for the X-dropoff parameters.
blast_program | Program number [in] |
options | Already allocated extension options [in] |
sbp | Structure containing statistical information [in] |
query_info | Query information, needed only for determining the first context [in] |
parameters | Extension 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().
BlastHitSavingParameters* BlastHitSavingParametersFree | ( | BlastHitSavingParameters * | parameters | ) |
Deallocate memory for BlastHitSavingOptions*.
parameters | Structure to free [in] |
Definition at line 718 of file blast_parameters.c.
References BlastHitSavingParameters::cutoffs, BlastHitSavingParameters::link_hsp_params, BlastHitSavingParameters::low_score, NULL, and sfree.
Referenced by Blast_RunPreliminarySearchWithInterrupt(), BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::freeStructures(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), s_BlastRunFullSearchCleanUp(), TestFixture::SkipMaskedRangesCore(), SThreadLocalDataFree(), CBlastExtendTestFixture::~CBlastExtendTestFixture(), and CTracebackTestFixture::~CTracebackTestFixture().
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*
program_number | Number of the BLAST program [in] |
options | The given hit saving options [in] |
sbp | Scoring block, needed for calculating score cutoff from e-value [in] |
query_info | Query information, needed for calculating score cutoff from e-value [in] |
avg_subject_length | average length of subject sequence [in] |
compositionBasedStats | follows -t option in blastp [in] |
parameters | Resulting 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().
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.
program_number | Number of the BLAST program [in] |
sbp | Scoring block, needed for calculating score cutoff from e-value [in] |
query_info | Query information, needed for calculating score cutoff from e-value [in] |
avg_subject_length | average length of subject sequence, used in sum_stats mode [in] |
compositionBasedStats | follows -t option in blastp [in] |
parameters | Preallocated 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().
BlastInitialWordParameters* BlastInitialWordParametersFree | ( | BlastInitialWordParameters * | parameters | ) |
Deallocate memory for BlastInitialWordParameters.
parameters | Structure to free [in] |
Definition at line 119 of file blast_parameters.c.
References BlastInitialWordParameters::cutoffs, NULL, and sfree.
Referenced by BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), LinkHspTestFixture::setupCutoffScores(), TestFixture::SkipMaskedRangesCore(), CBlastExtendTestFixture::~CBlastExtendTestFixture(), and NuclWordFinderTextFixture::~NuclWordFinderTextFixture().
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
program_number | Type of BLAST program [in] |
word_options | The initial word options [in] |
hit_params | The hit saving options (needed to calculate cutoff score for ungapped extensions) [in] |
lookup_wrap | contains lookup table so the proper extension method can be set [in] |
sbp | Statistical (Karlin-Altschul) information [in] |
query_info | Query information [in] |
subject_length | Average subject sequence length [in] |
parameters | Resulting 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().
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.
program_number | Type of BLAST program [in] |
hit_params | The hit saving parameters, needed to calculate cutoff score for ungapped extensions. The HSP linking cutoff might have to be adjusted here. [in] [out] |
sbp | Statistical (Karlin-Altschul) information [in] |
query_info | Query information [in] |
subject_length | Average subject sequence length [in] |
parameters | Preallocated 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().
BlastLinkHSPParameters* BlastLinkHSPParametersFree | ( | BlastLinkHSPParameters * | parameters | ) |
Deallocate memory for BlastLinkHSPParameters;.
parameters | Structure to free [in] |
Definition at line 592 of file blast_parameters.c.
Referenced by BlastHitSavingParametersNew().
Int2 BlastLinkHSPParametersNew | ( | EBlastProgramType | program_number, |
Boolean | gapped_calculation, | ||
BlastLinkHSPParameters ** | link_hsp_params | ||
) |
Initialize the linking HSPs parameters with default values.
program_number | Type of BLAST program [in] |
gapped_calculation | Is this a gapped search? [in] |
link_hsp_params | Initialized 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().
Int2 BlastLinkHSPParametersUpdate | ( | const BlastInitialWordParameters * | word_params, |
const BlastHitSavingParameters * | hit_params, | ||
Boolean | gapped_calculation | ||
) |
Update BlastLinkHSPParameters, using calculated values of other parameters.
word_params | Initial word parameters [in] |
hit_params | Hit saving parameters, including the link HSP parameters [in] [out] |
gapped_calculation | Is 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().
BlastScoringParameters* BlastScoringParametersFree | ( | BlastScoringParameters * | parameters | ) |
Deallocate memory for BlastScoringParameters.
parameters | Structure to free [in] |
Definition at line 500 of file blast_parameters.c.
Referenced by BLAST_GapAlignSetUp(), Blast_RunPreliminarySearchWithInterrupt(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), s_BlastRunFullSearchCleanUp(), SThreadLocalDataFree(), and CTracebackTestFixture::~CTracebackTestFixture().
Int2 BlastScoringParametersNew | ( | const BlastScoringOptions * | options, |
BlastScoreBlk * | sbp, | ||
BlastScoringParameters ** | parameters | ||
) |
Calculate scaled cutoff scores and gap penalties.
options | Already allocated scoring options [in] |
sbp | Structure containing scale factor [in] |
parameters | Scoring parameters [out] |
Definition at line 542 of file blast_parameters.c.
References calloc(), BlastScoringOptions::gap_extend, BlastScoringParameters::gap_extend, BlastScoringOptions::gap_open, BlastScoringParameters::gap_open, NULL, BlastScoringParameters::options, BlastScoringOptions::penalty, BlastScoringParameters::penalty, BlastScoringOptions::reward, BlastScoringParameters::reward, BlastScoringParameters::scale_factor, BlastScoreBlk::scale_factor, BlastScoringOptions::shift_pen, and BlastScoringParameters::shift_pen.
Referenced by BLAST_GapAlignSetUp(), BOOST_AUTO_TEST_CASE(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), and CBlastExtendTestFixture::setupStructures().
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.
program | BLAST program type [in] |
query_info | Query(ies) information [in] |
sbp | Scoring statistical parameters [in] |
link_hsp_params | Parameters for linking HSPs [in] [out] |
word_params | InitialWordParameters (cutoff_score used for small gaps) [in] |
db_length | Total length of database (non-database search if 0) [in] |
subject_length | Length 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().
void printAllParameters | ( | BlastHitSavingParameters * | hit_params, |
BlastExtensionParameters * | ext_params, | ||
BlastInitialWordParameters * | word_params, | ||
BlastQueryInfo * | query_info | ||
) |
Definition at line 1130 of file blast_parameters.c.
References printBlastExtensionParameters(), printBlastHitSavingParameters(), and printBlastInitialWordParamters().
void printBlastExtensionParameters | ( | BlastExtensionParameters * | ext_params | ) |
Definition at line 1105 of file blast_parameters.c.
References BlastExtensionParameters::gap_x_dropoff, and BlastExtensionParameters::gap_x_dropoff_final.
Referenced by printAllParameters().
void printBlastHitSavingParameters | ( | BlastHitSavingParameters * | hit_params, |
BlastQueryInfo * | query_info | ||
) |
Definition at line 1113 of file blast_parameters.c.
References context, BlastQueryInfo::contexts, BlastGappedCutoffs::cutoff_score, BlastGappedCutoffs::cutoff_score_max, BlastHitSavingParameters::cutoff_score_min, BlastHitSavingParameters::cutoffs, BlastQueryInfo::first_context, and BlastContextInfo::is_valid.
Referenced by printAllParameters().
void printBlastInitialWordParamters | ( | BlastInitialWordParameters * | word_params, |
BlastQueryInfo * | query_info | ||
) |
Definition at line 1085 of file blast_parameters.c.
References context, BlastQueryInfo::contexts, BlastUngappedCutoffs::cutoff_score, BlastInitialWordParameters::cutoff_score_min, BlastInitialWordParameters::cutoffs, BlastQueryInfo::first_context, BlastContextInfo::is_valid, BlastUngappedCutoffs::reduced_nucl_cutoff_score, BlastUngappedCutoffs::x_dropoff, BlastUngappedCutoffs::x_dropoff_init, and BlastInitialWordParameters::x_dropoff_max.
Referenced by printAllParameters().
void printBlastScoringParameters | ( | BlastScoringParameters * | params | ) |
Definition at line 507 of file blast_parameters.c.
References BlastScoringOptions::complexity_adjusted_scoring, BlastScoringOptions::gap_extend, BlastScoringParameters::gap_extend, BlastScoringOptions::gap_open, BlastScoringParameters::gap_open, BlastScoringOptions::gapped_calculation, BlastScoringOptions::is_ooframe, BlastScoringOptions::matrix, BlastScoringOptions::matrix_path, NULL, BlastScoringParameters::options, BlastScoringOptions::penalty, BlastScoringParameters::penalty, BlastScoringOptions::program_number, BlastScoringOptions::reward, BlastScoringParameters::reward, BlastScoringParameters::scale_factor, BlastScoringOptions::shift_pen, and BlastScoringParameters::shift_pen.