NCBI C++ ToolKit
Classes | Defines | Typedefs | Functions | Variables
raw_scoremat.h File Reference
#include <util/tables/tables_export.h>
+ Include dependency graph for raw_scoremat.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SNCBIPackedScoreMatrix
struct  SNCBIFullScoreMatrix

Defines

#define NCBI_FSM_DIM   128
 Recommended approach: unpack and index directly.

Typedefs

typedef signed char TNCBIScore
 data types
typedef struct
SNCBIPackedScoreMatrix 
SNCBIPackedScoreMatrix
typedef struct SNCBIFullScoreMatrix SNCBIFullScoreMatrix

Functions

int NCBISM_GetIndex (const SNCBIPackedScoreMatrix *sm, int aa)
 Map a standard residue code into an index suitable for a particular packed score matrix.
TNCBIScore NCBISM_GetScore (const SNCBIPackedScoreMatrix *sm, int aa1, int aa2)
 Look up an entry in a packed score matrix.
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.
const SNCBIPackedScoreMatrixNCBISM_GetStandardMatrix (const char *name)

Variables

const SNCBIPackedScoreMatrix NCBISM_Blosum45
 The standard matrices.
const SNCBIPackedScoreMatrix NCBISM_Blosum50
const SNCBIPackedScoreMatrix NCBISM_Blosum62
const SNCBIPackedScoreMatrix NCBISM_Blosum80
const SNCBIPackedScoreMatrix NCBISM_Blosum90
const SNCBIPackedScoreMatrix NCBISM_Pam30
const SNCBIPackedScoreMatrix NCBISM_Pam70
const SNCBIPackedScoreMatrix NCBISM_Pam250

Define Documentation

#define NCBI_FSM_DIM   128

Typedef Documentation

typedef signed char TNCBIScore

data types

Definition at line 45 of file raw_scoremat.h.


Function Documentation

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.

Parameters:
smPacked score matrix of interest.
aaStandard 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.)
Returns:
The corresponding index into sm, or -1 if it doesn't cover AA.

Definition at line 50 of file raw_scoremat.c.

References kNCBIstdaa, and SNCBIPackedScoreMatrix::symbols.

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.

Parameters:
smPacked score matrix of interest.
aa1,aa2Standard 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.)
Returns:
The corresponding score (or the matrix's default if it doesn't cover both residues).

Definition at line 66 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)
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.)

Parameters:
smPacked score matrix to expand.
fsmStorage for the resulting full score matrix.

Definition at line 80 of file raw_scoremat.c.

References SNCBIPackedScoreMatrix::defscore, kNCBIstdaa, NCBI_FSM_DIM, SNCBIFullScoreMatrix::s, SNCBIPackedScoreMatrix::scores, and SNCBIPackedScoreMatrix::symbols.

Referenced by CAlnVec::CalculateScore(), CGeneralScoreMatrix::CGeneralScoreMatrix(), CProteinAlignText::CProteinAlignText(), CSubstMatrix::CSubstMatrix(), CScore_TblastnScore::Get(), CAlignFormatUtil::GetAsciiProteinMatrix(), GetBLOSUM62Score(), ScoreMatrix::initialize(), CNWAligner::SetScoreMatrix(), CQualityScoringMethodAA::SetSubstitutionMatrix(), and CCmdLineBlastXMLReportData::x_FillScoreMatrix().


Variable Documentation

Modified on Wed May 23 13:24:46 2012 by modify_doxy.py rev. 337098