48 #ifndef ALGO_BLAST_CORE__BLASTPARAMETERS__H
49 #define ALGO_BLAST_CORE__BLASTPARAMETERS__H
66 #define BLAST_GAP_PROB 0.5
67 #define BLAST_GAP_PROB_GAPPED 1.0
68 #define BLAST_GAP_DECAY_RATE 0.5
69 #define BLAST_GAP_DECAY_RATE_GAPPED 0.1
70 #define BLAST_GAP_SIZE 40
71 #define BLAST_OVERLAP_SIZE 9
76 #define CUTOFF_E_BLASTN 0.05
77 #define CUTOFF_E_BLASTP 1e-300
78 #define CUTOFF_E_BLASTX 1.0
79 #define CUTOFF_E_TBLASTN 1.0
80 #define CUTOFF_E_TBLASTX 1e-300
193 #define RESTRICTED_ALIGNMENT_WORST_EVALUE 10.0
265 Uint4 subject_length,
398 Int4 avg_subject_length,
399 Int4 compositionBasedStats,
416 Int4 avg_subject_length,
417 Int4 compositionBasedStats,
436 Int8 db_length,
Int4 subject_length);
Defines to provide correct exporting from BLAST DLL in Windows.
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Structures for BLAST messages.
The structures and functions in blast_options.
BlastHitSavingParameters * BlastHitSavingParametersFree(BlastHitSavingParameters *parameters)
Deallocate memory for BlastHitSavingOptions*.
struct BlastUngappedCutoffs BlastUngappedCutoffs
All the ungapped cutoff values that can change from context to context.
Int2 BlastLinkHSPParametersNew(EBlastProgramType program_number, Boolean gapped_calculation, BlastLinkHSPParameters **link_hsp_params)
Initialize the linking HSPs parameters with default values.
BlastEffectiveLengthsParameters * BlastEffectiveLengthsParametersFree(BlastEffectiveLengthsParameters *parameters)
Deallocate memory for BlastEffectiveLengthsParameters*.
struct BlastExtensionParameters BlastExtensionParameters
Computed values used as parameters for gapped alignments.
void printBlastScoringParameters(BlastScoringParameters *params)
Int2 BlastExtensionParametersNew(EBlastProgramType blast_program, const BlastExtensionOptions *options, BlastScoreBlk *sbp, BlastQueryInfo *query_info, BlastExtensionParameters **parameters)
Calculate the raw values for the X-dropoff parameters.
ESeedContainerType
specifies the data structures used for bookkeeping during computation of ungapped extensions
@ eMaxContainerType
maximum value for this enumeration
@ eDiagHash
use hash table (blastn only)
@ eDiagArray
use diagonal structures with array of last hits and levels.
BlastInitialWordParameters * BlastInitialWordParametersFree(BlastInitialWordParameters *parameters)
Deallocate memory for BlastInitialWordParameters.
BlastExtensionParameters * BlastExtensionParametersFree(BlastExtensionParameters *parameters)
Deallocate memory for BlastExtensionParameters.
void printBlastHitSavingParameters(BlastHitSavingParameters *hit_params, BlastQueryInfo *query_info)
struct BlastInitialWordParameters BlastInitialWordParameters
Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it.
struct BlastGappedCutoffs BlastGappedCutoffs
All the gapped cutoff values that can change from context to context.
Int2 BlastScoringParametersNew(const BlastScoringOptions *options, BlastScoreBlk *sbp, BlastScoringParameters **parameters)
Calculate scaled cutoff scores and gap penalties.
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.
struct BlastLinkHSPParameters BlastLinkHSPParameters
Parameter block for linking HSPs with sum statistics.
void printAllParameters(BlastHitSavingParameters *hit_params, BlastExtensionParameters *ext_params, BlastInitialWordParameters *word_params, BlastQueryInfo *query_info)
BlastLinkHSPParameters * BlastLinkHSPParametersFree(BlastLinkHSPParameters *parameters)
Deallocate memory for BlastLinkHSPParameters;.
struct BlastScoringParameters BlastScoringParameters
Scoring parameters block Contains scoring-related information that is actually used for the blast sea...
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.
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.
Int2 BlastLinkHSPParametersUpdate(const BlastInitialWordParameters *word_params, const BlastHitSavingParameters *hit_params, Boolean gapped_calculation)
Update BlastLinkHSPParameters, using calculated values of other parameters.
void printBlastInitialWordParamters(BlastInitialWordParameters *word_params, BlastQueryInfo *query_info)
struct BlastHitSavingParameters BlastHitSavingParameters
Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.
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.
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.
struct BlastEffectiveLengthsParameters BlastEffectiveLengthsParameters
Parameters for setting up effective lengths and search spaces.
void printBlastExtensionParameters(BlastExtensionParameters *ext_params)
BlastScoringParameters * BlastScoringParametersFree(BlastScoringParameters *parameters)
Deallocate memory for BlastScoringParameters.
Int2 BlastEffectiveLengthsParametersNew(const BlastEffectiveLengthsOptions *options, Int8 db_length, Int4 num_seqs, BlastEffectiveLengthsParameters **parameters)
Allocate memory for BlastEffectiveLengthsParameters.
Definitions for various programs supported by core BLAST.
EBlastProgramType
Defines the engine's notion of the different applications of the BLAST algorithm.
Definitions and functions associated with the BlastQueryInfo structure.
Definitions and prototypes used by blast_stat.c to calculate BLAST statistics.
int16_t Int2
2-byte (16-bit) signed integer
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
Wrapper for all lookup tables used in BLAST.
Type and macro definitions from C toolkit that are not defined in C++ toolkit.
Uint1 Boolean
bool replacment for C
Options for setting up effective lengths and search spaces.
Parameters for setting up effective lengths and search spaces.
Int8 real_db_length
Total database length to use in search space calculations.
Int4 real_num_seqs
Number of subject sequences to use for search space calculations.
BlastEffectiveLengthsOptions * options
User provided values for these parameters.
Options used for gapped extension These include: a.
Computed values used as parameters for gapped alignments.
BlastExtensionOptions * options
The original (unparsed) options.
Int4 gap_x_dropoff_final
X-dropoff value for the final gapped extension (raw)
Int4 gap_x_dropoff
X-dropoff value for gapped extension (raw)
All the gapped cutoff values that can change from context to context.
Int4 cutoff_score
Raw cutoff score corresponding to the e-value provided by the user if no sum stats,...
Int4 cutoff_score_max
Raw cutoff score corresponding to the e-value provided by user, cutoff_score must be <= this.
Options used when evaluating and saving hits These include: a.
Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.
BlastGappedCutoffs * cutoffs
per-context gapped cutoff information
Int4 mask_level
Only keep the highest scoring HSP when more than one HSP overlaps the same region of the query by mor...
Boolean restricted_align
TRUE if approximate score-only gapped alignment is used.
Int4 cutoff_score_min
smallest cutoff score across all contexts
Boolean do_sum_stats
TRUE if sum stats will be used.
Int4 * low_score
lowest ungapped score that can trigger a gapped alignment if the histlist is already full.
double prelim_evalue
evalue for preliminary search (may be higher for CBS).
BlastLinkHSPParameters * link_hsp_params
Parameters for linking HSPs with sum statistics; linking is not done if NULL.
BlastHitSavingOptions * options
The original (unparsed) options.
Options needed for initial word finding and processing.
Parameter block that contains a pointer to BlastInitialWordOptions and the values derived from it.
BlastUngappedCutoffs * cutoffs
cutoff values (one per context)
Boolean ungapped_extension
Should an ungapped extension be performed?
BlastInitialWordOptions * options
The original (unparsed) options.
Boolean matrix_only_scoring
Use the scoring matrix ( not table ) to score ungapped and gapped alignments -RMH-.
Int4 cutoff_score_min
smallest cutoff score across all contexts
Int4 x_dropoff_max
largest X-drop cutoff across all contexts
ESeedContainerType container_type
How to store offset pairs for initial seeds?
Int4 nucl_score_table[256]
the combined score of all match/mismatch combinations for aligning four bases
Parameter block for linking HSPs with sum statistics.
double gap_decay_rate
Decay rate for linking HSPs and calculating cutoff scores.
double gap_prob
Probability of decay for linking HSPs.
Int4 cutoff_big_gap
Cutoff sum score for linked HSPs with big gaps.
Int4 cutoff_small_gap
Cutoff sum score for linked HSPs with small gaps.
Int4 overlap_size
Maximal overlap allowed in successive linked HSPs.
Int4 longest_intron
Length of a longest intron for uneven gap linking of HSPs.
Int4 gap_size
Small gap size for linking HSPs.
The query related information.
Structure used for scoring calculations.
Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lo...
Scoring parameters block Contains scoring-related information that is actually used for the blast sea...
double scale_factor
multiplier for all cutoff scores
Int4 gap_extend
Penalty for each gap residue (scaled version)
Int2 penalty
Penalty for a mismatch.
Int4 shift_pen
Penalty for shifting a frame in out-of-frame gapping (scaled version)
Int4 gap_open
Extra penalty for starting a gap (scaled version)
BlastScoringOptions * options
User-provided values for these params.
Int2 reward
Reward for a match.
All the ungapped cutoff values that can change from context to context.
Int4 reduced_nucl_cutoff_score
for blastn, a reduced cutoff score for use with approximate ungapped alignments
Int4 x_dropoff_init
Raw X-dropoff value specified by the bit score in BlastInitialWordOptions.
Int4 cutoff_score
Cutoff score for saving ungapped hits.
Int4 x_dropoff
Raw X-dropoff value used in the ungapped extension.
Wrapper structure for different types of BLAST lookup tables.