NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CScoreBuilder Class Reference

Search Toolkit Book for CScoreBuilder

#include <algo/align/util/score_builder.hpp>

+ Inheritance diagram for CScoreBuilder:
+ Collaboration diagram for CScoreBuilder:

Public Member Functions

 CScoreBuilder ()
 Default constructor. More...
 
 CScoreBuilder (enum blast::EProgram program_type)
 
 CScoreBuilder (blast::CBlastOptionsHandle &options)
 
 ~CScoreBuilder ()
 Destructor. More...
 
void SetGapOpen (int gapopen)
 
void SetGapExtend (int gapextend)
 
Functions to add scores directly to Seq-aligns
void AddScore (CScope &scope, CSeq_align &align, EScoreType score)
 deprecated: use CSeq_align::EScoreType directly More...
 
void AddScore (CScope &scope, list< CRef< CSeq_align > > &aligns, EScoreType score)
 deprecated: use CSeq_align::EScoreType directly More...
 
Functions to compute scores without adding
double ComputeScore (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, CSeq_align::EScoreType score)
 
double ComputeScore (CScope &scope, const CSeq_align &align, CSeq_align::EScoreType score)
 
double ComputeScore (CScope &scope, const CSeq_align &align, const TSeqRange &range, CSeq_align::EScoreType score)
 
void AddScore (CScope &scope, CSeq_align &align, CSeq_align::EScoreType score)
 
void AddScore (CScope &scope, list< CRef< CSeq_align > > &aligns, CSeq_align::EScoreType score)
 
int GetBlastScore (CScope &scope, const CSeq_align &align)
 Compute the BLAST score of the alignment. More...
 
double GetBlastBitScore (CScope &scope, const CSeq_align &align)
 Compute the BLAST bit score. More...
 
double GetBlastEValue (CScope &scope, const CSeq_align &align)
 Compute the BLAST e-value. More...
 
void AddTracebacks (CScope &scope, CSeq_align &align)
 
void AddTracebacks (CScope &scope, list< CRef< CSeq_align > > &aligns)
 
string GetTraceback (const CSeq_align &align, CSeq_align::TDim row)
 
string GetTraceback (CScope &scope, const CSeq_align &align, CSeq_align::TDim row)
 
int ComputeTieBreaker (const CSeq_align &align)
 
void AddTieBreaker (CSeq_align &align)
 
Functions for configuring blast scores
void SetEffectiveSearchSpace (Int8 searchsp)
 
- Public Member Functions inherited from CScoreBuilderBase
 CScoreBuilderBase ()
 Default constructor. More...
 
virtual ~CScoreBuilderBase ()
 Destructor. More...
 
EErrorMode GetErrorMode (void) const
 
void SetErrorMode (EErrorMode mode)
 
void AddScore (CScope &scope, CSeq_align &align, CSeq_align::EScoreType score)
 
void AddScore (CScope &scope, list< CRef< CSeq_align > > &aligns, CSeq_align::EScoreType score)
 
double ComputeScore (CScope &scope, const CSeq_align &align, CSeq_align::EScoreType score)
 
double ComputeScore (CScope &scope, const CSeq_align &align, const TSeqRange &range, CSeq_align::EScoreType score)
 
void AddSplignScores (const CSeq_align &align, CSeq_align::TScore &scores)
 Compute the six splign scores. More...
 
void AddSplignScores (CSeq_align &align)
 
double GetPercentIdentity (CScope &scope, const CSeq_align &align, EPercentIdentityType type=eGapped)
 
double GetPercentCoverage (CScope &scope, const CSeq_align &align, unsigned query=0)
 Compute percent coverage of the query (sequence 0) (range 0-100) More...
 
double GetPercentIdentity (CScope &scope, const CSeq_align &align, const TSeqRange &range, EPercentIdentityType type=eGapped)
 Compute percent identity or coverage of the query within specified range. More...
 
double GetPercentCoverage (CScope &scope, const CSeq_align &align, const TSeqRange &range, unsigned query=0)
 
double GetPercentIdentity (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, EPercentIdentityType type=eGapped)
 Compute percent identity or coverage of the query within specified collection of ranges. More...
 
double GetPercentCoverage (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, unsigned query=0)
 
int GetIdentityCount (CScope &scope, const CSeq_align &align)
 Compute the number of identities in the alignment. More...
 
int GetMismatchCount (CScope &scope, const CSeq_align &align)
 Compute the number of mismatches in the alignment. More...
 
void GetMismatchCount (CScope &scope, const CSeq_align &align, int &identities, int &mismatches)
 
int GetIdentityCount (CScope &scope, const CSeq_align &align, const TSeqRange &range)
 Compute identity and/or mismatch counts within specified range. More...
 
int GetMismatchCount (CScope &scope, const CSeq_align &align, const TSeqRange &range)
 
void GetMismatchCount (CScope &scope, const CSeq_align &align, const TSeqRange &range, int &identities, int &mismatches)
 
int GetIdentityCount (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges)
 Compute identity and/or mismatch counts within specified collection of ranges. More...
 
int GetMismatchCount (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges)
 
void GetMismatchCount (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, int &identities, int &mismatches)
 
int GetPositiveCount (CScope &scope, const CSeq_align &align)
 counts based on substitution matrix for protein alignments More...
 
int GetNegativeCount (CScope &scope, const CSeq_align &align)
 
void GetMatrixCounts (CScope &scope, const CSeq_align &align, int &positives, int &negatives)
 
int GetGapCount (const CSeq_align &align)
 Compute the number of gaps in the alignment. More...
 
int GetGapCount (const CSeq_align &align, const TSeqRange &range)
 
int GetGapCount (const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges)
 
int GetGapBaseCount (const CSeq_align &align)
 Compute the number of gap bases in the alignment (= length of all gap segments) More...
 
int GetGapBaseCount (const CSeq_align &align, const TSeqRange &range)
 
int GetGapBaseCount (const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges)
 
TSeqPos GetAlignLength (const CSeq_align &align, bool ungapped=false)
 Compute the length of the alignment (= length of all segments, gaps + aligned) More...
 
TSeqPos GetAlignLength (const CSeq_align &align, const TSeqRange &range, bool ungapped=false)
 
TSeqPos GetAlignLength (const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, bool ungapped=false)
 
void SetSubstMatrix (const string &name)
 

Protected Member Functions

struct BlastScoreBlkGetBlastScoreBlkPtr ()
 

Private Member Functions

void x_Initialize (blast::CBlastOptionsHandle &options)
 
int GetBlastScoreDenseg (CScope &scope, const CSeq_align &align)
 
int GetBlastScoreStd (CScope &scope, const CSeq_align &align)
 
int GetBlastScoreSpliced (CScope &scope, const CSeq_align &align)
 
int GetBlastScoreProtToNucl (CScope &scope, const CSeq_align &align, list< CRef< CPairwiseAln > > &pairs)
 

Private Attributes

struct BlastScoreBlkm_ScoreBlk
 
enum blast::EProgram m_BlastType
 
int m_GapOpen
 
int m_GapExtend
 
Int8 m_EffectiveSearchSpace
 

Additional Inherited Members

- Public Types inherited from CScoreBuilderBase
enum  EScoreType {
  eScore_Blast , eScore_Blast_BitScore , eScore_Blast_EValue , eScore_IdentityCount ,
  eScore_MismatchCount , eScore_PercentIdentity , eScore_PercentCoverage
}
 
enum  EErrorMode { eError_Silent , eError_Report , eError_Throw }
 Error handling while adding scores that are not implemented or unsupported (cannot be defined) for certain types of alignments. More...
 
enum  EPercentIdentityType { eGapped , eUngapped , eGBDNA }
 Compute percent identity (range 0-100) More...
 

Detailed Description

Definition at line 55 of file score_builder.hpp.

Constructor & Destructor Documentation

◆ CScoreBuilder() [1/3]

CScoreBuilder::CScoreBuilder ( )

Default constructor.

Definition at line 154 of file score_builder.cpp.

◆ CScoreBuilder() [2/3]

CScoreBuilder::CScoreBuilder ( enum blast::EProgram  program_type)

◆ CScoreBuilder() [3/3]

CScoreBuilder::CScoreBuilder ( blast::CBlastOptionsHandle &  options)

◆ ~CScoreBuilder()

CScoreBuilder::~CScoreBuilder ( )

Destructor.

Definition at line 177 of file score_builder.cpp.

References BlastScoreBlkFree(), and m_ScoreBlk.

Member Function Documentation

◆ AddScore() [1/4]

void CScoreBuilder::AddScore ( CScope scope,
CSeq_align align,
CSeq_align::EScoreType  score 
)
inline

Definition at line 103 of file score_builder.hpp.

References CScoreBuilderBase::AddScore().

◆ AddScore() [2/4]

void CScoreBuilder::AddScore ( CScope scope,
CSeq_align align,
EScoreType  score 
)

◆ AddScore() [3/4]

void CScoreBuilder::AddScore ( CScope scope,
list< CRef< CSeq_align > > &  aligns,
CSeq_align::EScoreType  score 
)
inline

Definition at line 109 of file score_builder.hpp.

References CScoreBuilderBase::AddScore().

◆ AddScore() [4/4]

void CScoreBuilder::AddScore ( CScope scope,
list< CRef< CSeq_align > > &  aligns,
EScoreType  score 
)

◆ AddTieBreaker()

void CScoreBuilder::AddTieBreaker ( CSeq_align align)

Definition at line 888 of file score_builder.cpp.

References ComputeTieBreaker(), and CSeq_align::SetNamedScore().

◆ AddTracebacks() [1/2]

void CScoreBuilder::AddTracebacks ( CScope scope,
CSeq_align align 
)

◆ AddTracebacks() [2/2]

void CScoreBuilder::AddTracebacks ( CScope scope,
list< CRef< CSeq_align > > &  aligns 
)

Definition at line 782 of file score_builder.cpp.

References AddTracebacks(), and NON_CONST_ITERATE.

◆ ComputeScore() [1/3]

double CScoreBuilder::ComputeScore ( CScope scope,
const CSeq_align align,
const CRangeCollection< TSeqPos > &  ranges,
CSeq_align::EScoreType  score 
)
virtual

◆ ComputeScore() [2/3]

double CScoreBuilder::ComputeScore ( CScope scope,
const CSeq_align align,
const TSeqRange range,
CSeq_align::EScoreType  score 
)
inline

◆ ComputeScore() [3/3]

double CScoreBuilder::ComputeScore ( CScope scope,
const CSeq_align align,
CSeq_align::EScoreType  score 
)
inline

Definition at line 90 of file score_builder.hpp.

References CScoreBuilderBase::ComputeScore().

◆ ComputeTieBreaker()

int CScoreBuilder::ComputeTieBreaker ( const CSeq_align align)

◆ GetBlastBitScore()

double CScoreBuilder::GetBlastBitScore ( CScope scope,
const CSeq_align align 
)

◆ GetBlastEValue()

double CScoreBuilder::GetBlastEValue ( CScope scope,
const CSeq_align align 
)

◆ GetBlastScore()

int CScoreBuilder::GetBlastScore ( CScope scope,
const CSeq_align align 
)

◆ GetBlastScoreBlkPtr()

struct BlastScoreBlk* CScoreBuilder::GetBlastScoreBlkPtr ( )
inlineprotected

Definition at line 166 of file score_builder.hpp.

References m_ScoreBlk.

◆ GetBlastScoreDenseg()

int CScoreBuilder::GetBlastScoreDenseg ( CScope scope,
const CSeq_align align 
)
private

◆ GetBlastScoreProtToNucl()

int CScoreBuilder::GetBlastScoreProtToNucl ( CScope scope,
const CSeq_align align,
list< CRef< CPairwiseAln > > &  pairs 
)
private

◆ GetBlastScoreSpliced()

int CScoreBuilder::GetBlastScoreSpliced ( CScope scope,
const CSeq_align align 
)
private

◆ GetBlastScoreStd()

int CScoreBuilder::GetBlastScoreStd ( CScope scope,
const CSeq_align align 
)
private

◆ GetTraceback() [1/2]

string CScoreBuilder::GetTraceback ( const CSeq_align align,
CSeq_align::TDim  row 
)

◆ GetTraceback() [2/2]

string CScoreBuilder::GetTraceback ( CScope scope,
const CSeq_align align,
CSeq_align::TDim  row 
)

Definition at line 809 of file score_builder.cpp.

References GetTraceback(), row, and s_ComputeTraceback().

◆ SetEffectiveSearchSpace()

void CScoreBuilder::SetEffectiveSearchSpace ( Int8  searchsp)
inline

Definition at line 142 of file score_builder.hpp.

References m_EffectiveSearchSpace.

Referenced by CBlastScorer::ScoreAlignments().

◆ SetGapExtend()

void CScoreBuilder::SetGapExtend ( int  gapextend)
inline

Definition at line 66 of file score_builder.hpp.

References m_GapExtend.

◆ SetGapOpen()

void CScoreBuilder::SetGapOpen ( int  gapopen)
inline

Definition at line 65 of file score_builder.hpp.

References m_GapOpen.

◆ x_Initialize()

void CScoreBuilder::x_Initialize ( blast::CBlastOptionsHandle &  options)
private

Member Data Documentation

◆ m_BlastType

enum blast::EProgram CScoreBuilder::m_BlastType
private

◆ m_EffectiveSearchSpace

Int8 CScoreBuilder::m_EffectiveSearchSpace
private

Definition at line 155 of file score_builder.hpp.

Referenced by GetBlastEValue(), and SetEffectiveSearchSpace().

◆ m_GapExtend

int CScoreBuilder::m_GapExtend
private

◆ m_GapOpen

int CScoreBuilder::m_GapOpen
private

◆ m_ScoreBlk

struct BlastScoreBlk* CScoreBuilder::m_ScoreBlk
private

The documentation for this class was generated from the following files:
Modified on Sat Jun 22 10:39:53 2024 by modify_doxy.py rev. 669887