NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqalign/Dense_diag.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqalign/Packed_seg.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <objects/seqalign/Std_seg.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/util/sequence.hpp>
#include <objtools/alnmgr/aln_user_options.hpp>
#include <objtools/alnmgr/aln_stats.hpp>
#include <objtools/alnmgr/alnvec.hpp>
#include <objtools/alnmgr/sparse_aln.hpp>
#include <objtools/alnmgr/aln_converters.hpp>
#include <objtools/alnmgr/aln_builders.hpp>
#include <map>
#include <vector>
#include <algorithm>
#include <objtools/validator/validerror_align.hpp>
#include <objtools/validator/utilities.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | ambchar |
Typedefs | |
typedef struct ambchar | AmbCharData |
Functions | |
USING_SCOPE (sequence) | |
static void | GetInvalidSeqAlignTypeStr (CSeq_align::C_Segs::E_Choice segtype, int order, string &msg) |
static bool | s_AmbiguousMatch (char a, char b) |
static unsigned | s_GetNumIdsToUse (const CDense_seg &denseg) |
void | s_CalculateMatchingColumns (const CDense_seg &denseg, TSeqPos &col, size_t &num_match, bool &ids_missing, bool internal_gaps, CScope &scope) |
bool | s_DensegHasAccessionWithZeroVersion (const CDense_seg &denseg) |
void | s_FixZeroVersions (CDense_seg &denseg) |
static size_t | s_PercentBioseqMatch (CBioseq_Handle b1, CBioseq_Handle b2) |
string | s_DescribeSegment (const CSeq_id &id, const CSeq_id &id_context, size_t segment, size_t pos, bool use_in=false) |
Variables | |
static const AmbCharData | ambiguity_list [] |
static const int | num_ambiguities = sizeof (ambiguity_list) / sizeof (AmbCharData) |
static const string | kAlignmentTooLong = "the alignment claims to contain residue coordinates that are past the end of the sequence. Either the sequence is too short, or there are extra characters or formatting errors in the alignment" |
typedef struct ambchar AmbCharData |
|
static |
Definition at line 80 of file validerror_align.cpp.
References NStr::IntToString(), and msg().
Referenced by CValidError_align::ValidateSeqAlign().
Definition at line 200 of file validerror_align.cpp.
References a, ambiguity_list, b, NStr::Find(), i, and num_ambiguities.
Referenced by s_CalculateMatchingColumns(), and CValidError_align::x_ValidateAlignPercentIdentity().
void s_CalculateMatchingColumns | ( | const CDense_seg & | denseg, |
TSeqPos & | col, | ||
size_t & | num_match, | ||
bool & | ids_missing, | ||
bool | internal_gaps, | ||
CScope & | scope | ||
) |
Definition at line 307 of file validerror_align.cpp.
References column, NStr::Find(), CAlnMap::GetAlnStop(), CAlnVec::GetColumnVector(), CDense_seg_Base::GetDim(), CException::GetMsg(), CDense_seg_Base::GetNumseg(), CDense_seg_Base::GetStarts(), NStr::IsBlank(), match(), NStr::ReplaceInPlace(), s_AmbiguousMatch(), s_GetNumIdsToUse(), CAlnVec::SetEndChar(), CAlnVec::SetGapChar(), and NStr::StartsWith().
Referenced by CValidError_align::x_ValidateAlignPercentIdentity().
bool s_DensegHasAccessionWithZeroVersion | ( | const CDense_seg & | denseg | ) |
Definition at line 386 of file validerror_align.cpp.
References CDense_seg_Base::GetIds(), CDense_seg_Base::IsSetIds(), and ITERATE.
Referenced by CValidError_align::x_ValidateAlignPercentIdentity().
string s_DescribeSegment | ( | const CSeq_id & | id, |
const CSeq_id & | id_context, | ||
size_t | segment, | ||
size_t | pos, | ||
bool | use_in = false |
||
) |
Definition at line 1334 of file validerror_align.cpp.
References context, CSeq_id::eContent, CSeq_id::GetLabel(), label, and NStr::NumericToString().
Referenced by CValidError_align::x_ReportAlignErr(), and CValidError_align::x_ValidateSeqLength().
void s_FixZeroVersions | ( | CDense_seg & | denseg | ) |
Definition at line 400 of file validerror_align.cpp.
References CDense_seg_Base::IsSetIds(), NON_CONST_ITERATE, and CDense_seg_Base::SetIds().
Referenced by CValidError_align::x_ValidateAlignPercentIdentity().
|
static |
Definition at line 226 of file validerror_align.cpp.
References CDense_seg_Base::GetDim(), CDense_seg_Base::GetIds(), and CDense_seg_Base::IsSetIds().
Referenced by CValidError_align::IsTpaAlignment(), s_CalculateMatchingColumns(), CValidError_align::x_ValidateAlignPercentIdentity(), and CValidError_align::x_ValidateFastaLike().
|
static |
Definition at line 947 of file validerror_align.cpp.
References CBioseq_Handle::eCoding_Iupac, CBioseq_Handle::GetInst(), CSeq_inst_Base::GetLength(), CBioseq_Handle::GetSeqVector(), CBioseq_Handle::IsAa(), and match().
Referenced by CValidError_align::x_ValidateFastaLike().
USING_SCOPE | ( | sequence | ) |
|
static |
Definition at line 185 of file validerror_align.cpp.
Referenced by s_AmbiguousMatch().
|
static |
Definition at line 1363 of file validerror_align.cpp.
Referenced by CValidError_align::x_ReportStartMoreThanBiolen(), CValidError_align::x_ReportSumLenStart(), and CValidError_align::x_ValidateSeqLength().
|
static |
Definition at line 198 of file validerror_align.cpp.
Referenced by s_AmbiguousMatch().