160
160
Uint1* ambiguous_res; /**< Array of ambiguous res. (e.g, 'X', 'N')*/
161
161
Int2 ambig_size, /**< size of array above. FIXME: not needed here? */
162
162
ambig_occupy; /**< How many occupied? */
163
Boolean round_down; /**< Score must be rounded down to nearest even score if odd. */
209
210
Blast_ScoreBlkKbpUngappedCalc(EBlastProgramType program,
210
211
BlastScoreBlk* sbp, Uint1* query,
211
BlastQueryInfo* query_info);
212
const BlastQueryInfo* query_info);
213
214
/** This function fills in the BlastScoreBlk structure.
253
254
Int4 gap_extend, Int4 decline_align, const char* matrix_name,
254
255
Blast_Message** error_return);
257
/** Retrieves Karlin-Altschul parameters from precomputed tables, given the
258
* substitution and gap scores. Gap cost values greater than any of those
259
* listed in the tables ("greater" meaning that both values are greater than or
260
* equal, and at least one is strictly greater), are treated as infinite, and
261
* parameters values are copied from the ungapped Karlin block.
262
* @param kbp Allocated Karlin block to fill [in] [out]
263
* @param gap_open Gap openening (existence) cost [in]
264
* @param gap_extend Gap extension cost [in]
265
* @param reward Match reward score [in]
266
* @param penalty Mismatch penalty score [in]
267
* @param kbp_ungap Karlin block with ungapped Karlin-Altschul parameters [in]
268
* @param round_down specifies that the score should be rounded down to nearest even
269
* score in some cases [in|out]
270
* @param error_return Pointer to error message. [in] [out]
273
Blast_KarlinBlkNuclGappedCalc(Blast_KarlinBlk* kbp, Int4 gap_open,
274
Int4 gap_extend, Int4 reward, Int4 penalty,
275
Blast_KarlinBlk* kbp_ungap,
277
Blast_Message** error_return);
257
280
/** Calculates the Karlin-Altschul parameters assuming standard residue
258
281
* compositions for the query and subject sequences. It populates the kbp_ideal
399
422
Int4 query_length, Int4 subject_length,
400
423
Int8 searchsp_eff, double weight_divisor );
425
/** Extract the recommended gap existence and extension values.
426
* Only to be used with protein matrices.
427
* @param matrixName name of the matrix [in]
428
* @param gap_existence returns recommended existence cost [in|out]
429
* @param gap_extension returns recommended extension cost [in|out]
430
* @return zero on success
432
Int2 BLAST_GetProteinGapExistenceExtendParams(const char* matrixName,
434
Int4* gap_extension);
436
/** Extract the recommended gap existence and extension values.
437
* Only to be used with blastn searches.
438
* @param reward match score [in]
439
* @param penalty mismatch score [in]
440
* @param gap_existence returns recommended existence cost [in|out]
441
* @param gap_extension returns recommended extension cost [in|out]
442
* @return zero on success
444
Int2 BLAST_GetNucleotideGapExistenceExtendParams(Int4 reward,
447
Int4* gap_extension);
402
449
/** Extract the alpha and beta settings for this matrixName, and these
403
450
* gap open and gap extension costs
404
451
* @param matrixName name of the matrix used [in]
407
454
* @param gapped TRUE if a gapped search [in]
408
455
* @param gap_open existence cost of a gap [in]
409
456
* @param gap_extend extension cost of a gap [in]
457
* @param kbp_ungapped Karlin block with ungapped values of the parameters [in]
411
459
void BLAST_GetAlphaBeta (const char* matrixName, double *alpha,
412
double *beta, Boolean gapped, Int4 gap_open, Int4 gap_extend);
460
double *beta, Boolean gapped, Int4 gap_open,
461
Int4 gap_extend, const Blast_KarlinBlk* kbp_ungapped);
463
/** Extract the alpha and beta settings for these substitution and gap scores.
464
* If substitution or gap costs are not found in the tables, assume an ungapped
465
* search. Then alpha is computed using the formula Alpha = Lambda/H, and beta
466
* is equal to 0 except for some special cases.
467
* @param reward Match reward score [in]
468
* @param penalty Mismatch penalty score [in]
469
* @param gap_open Gap opening (existence) cost [in]
470
* @param gap_extend Gap extension cost [in]
471
* @param kbp Karlin block containing already computed Lambda, K and H
473
* @param gapped_calculation Is this a gapped search? [in]
474
* @param alpha Alpha parameter for this scoring system [out]
475
* @param beta Beta parameter for this scoring system [out]
477
Int2 Blast_GetNuclAlphaBeta(Int4 reward, Int4 penalty, Int4 gap_open,
478
Int4 gap_extend, Blast_KarlinBlk* kbp,
479
Boolean gapped_calculation,
480
double *alpha, double *beta);
415
482
/** Rescale the PSSM, using composition-based statistics, for use
416
483
* with RPS BLAST. This function produces a PSSM for a single RPS DB