NCBI C++ ToolKit
Classes | Macros | 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.

Go to the SVN repository for this file.

Classes

struct  SNCBIPackedScoreMatrix
 
struct  SNCBIFullScoreMatrix
 

Macros

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

Typedefs

typedef int TNCBIScore
 data types More...
 
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. 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...
 
const SNCBIPackedScoreMatrixNCBISM_GetStandardMatrix (const char *name)
 

Variables

const SNCBIPackedScoreMatrix NCBISM_Blosum45
 The standard matrices. More...
 
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
 
const SNCBIPackedScoreMatrix NCBISM_Identity
 

Macro Definition Documentation

◆ NCBI_FSM_DIM

#define NCBI_FSM_DIM   128

Recommended approach: unpack and index directly.

Definition at line 85 of file raw_scoremat.h.

Typedef Documentation

◆ SNCBIFullScoreMatrix

◆ SNCBIPackedScoreMatrix

◆ TNCBIScore

typedef int TNCBIScore

data types

Definition at line 45 of file raw_scoremat.h.

Function Documentation

◆ NCBISM_GetIndex()

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 51 of file raw_scoremat.c.

References int, islower(), kNCBIstdaa, SNCBIPackedScoreMatrix::symbols, and toupper().

Referenced by NCBISM_GetScore().

◆ 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 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().

◆ NCBISM_GetStandardMatrix()

const SNCBIPackedScoreMatrix* NCBISM_GetStandardMatrix ( const char *  name)

◆ NCBISM_Unpack()

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 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().

Variable Documentation

◆ NCBISM_Blosum45

const SNCBIPackedScoreMatrix NCBISM_Blosum45
extern

◆ NCBISM_Blosum50

const SNCBIPackedScoreMatrix NCBISM_Blosum50
extern

◆ NCBISM_Blosum62

const SNCBIPackedScoreMatrix NCBISM_Blosum62
extern

◆ NCBISM_Blosum80

const SNCBIPackedScoreMatrix NCBISM_Blosum80
extern

◆ NCBISM_Blosum90

const SNCBIPackedScoreMatrix NCBISM_Blosum90
extern

◆ NCBISM_Identity

const SNCBIPackedScoreMatrix NCBISM_Identity
extern

◆ NCBISM_Pam250

const SNCBIPackedScoreMatrix NCBISM_Pam250
extern

◆ NCBISM_Pam30

const SNCBIPackedScoreMatrix NCBISM_Pam30
extern

◆ NCBISM_Pam70

const SNCBIPackedScoreMatrix NCBISM_Pam70
extern
Modified on Sun Jul 14 04:56:38 2024 by modify_doxy.py rev. 669887