NCBI C++ ToolKit
Functions
score_builder_base.cpp File Reference
#include <ncbi_pch.hpp>
#include <objtools/alnmgr/score_builder_base.hpp>
#include <objtools/alnmgr/alntext.hpp>
#include <util/sequtil/sequtil_manip.hpp>
#include <objtools/alnmgr/alnvec.hpp>
#include <objtools/alnmgr/pairwise_aln.hpp>
#include <objtools/alnmgr/aln_converters.hpp>
#include <objmgr/objmgr_exception.hpp>
#include <objmgr/seq_vector.hpp>
#include <objmgr/feat_ci.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seq/Annot_descr.hpp>
#include <objects/seq/Annotdesc.hpp>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqalign/Std_seg.hpp>
#include <objects/seqalign/Spliced_seg.hpp>
#include <objects/seqalign/Spliced_exon.hpp>
#include <objects/seqalign/Spliced_exon_chunk.hpp>
#include <objects/seqalign/Product_pos.hpp>
#include <objects/seqalign/Prot_pos.hpp>
#include <objmgr/util/sequence.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/seqfeat/OrgName.hpp>
#include <objects/seqfeat/Genetic_code_table.hpp>
+ Include dependency graph for score_builder_base.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

 USING_SCOPE (objects)
 
static TSeqPos s_IntersectionLength (const CRangeCollection< TSeqPos > &ranges, const TSeqRange &range)
 Get length of intersection between a range and a range collection. More...
 
static void s_GetNucIdentityMismatch (const vector< string > &data, int *identities, int *mismatches)
 calculate mismatches and identities in a seq-align More...
 
static void s_GetSplicedSegIdentityMismatch (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, int *identities, int *mismatches)
 
static void s_GetCountIdentityMismatch (CScope &scope, const CSeq_align &align, int *identities, int *mismatches, const CRangeCollection< TSeqPos > &ranges=CRangeCollection< TSeqPos >(TSeqRange::GetWhole()))
 
static void s_GetPercentIdentity (CScope &scope, const CSeq_align &align, int *identities, int *mismatches, double *pct_identity, CScoreBuilderBase::EPercentIdentityType type, const CRangeCollection< TSeqPos > &ranges=CRangeCollection< TSeqPos >(TSeqRange::GetWhole()))
 calculate the percent identity we also return the count of identities and mismatches More...
 
static bool s_SequenceIsProtein (CScope &scope, const CSeq_id &id)
 calculate the percent coverage More...
 
static bool s_IsProteinToGenomic (CScope &scope, const CSeq_align &align)
 
static void s_GetPercentCoverage (CScope &scope, const CSeq_align &align, const CRangeCollection< TSeqPos > &ranges, double *pct_coverage, unsigned query=0)
 
string GetDonor (const objects::CSpliced_exon &exon)
 
string GetAcceptor (const objects::CSpliced_exon &exon)
 
bool IsConsSplice (const string &donor, const string acc)
 

Function Documentation

◆ GetAcceptor()

string GetAcceptor ( const objects::CSpliced_exon &  exon)

Definition at line 982 of file score_builder_base.cpp.

References string.

Referenced by CScoreBuilderBase::AddSplignScores().

◆ GetDonor()

string GetDonor ( const objects::CSpliced_exon &  exon)

Definition at line 975 of file score_builder_base.cpp.

References string.

Referenced by CScoreBuilderBase::AddSplignScores(), and CSplign::x_Run().

◆ IsConsSplice()

bool IsConsSplice ( const string donor,
const string  acc 
)

Definition at line 990 of file score_builder_base.cpp.

References toupper().

Referenced by CScoreBuilderBase::AddSplignScores().

◆ s_GetCountIdentityMismatch()

static void s_GetCountIdentityMismatch ( CScope scope,
const CSeq_align align,
int identities,
int mismatches,
const CRangeCollection< TSeqPos > &  ranges = CRangeCollection<TSeqPos>(TSeqRange::GetWhole()) 
)
static

Definition at line 285 of file score_builder_base.cpp.

References _ASSERT, CSeq_id::AsFastaString(), CProduct_pos::AsSeqPos(), data, CSeq_align_Base::C_Segs::e_Denseg, CSpliced_exon_chunk_Base::e_Diag, CSeq_align_Base::C_Segs::e_Disc, CSpliced_exon_chunk_Base::e_Match, CSpliced_exon_chunk_Base::e_Mismatch, CSpliced_exon_chunk_Base::e_Product_ins, CSeq_align_Base::C_Segs::e_Spliced, CSeq_align_Base::C_Segs::e_Std, CSeq_align::eScore_IdentityCount, CSeq_align_set_Base::Get(), CSeq_align::GetAlignLength(), CSeq_align_Base::C_Segs::GetDenseg(), CSpliced_exon_chunk_Base::GetDiag(), CSeq_align_Base::C_Segs::GetDisc(), CSpliced_seg_Base::GetExons(), CRange_Base::GetFrom(), CSpliced_exon_chunk_Base::GetMatch(), CSpliced_exon_chunk_Base::GetMismatch(), CSeq_align::GetNamedScore(), CAlnMap::GetNumRows(), CAlnMap::GetNumSegs(), CSpliced_exon_Base::GetParts(), CSpliced_exon_Base::GetProduct_end(), CSpliced_exon_chunk_Base::GetProduct_ins(), CSpliced_exon_Base::GetProduct_start(), CSeq_align_Base::GetSegs(), CSeq_align::GetSeq_id(), CAlnVec::GetSeqString(), CSeq_align_Base::C_Segs::GetSpliced(), CAlnMap::GetStart(), CAlnMap::GetStop(), i, CRangeCollection< Position >::IntersectWith(), CSpliced_exon_Base::IsSetParts(), ITERATE, len, NCBI_RETHROW_SAME, NCBI_THROW, offset, s_GetNucIdentityMismatch(), s_GetSplicedSegIdentityMismatch(), s_IntersectionLength(), COpenRange< Position >::Set(), CSeq_align_Base::C_Segs::Which(), and CSpliced_exon_chunk_Base::Which().

Referenced by CScoreBuilderBase::GetIdentityCount(), CScoreBuilderBase::GetMismatchCount(), and s_GetPercentIdentity().

◆ s_GetNucIdentityMismatch()

static void s_GetNucIdentityMismatch ( const vector< string > &  data,
int identities,
int mismatches 
)
static

calculate mismatches and identities in a seq-align

Definition at line 93 of file score_builder_base.cpp.

References a, b, data, i, NCBI_THROW, and ncbi::grid::netcache::search::fields::size.

Referenced by s_GetCountIdentityMismatch().

◆ s_GetPercentCoverage()

static void s_GetPercentCoverage ( CScope scope,
const CSeq_align align,
const CRangeCollection< TSeqPos > &  ranges,
double *  pct_coverage,
unsigned  query = 0 
)
static

◆ s_GetPercentIdentity()

static void s_GetPercentIdentity ( CScope scope,
const CSeq_align align,
int identities,
int mismatches,
double *  pct_identity,
CScoreBuilderBase::EPercentIdentityType  type,
const CRangeCollection< TSeqPos > &  ranges = CRangeCollection<TSeqPos>(TSeqRange::GetWhole()) 
)
static

◆ s_GetSplicedSegIdentityMismatch()

static void s_GetSplicedSegIdentityMismatch ( CScope scope,
const CSeq_align align,
const CRangeCollection< TSeqPos > &  ranges,
int identities,
int mismatches 
)
static

◆ s_IntersectionLength()

static TSeqPos s_IntersectionLength ( const CRangeCollection< TSeqPos > &  ranges,
const TSeqRange range 
)
inlinestatic

Get length of intersection between a range and a range collection.

Definition at line 79 of file score_builder_base.cpp.

References ITERATE, and compile_time_bits::range().

Referenced by s_GetCountIdentityMismatch().

◆ s_IsProteinToGenomic()

static bool s_IsProteinToGenomic ( CScope scope,
const CSeq_align align 
)
static

◆ s_SequenceIsProtein()

static bool s_SequenceIsProtein ( CScope scope,
const CSeq_id id 
)
static

◆ USING_SCOPE()

USING_SCOPE ( objects  )
Modified on Fri Apr 26 16:21:23 2024 by modify_doxy.py rev. 669887