NCBI C++ ToolKit
|
Search Toolkit Book for CScoreLookup
#include <algo/align/util/score_lookup.hpp>
Classes | |
class | IScore |
Public Member Functions | |
CScoreLookup () | |
CScoreLookup (enum blast::EProgram program_type) | |
CScoreLookup (blast::CBlastOptionsHandle &options) | |
void | SetScope (objects::CScope &scope) |
CScoreLookup uses a scope internally. More... | |
objects::CScope & | GetScope () |
void | PrintDictionary (CNcbiOstream &) |
Print out the dictionary of recognized score names. More... | |
string | HelpText (const string &score_name) |
Help text for score. More... | |
IScore::EComplexity | Complexity (const string &score_name) |
bool | IsIntegerScore (const objects::CSeq_align &align, const string &score_name) |
double | GetScore (const objects::CSeq_align &align, const string &score_name) |
Get requested score for alignment. More... | |
void | UpdateState (const objects::CSeq_align &align) |
Public Member Functions inherited from CScoreBuilder | |
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) |
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... | |
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) |
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) |
Static Public Member Functions | |
static int | GetGeneId (const objects::CBioseq_Handle &bsh) |
Private Types | |
typedef map< string, CIRef< IScore > > | TScoreDictionary |
Private Member Functions | |
void | x_Init () |
void | x_PrintDictionaryEntry (CNcbiOstream &ostr, const string &score_name) |
Private Attributes | |
CRef< objects::CScope > | m_Scope |
TScoreDictionary | m_Scores |
set< string > | m_ScoresUsed |
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... | |
Protected Member Functions inherited from CScoreBuilder | |
struct BlastScoreBlk * | GetBlastScoreBlkPtr () |
Definition at line 48 of file score_lookup.hpp.
|
private |
Definition at line 115 of file score_lookup.hpp.
|
inline |
Definition at line 72 of file score_lookup.hpp.
References x_Init().
|
inline |
Definition at line 74 of file score_lookup.hpp.
References x_Init().
|
inline |
Definition at line 77 of file score_lookup.hpp.
References x_Init().
CScoreLookup::IScore::EComplexity CScoreLookup::Complexity | ( | const string & | score_name | ) |
Definition at line 2386 of file score_lookup.cpp.
References CScoreLookup::IScore::eEasy, map_checker< Container >::end(), map_checker< Container >::find(), m_Scores, NCBI_THROW, and CSeq_align::ScoreNameMap().
Definition at line 1708 of file score_lookup.cpp.
References CSeqFeatData_Base::e_Gene, eUnknown, CSeq_feat_Handle::GetData(), CGene_ref_Base::GetDb(), CSeqFeatData_Base::GetGene(), CObject_id_Base::GetId(), CSeq_feat_Handle::GetNamedDbxref(), CDbtag_Base::GetTag(), CGene_ref_Base::IsSetDb(), and NCBI_THROW.
Referenced by CScore_GeneID::Get().
|
inline |
Definition at line 85 of file score_lookup.hpp.
References m_Scope.
Get requested score for alignment.
Definition at line 2429 of file score_lookup.cpp.
References CScoreBuilder::ComputeScore(), map_checker< Container >::end(), map_checker< Container >::find(), CObjectManager::GetInstance(), set< Key, Compare >::insert(), CRef< C, Locker >::IsNull(), m_Scope, m_Scores, m_ScoresUsed, NCBI_THROW, CRef< C, Locker >::Reset(), and CSeq_align::ScoreNameMap().
Referenced by BOOST_AUTO_TEST_CASE().
Help text for score.
Definition at line 2367 of file score_lookup.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), CSeq_align::HelpText(), set< Key, Compare >::insert(), m_Scores, m_ScoresUsed, CSeq_align::ScoreNameMap(), and string.
Referenced by x_PrintDictionaryEntry().
Definition at line 2403 of file score_lookup.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), CSeq_align::IsIntegerScore(), ITERATE, m_Scores, and CSeq_align::ScoreNameMap().
void CScoreLookup::PrintDictionary | ( | CNcbiOstream & | ostr | ) |
Print out the dictionary of recognized score names.
Definition at line 2353 of file score_lookup.cpp.
References ITERATE, m_Scores, CSeq_align::ScoreNameMap(), and x_PrintDictionaryEntry().
|
inline |
CScoreLookup uses a scope internally.
You can set a scope yourself; alternatively, the scope used internally will be a default scope
Definition at line 82 of file score_lookup.hpp.
References m_Scope, and CRef< C, Locker >::Reset().
Referenced by BOOST_AUTO_TEST_CASE().
void CScoreLookup::UpdateState | ( | const objects::CSeq_align & | align | ) |
Definition at line 2334 of file score_lookup.cpp.
References ITERATE, m_Scores, and m_ScoresUsed.
|
private |
Definition at line 2004 of file score_lookup.cpp.
References CScore_EdgeExonInfo::e3Prime, CScore_EdgeExonInfo::e5Prime, CScore_SymmetricOverlap::e_Avg, CScore_SymmetricOverlap::e_Min, CScore_CdsScore::eEnd, CScore_EdgeExonInfo::eLength, CScore_CdsScore::ePercentCoverage, CScore_CdsScore::ePercentIdentity, CScore_EdgeExonInfo::ePercentIdentity, CScore_CdsScore::eStart, map_checker< Container >::insert(), and m_Scores.
Referenced by CScoreLookup().
|
private |
Definition at line 2341 of file score_lookup.cpp.
References HelpText(), i, ITERATE, tmp, and NStr::Wrap().
Referenced by PrintDictionary().
|
private |
Definition at line 113 of file score_lookup.hpp.
Referenced by GetScope(), GetScore(), and SetScope().
|
private |
Definition at line 116 of file score_lookup.hpp.
Referenced by Complexity(), GetScore(), HelpText(), IsIntegerScore(), PrintDictionary(), UpdateState(), and x_Init().
Definition at line 118 of file score_lookup.hpp.
Referenced by GetScore(), HelpText(), and UpdateState().