Class
BlastScoringSchemeWrapper around a SeqAn scoring scheme
Defined in | <seqan/blast.h> |
---|---|
Signature |
struct BlastScoringScheme<TScoringScheme> { ... };
|
Template Parameters
TScoringScheme |
A SeqAn Score type |
---|
Interface Function Overview
-
double computeBitScore(rawScore, blastScoringScheme);
Compute the bit-score for a given raw score. -
double computeEValue(rawScore, queryLength, dbLength, blastScoringScheme);
Compute the E-Value for a given raw score and sequence lengths. -
double getAlpha(blastScoringScheme);
Get the α value of the Karlin-Altschul parameters. -
double getBeta(blastScoringScheme);
Get the β value of the Karlin-Altschul parameters. -
double getH(blastScoringScheme);
Get the H value of the Karlin-Altschul parameters. -
double getKappa(blastScoringScheme);
Get the Κ value of the Karlin-Altschul parameters. -
double getLambda(blastScoringScheme);
Get the λ value of the Karlin-Altschul parameters. -
bool isValid(blastScoringScheme);
check whether valid KarlinAltschulValues are selected -
TValue scoreGapExtend(blastScoringScheme);
The Gap Extend score. -
TValue scoreGapOpen(blastScoringScheme);
The Gap Open score in SeqAn convention. -
TValue scoreGapOpenBlast(blastScoringScheme);
The Gap Open score in Blast convention. -
int scoreMatch(blastScoringScheme);
The Match score (only for SimpleScore specialization). -
int scoreMismatch(blastScoringScheme);
The Mismatch score (only for SimpleScore specialization). -
TScoringScheme const & seqanScheme(blastScoringScheme);
Retrieve a Score object for use with e.g. localAlignment. -
bool setScoreGapExtend(blastScoringScheme, value);
Set gap extend score. -
bool setScoreGapOpen(blastScoringScheme, value);
Set gap open score in SeqAn convention. -
bool setScoreGapOpenBlast(blastScoringScheme, value);
Set gap open score in BLAST convention. -
bool setScoreMatch(blastScoringScheme, value);
Set match score. -
bool setScoreMismatch(blastScoringScheme, value);
Set mismatch score.
Detailed Description
This class wraps around a SeqAn scoring scheme and add functions for the retrievel of pre-computed Karlin-Altschul-Values (required for e-value statistics) and it modifies the gap-scoring slightly. If you use high-level IO (BlastReport, BlastTabular) you need not worry about the specifics, however you should always make sure that the scoring scheme isValid after you modify it (or check the return values of the set* functions).
To retrieve a score-object compatible with regular SeqAn-functions, call seqanScheme.
Gap cost computation
Gap-costs are computed differently in SeqAn and in BLAST. Blast (and many other tools) compute scores of a stretch of gaps as s = gO + n * gE where gO is the gapOpen score, gE is the gap extend score and n ist the total number of gap characters.
SeqAn, however, normally computes them as as s = gO + (n-1) * gE.
Effectively this results only in a different gap open score. To make dealing with this easier, there are convenience functions for setting and getting the gap open score in blast convention: scoreGapOpenBlast and setScoreGapOpenBlast.
Karlin-Altschul values
E-Value statistics require certain pre-computed constants. The BlastScoringScheme picks these automatically whenever you modify it. Unfortunately there aren't parameters for all combinations of scoring schemes and gap costs, so you have to check isValid after modifying it or verify the return value of the set* functions which is bool here (instead of void).
More details on the scoring parameters is in these slides: https://www.cs.umd.edu/class/fall2011/cmsc858s/Local_Alignment_Statistics.pdf.
The constants used in SeqAn were imported from the NCBI blast source code (blast-2.2.26)
Interface Functions Detail
double computeBitScore(rawScore, blastScoringScheme);
Parameters
rawScore
|
The raw score of the alignment. |
---|---|
blastScoringScheme
|
The BlastScoringScheme. |
Returns
double |
The bit-score computed. |
---|
Data Races
double computeEValue(rawScore, queryLength, dbLength, blastScoringScheme);
Parameters
rawScore
|
The raw score of the alignment. |
---|---|
queryLength
|
The length of the query sequence. |
dbLength
|
The length of the database in case of many subject sequences, otherwise the length of the subject sequence. |
blastScoringScheme
|
The BlastScoringScheme. |
Returns
double |
The e-value computed. |
---|
Data Races
double getAlpha(blastScoringScheme);
Data Races
double getBeta(blastScoringScheme);
Data Races
double getH(blastScoringScheme);
Data Races
double getKappa(blastScoringScheme);
Data Races
double getLambda(blastScoringScheme);
Data Races
bool isValid(blastScoringScheme);
Data Races
TValue scoreGapExtend(blastScoringScheme);
Data Races
TValue scoreGapOpen(blastScoringScheme);
Data Races
TValue scoreGapOpenBlast(blastScoringScheme);
Data Races
int scoreMatch(blastScoringScheme);
Data Races
int scoreMismatch(blastScoringScheme);
Data Races
TScoringScheme const & seqanScheme(blastScoringScheme);
Returns
TScoringScheme_const_& |
the internal scoring object for use with other SeqAn functions. |
---|
Remarks
The reference returned is always const, because you should not modify the internal score object directly. Use BlastScoringScheme's interface instead.
Data Races
bool setScoreGapExtend(blastScoringScheme, value);
Parameters
blastScoringScheme
|
The BlastScoringScheme to modify. |
---|---|
value
|
The new value. |
Returns
isValid(blastScoringScheme) |
whether Karlin-Altschul values for the new scheme exist. |
---|
Data Races
bool setScoreGapOpen(blastScoringScheme, value);
Parameters
blastScoringScheme
|
The BlastScoringScheme to modify. |
---|---|
value
|
The new value. |
Returns
isValid(blastScoringScheme) |
whether Karlin-Altschul values for the new scheme exist. |
---|
Data Races
bool setScoreGapOpenBlast(blastScoringScheme, value);
Parameters
blastScoringScheme
|
The BlastScoringScheme to modify. |
---|---|
value
|
The new value. |
Returns
isValid(blastScoringScheme) |
whether Karlin-Altschul values for the new scheme exist. |
---|
Data Races
bool setScoreMatch(blastScoringScheme, value);
Parameters
blastScoringScheme
|
The BlastScoringScheme to modify. |
---|---|
value
|
The new value. |
Returns
isValid(blastScoringScheme) |
whether Karlin-Altschul values for the new scheme exist. |
---|
Data Races
bool setScoreMismatch(blastScoringScheme, value);
Parameters
blastScoringScheme
|
The BlastScoringScheme to modify. |
---|---|
value
|
The new value. |
Returns
isValid(blastScoringScheme) |
whether Karlin-Altschul values for the new scheme exist. |
---|