NCBI C++ ToolKit
|
#include <util/tables/raw_scoremat.h>
#include <ctype.h>
#include <string.h>
#include "sm_blosum45.c"
#include "sm_blosum50.c"
#include "sm_blosum62.c"
#include "sm_blosum80.c"
#include "sm_blosum90.c"
#include "sm_pam30.c"
#include "sm_pam70.c"
#include "sm_pam250.c"
#include "sm_identity.c"
Go to the source code of this file.
Go to the SVN repository for this file.
Functions | |
int | NCBISM_GetIndex (const SNCBIPackedScoreMatrix *sm, int aa) |
Map a standard residue code into an index suitable for a particular packed score matrix. More... | |
TNCBIScore | NCBISM_GetScore (const SNCBIPackedScoreMatrix *sm, int aa1, int aa2) |
Look up an entry in a packed score matrix. More... | |
void | NCBISM_Unpack (const SNCBIPackedScoreMatrix *psm, SNCBIFullScoreMatrix *fsm) |
Expand a packed score matrix into an unpacked one, which callers can proceed to index directly by standard residue values (NCBIstdaa or case-insensitive NCBIeaa, which are conveniently disjoint) modulo gaps in coverage, for which the unpacked matrix will hold the packed one's default score. More... | |
static int | s_NCBISM_StartsWith (const char *str, const char *pfx) |
const SNCBIPackedScoreMatrix * | NCBISM_GetStandardMatrix (const char *name) |
Variables | |
static const char | kNCBIstdaa [] = "-ABCDEFGHIKLMNPQRSTVWXYZU*OJ" |
int NCBISM_GetIndex | ( | const SNCBIPackedScoreMatrix * | sm, |
int | aa | ||
) |
Map a standard residue code into an index suitable for a particular packed score matrix.
Calling this function is not as fast as working with unpacked matrices, but avoids the overhead of producing them.
sm | Packed score matrix of interest. |
aa | Standard amino acid code; may be either NCBIstdaa or case-insensitive NCBIeaa (which are conveniently disjoint), modulo gaps in coverage. (The standard built-in matrices don't cover O or U.) |
Definition at line 51 of file raw_scoremat.c.
References int, islower(), kNCBIstdaa, SNCBIPackedScoreMatrix::symbols, and toupper().
Referenced by NCBISM_GetScore().
TNCBIScore NCBISM_GetScore | ( | const SNCBIPackedScoreMatrix * | sm, |
int | aa1, | ||
int | aa2 | ||
) |
Look up an entry in a packed score matrix.
Calling this function is not as fast as working with unpacked matrices, but avoids the overhead of producing them.
sm | Packed score matrix of interest. |
aa1,aa2 | Standard amino acid code; may be either NCBIstdaa or case-insensitive NCBIeaa (which are conveniently disjoint), modulo gaps in coverage. (The standard built-in matrices don't cover O or U.) |
Definition at line 67 of file raw_scoremat.c.
References SNCBIPackedScoreMatrix::defscore, NCBISM_GetIndex(), SNCBIPackedScoreMatrix::scores, and SNCBIPackedScoreMatrix::symbols.
Referenced by BlastScoreBlkProteinMatrixLoad(), BOOST_AUTO_TEST_CASE(), and CPssmInputTestData::FindNonIdenticalHighScoringResidue().
const SNCBIPackedScoreMatrix* NCBISM_GetStandardMatrix | ( | const char * | name | ) |
Definition at line 131 of file raw_scoremat.c.
References NCBISM_Blosum45, NCBISM_Blosum50, NCBISM_Blosum62, NCBISM_Blosum80, NCBISM_Blosum90, NCBISM_Identity, NCBISM_Pam250, NCBISM_Pam30, NCBISM_Pam70, NULL, s_NCBISM_StartsWith(), and util::strcmp().
Referenced by BlastScoreBlkProteinMatrixLoad(), CProteinAlignText::CProteinAlignText(), and CAlignFormatUtil::GetAsciiProteinMatrix().
void NCBISM_Unpack | ( | const SNCBIPackedScoreMatrix * | psm, |
SNCBIFullScoreMatrix * | fsm | ||
) |
Expand a packed score matrix into an unpacked one, which callers can proceed to index directly by standard residue values (NCBIstdaa or case-insensitive NCBIeaa, which are conveniently disjoint) modulo gaps in coverage, for which the unpacked matrix will hold the packed one's default score.
(The standard built-in matrices don't cover O or U.)
sm | Packed score matrix to expand. |
fsm | Storage for the resulting full score matrix. |
Definition at line 81 of file raw_scoremat.c.
References SNCBIPackedScoreMatrix::defscore, i, int, kNCBIstdaa, NCBI_FSM_DIM, SNCBIFullScoreMatrix::s, SNCBIPackedScoreMatrix::scores, SNCBIPackedScoreMatrix::symbols, and toupper().
Referenced by CAlnVec::CalculateScore(), CGeneralScoreMatrix::CGeneralScoreMatrix(), CProteinAlignText::CProteinAlignText(), CSubstMatrix::CSubstMatrix(), CAlignFormatUtil::GetAsciiProteinMatrix(), GetBLOSUM62Score(), ScoreMatrix::initialize(), CNWAligner::SetScoreMatrix(), CQualityScoringMethodAA::SetSubstitutionMatrix(), CCmdLineBlastXML2ReportData::x_FillScoreMatrix(), and CCmdLineBlastXMLReportData::x_FillScoreMatrix().
Definition at line 121 of file raw_scoremat.c.
References str(), and tolower().
Referenced by NCBISM_GetStandardMatrix().
|
static |
Definition at line 48 of file raw_scoremat.c.
Referenced by NCBISM_GetIndex(), and NCBISM_Unpack().