NCBI C++ ToolKit
|
Search Toolkit Book for CAlnMixMerger
#include <objtools/alnmgr/alnmerger.hpp>
Public Types | |
enum | EMergeFlags { fTruncateOverlaps = 0x0001 , fNegativeStrand = 0x0002 , fGapJoin = 0x0004 , fMinGap = 0x0008 , fRemoveLeadTrailGaps = 0x0010 , fSortSeqsByScore = 0x0020 , fSortInputByScore = 0x0040 , fQuerySeqMergeOnly = 0x0080 , fFillUnalignedRegions = 0x0100 , fAllowTranslocation = 0x0200 } |
typedef CAlnMixMatches::TCalcScoreMethod | TCalcScoreMethod |
typedef int | TMergeFlags |
![]() | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CAlnMixMerger (CRef< CAlnMixMatches > &aln_mix_matches, TCalcScoreMethod calc_score=0) | |
void | Reset () |
void | Merge (TMergeFlags flags=0) |
const CDense_seg & | GetDenseg (void) const |
const CSeq_align & | GetSeqAlign (void) const |
![]() | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
![]() | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
![]() | |
CTaskProgressReporter () | |
Constructor. More... | |
void | SetTaskProgressCallback (ITaskProgressCallback *callback) |
Hook a callback to a task. More... | |
Private Types | |
enum | ESecondRowFits { eSecondRowFitsOk , eForceSeparateRow , eInconsistentStrand , eInconsistentFrame , eFirstRowOverlapBelow , eFirstRowOverlapAbove , eInconsistentOverlap , eSecondRowOverlap , eSecondRowInconsistency , eTranslocation , eIgnoreMatch } |
typedef int | TSecondRowFits |
typedef vector< CRef< CAlnMixMatch > > | TMatches |
typedef vector< CRef< CAlnMixSeq > > | TSeqs |
typedef map< pair< CAlnMixSeq *, CAlnMixSeq * >, CDiagRangeCollection > | TPlanes |
Private Member Functions | |
void | x_Reset (void) |
void | x_Merge (void) |
void | x_CreateDenseg (void) |
void | x_SetSeqFrame (CAlnMixMatch *match, CAlnMixSeq *&seq) |
TSecondRowFits | x_SecondRowFits (CAlnMixMatch *match) const |
Private Attributes | |
const size_t & | m_DsCnt |
CRef< CDense_seg > | m_DS |
CRef< CSeq_align > | m_Aln |
TMergeFlags | m_MergeFlags |
CRef< CAlnMixMatches > | m_AlnMixMatches |
TMatches & | m_Matches |
CRef< CAlnMixSequences > | m_AlnMixSequences |
TSeqs & | m_Seqs |
vector< CRef< CAlnMixSeq > > & | m_Rows |
list< CRef< CAlnMixSeq > > & | m_ExtraRows |
CRef< CAlnMixSegments > | m_AlnMixSegments |
size_t | m_MatchIdx |
bool | m_SingleRefseq |
bool | m_IndependentDSs |
TCalcScoreMethod | x_CalculateScore |
TPlanes | m_Planes |
Additional Inherited Members | |
![]() | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
![]() | |
static void | EnableDebugDump (bool on) |
![]() | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
![]() | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
![]() | |
void | x_SetTaskName (const string &name) |
Methods for reporting task progress. More... | |
void | x_SetTaskCompleted (int completed) |
void | x_SetTaskTotal (int total) |
bool | x_InterruptTask () |
Check if the task should be interrupted. More... | |
ITaskProgressCallback * | x_GetTaskProgressCallback () const |
Callback accessor. More... | |
Definition at line 56 of file alnmerger.hpp.
typedef CAlnMixMatches::TCalcScoreMethod CAlnMixMerger::TCalcScoreMethod |
Definition at line 62 of file alnmerger.hpp.
|
private |
Definition at line 119 of file alnmerger.hpp.
typedef int CAlnMixMerger::TMergeFlags |
Definition at line 84 of file alnmerger.hpp.
|
private |
Definition at line 122 of file alnmerger.hpp.
|
private |
Definition at line 114 of file alnmerger.hpp.
|
private |
Definition at line 120 of file alnmerger.hpp.
Enumerator | |
---|---|
fTruncateOverlaps | |
fNegativeStrand | |
fGapJoin | |
fMinGap | |
fRemoveLeadTrailGaps | |
fSortSeqsByScore | |
fSortInputByScore | |
fQuerySeqMergeOnly | |
fFillUnalignedRegions | |
fAllowTranslocation |
Definition at line 71 of file alnmerger.hpp.
|
private |
Definition at line 101 of file alnmerger.hpp.
CAlnMixMerger::CAlnMixMerger | ( | CRef< CAlnMixMatches > & | aln_mix_matches, |
TCalcScoreMethod | calc_score = 0 |
||
) |
Definition at line 48 of file alnmerger.cpp.
|
inline |
Definition at line 159 of file alnmerger.hpp.
References m_DS, and NCBI_THROW.
Referenced by CAlnMix::GetDenseg().
|
inline |
Definition at line 171 of file alnmerger.hpp.
References m_Aln, and NCBI_THROW.
Referenced by CAlnMix::GetSeqAlign().
void CAlnMixMerger::Merge | ( | TMergeFlags | flags = 0 | ) |
Definition at line 85 of file alnmerger.cpp.
References flags, m_DS, m_DsCnt, m_MergeFlags, NCBI_THROW, Reset(), and x_Merge().
Referenced by CAlnMix::Merge().
void CAlnMixMerger::Reset | ( | void | ) |
Definition at line 65 of file alnmerger.cpp.
References m_Aln, m_AlnMixSegments, m_DS, m_ExtraRows, m_Rows, CAlnMixSegments::m_Segments, m_Seqs, m_SingleRefseq, NON_CONST_ITERATE, and CRef< C, Locker >::Reset().
Referenced by Merge(), x_Merge(), and CAlnMix::x_Reset().
|
private |
Definition at line 1156 of file alnmerger.cpp.
References _ASSERT, eNa_strand_minus, eNa_strand_plus, CSeq_align_Base::eType_not_set, CAlnMixMatches::fForceTranslation, i, int, ITERATE, kInvalidSeqPos, CAlnMixMatches::m_AddFlags, m_Aln, m_AlnMixMatches, m_AlnMixSegments, CAlnMixMatches::m_ContainsAA, CAlnMixMatches::m_ContainsNA, m_DS, m_Rows, CAlnMixSegments::m_Segments, NULL, offset, CDense_seg_Base::SetDim(), CSeq_align_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CDense_seg_Base::SetNumseg(), CSeq_align_Base::SetSegs(), CDense_seg_Base::SetStarts(), CDense_seg_Base::SetStrands(), CSeq_align_Base::SetType(), CDense_seg::SetWidths(), CDense_seg::Validate(), CTaskProgressReporter::x_SetTaskCompleted(), CTaskProgressReporter::x_SetTaskName(), and CTaskProgressReporter::x_SetTaskTotal().
Referenced by x_Merge().
|
private |
Definition at line 101 of file alnmerger.cpp.
References _ASSERT, CAlignRangeCollection< TAlnRange >::begin(), map_checker< Container >::begin(), CAlnMixSegments::Build(), CAlnMixSequences::BuildRows(), CDiagRangeCollection::Diff(), eIgnoreMatch, CAlignRangeCollection< TAlnRange >::empty(), map_checker< Container >::end(), eSecondRowFitsOk, eTranslocation, fFillUnalignedRegions, CAlnMixMatches::fForceTranslation, fGapJoin, CAlnMixSegments::FillUnalignedRegions(), map_checker< Container >::find(), first(), fMinGap, fNegativeStrand, fQuerySeqMergeOnly, fRemoveLeadTrailGaps, fTruncateOverlaps, CAlignRange< Position >::GetFirstFrom(), CAlignRange< Position >::GetLength(), CAlignRange< Position >::GetSecondFrom(), CAlignRangeCollection< TAlnRange >::insert(), ITERATE, len, map_checker< Container >::lower_bound(), CAlnMixMatches::m_AddFlags, m_AlnMixMatches, m_AlnMixSegments, m_AlnMixSequences, CAlnMixSeq::m_BioseqHandle, CAlnMixSeq::m_ChildIdx, CAlnMixMatches::m_ContainsAA, CAlnMixMatches::m_ContainsNA, m_DsCnt, CAlnMixSegment::m_DsIdx, CAlnMixSeq::m_DsIdx, CAlnMixSeq::m_ExtraRowIdx, m_ExtraRows, CAlnMixSeq::m_Frame, m_IndependentDSs, CAlnMixSegment::m_Len, m_Matches, m_MatchIdx, CAlnMixSeq::m_MatchList, m_MergeFlags, m_Planes, CAlnMixSeq::m_PositiveStrand, CAlnMixSeq::m_RefBy, CAlnMixSeq::m_SeqId, CAlnMixSeq::m_SeqIdx, m_Seqs, m_SingleRefseq, CAlnMixSegment::m_StartIts, CAlnMixSeq::m_Width, match(), NCBI_THROW, NON_CONST_ITERATE, Reset(), CAlnMixSegment::SetStartIterator(), CAlnMixSeq::SetStarts(), map_checker< Container >::size(), CAlnMixSegment::StartItsConsistencyCheck(), x_CreateDenseg(), CTaskProgressReporter::x_InterruptTask(), x_SecondRowFits(), x_SetSeqFrame(), CTaskProgressReporter::x_SetTaskCompleted(), and CTaskProgressReporter::x_SetTaskTotal().
Referenced by Merge().
|
private |
|
private |
Definition at line 835 of file alnmerger.cpp.
References _ASSERT, map_checker< Container >::begin(), delta(), eFirstRowOverlapAbove, eFirstRowOverlapBelow, eForceSeparateRow, eIgnoreMatch, eInconsistentFrame, eInconsistentOverlap, eInconsistentStrand, map_checker< Container >::empty(), map_checker< Container >::end(), eSecondRowFitsOk, eSecondRowInconsistency, eSecondRowOverlap, eTranslocation, fAllowTranslocation, map_checker< Container >::find(), fQuerySeqMergeOnly, fTruncateOverlaps, CAlnMixSeq::GetStarts(), len, map_checker< Container >::lower_bound(), CAlnMixSeq::m_DsIdx, CAlnMixSeq::m_ExtraRow, CAlnMixSeq::m_Frame, m_IndependentDSs, m_MergeFlags, CAlnMixSeq::m_PositiveStrand, CAlnMixSeq::m_Width, match(), and result.
Referenced by x_Merge().
|
private |
Definition at line 1269 of file alnmerger.cpp.
References map_checker< Container >::empty(), fQuerySeqMergeOnly, CAlnMixSeq::GetStarts(), CAlnMixSeq::m_BioseqHandle, CAlnMixSeq::m_ChildIdx, CAlnMixSeq::m_DsIdx, CAlnMixSeq::m_ExtraRow, CAlnMixSeq::m_ExtraRowIdx, m_ExtraRows, CAlnMixSeq::m_Frame, m_MergeFlags, CAlnMixSeq::m_PositiveStrand, CAlnMixSeq::m_SeqId, CAlnMixSeq::m_SeqIdx, CAlnMixSeq::m_Width, and match().
Referenced by x_Merge().
|
private |
Definition at line 127 of file alnmerger.hpp.
Referenced by GetSeqAlign(), Reset(), and x_CreateDenseg().
|
private |
Definition at line 131 of file alnmerger.hpp.
Referenced by x_CreateDenseg(), and x_Merge().
|
private |
Definition at line 139 of file alnmerger.hpp.
Referenced by Reset(), x_CreateDenseg(), and x_Merge().
|
private |
Definition at line 134 of file alnmerger.hpp.
Referenced by x_Merge().
|
private |
Definition at line 126 of file alnmerger.hpp.
Referenced by GetDenseg(), Merge(), Reset(), and x_CreateDenseg().
|
private |
Definition at line 124 of file alnmerger.hpp.
|
private |
Definition at line 137 of file alnmerger.hpp.
Referenced by Reset(), x_Merge(), and x_SetSeqFrame().
|
private |
Definition at line 144 of file alnmerger.hpp.
Referenced by x_Merge(), and x_SecondRowFits().
|
private |
Definition at line 132 of file alnmerger.hpp.
Referenced by x_Merge().
|
private |
Definition at line 141 of file alnmerger.hpp.
Referenced by x_Merge().
|
private |
Definition at line 129 of file alnmerger.hpp.
Referenced by Merge(), x_Merge(), x_SecondRowFits(), and x_SetSeqFrame().
|
private |
Definition at line 148 of file alnmerger.hpp.
Referenced by x_Merge().
|
private |
Definition at line 136 of file alnmerger.hpp.
Referenced by Reset(), and x_CreateDenseg().
|
private |
Definition at line 135 of file alnmerger.hpp.
|
private |
Definition at line 143 of file alnmerger.hpp.
|
private |
Definition at line 146 of file alnmerger.hpp.