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

Search Toolkit Book for CAlnMixMerger

#include <objtools/alnmgr/alnmerger.hpp>

+ Inheritance diagram for CAlnMixMerger:
+ Collaboration diagram for CAlnMixMerger:

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
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 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_segGetDenseg (void) const
 
const CSeq_alignGetSeqAlign (void) const
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (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...
 
- Public Member Functions inherited from CDebugDumpable
 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
 
- Public Member Functions inherited from CTaskProgressReporter
 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 * >, CDiagRangeCollectionTPlanes
 

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_segm_DS
 
CRef< CSeq_alignm_Aln
 
TMergeFlags m_MergeFlags
 
CRef< CAlnMixMatchesm_AlnMixMatches
 
TMatchesm_Matches
 
CRef< CAlnMixSequencesm_AlnMixSequences
 
TSeqsm_Seqs
 
vector< CRef< CAlnMixSeq > > & m_Rows
 
list< CRef< CAlnMixSeq > > & m_ExtraRows
 
CRef< CAlnMixSegmentsm_AlnMixSegments
 
size_t m_MatchIdx
 
bool m_SingleRefseq
 
bool m_IndependentDSs
 
TCalcScoreMethod x_CalculateScore
 
TPlanes m_Planes
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
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 Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
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...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Protected Member Functions inherited from CTaskProgressReporter
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...
 
ITaskProgressCallbackx_GetTaskProgressCallback () const
 Callback accessor. More...
 

Detailed Description

Definition at line 56 of file alnmerger.hpp.

Member Typedef Documentation

◆ TCalcScoreMethod

typedef CAlnMixMatches::TCalcScoreMethod CAlnMixMerger::TCalcScoreMethod

Definition at line 62 of file alnmerger.hpp.

◆ TMatches

typedef vector<CRef<CAlnMixMatch> > CAlnMixMerger::TMatches
private

Definition at line 119 of file alnmerger.hpp.

◆ TMergeFlags

Definition at line 84 of file alnmerger.hpp.

◆ TPlanes

Definition at line 122 of file alnmerger.hpp.

◆ TSecondRowFits

Definition at line 114 of file alnmerger.hpp.

◆ TSeqs

typedef vector<CRef<CAlnMixSeq> > CAlnMixMerger::TSeqs
private

Definition at line 120 of file alnmerger.hpp.

Member Enumeration Documentation

◆ EMergeFlags

Enumerator
fTruncateOverlaps 
fNegativeStrand 
fGapJoin 
fMinGap 
fRemoveLeadTrailGaps 
fSortSeqsByScore 
fSortInputByScore 
fQuerySeqMergeOnly 
fFillUnalignedRegions 
fAllowTranslocation 

Definition at line 71 of file alnmerger.hpp.

◆ ESecondRowFits

Enumerator
eSecondRowFitsOk 
eForceSeparateRow 
eInconsistentStrand 
eInconsistentFrame 
eFirstRowOverlapBelow 
eFirstRowOverlapAbove 
eInconsistentOverlap 
eSecondRowOverlap 
eSecondRowInconsistency 
eTranslocation 
eIgnoreMatch 

Definition at line 101 of file alnmerger.hpp.

Constructor & Destructor Documentation

◆ CAlnMixMerger()

CAlnMixMerger::CAlnMixMerger ( CRef< CAlnMixMatches > &  aln_mix_matches,
TCalcScoreMethod  calc_score = 0 
)

Definition at line 48 of file alnmerger.cpp.

Member Function Documentation

◆ GetDenseg()

const CDense_seg & CAlnMixMerger::GetDenseg ( void  ) const
inline

Definition at line 159 of file alnmerger.hpp.

References m_DS, and NCBI_THROW.

Referenced by CAlnMix::GetDenseg().

◆ GetSeqAlign()

const CSeq_align & CAlnMixMerger::GetSeqAlign ( void  ) const
inline

Definition at line 171 of file alnmerger.hpp.

References m_Aln, and NCBI_THROW.

Referenced by CAlnMix::GetSeqAlign().

◆ Merge()

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().

◆ Reset()

void CAlnMixMerger::Reset ( void  )

◆ x_CreateDenseg()

void CAlnMixMerger::x_CreateDenseg ( void  )
private

◆ x_Merge()

void CAlnMixMerger::x_Merge ( void  )
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, CAlnMixMatches::m_ContainsAA, CAlnMixMatches::m_ContainsNA, m_DsCnt, CAlnMixSegment::m_DsIdx, m_ExtraRows, m_IndependentDSs, CAlnMixSegment::m_Len, m_Matches, m_MatchIdx, CAlnMixSeq::m_MatchList, m_MergeFlags, m_Planes, CAlnMixSeq::m_PositiveStrand, CAlnMixSeq::m_RefBy, m_Seqs, m_SingleRefseq, CAlnMixSegment::m_StartIts, CAlnMixSeq::m_Width, match(), NCBI_THROW, NON_CONST_ITERATE, Reset(), row, 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().

◆ x_Reset()

void CAlnMixMerger::x_Reset ( void  )
private

◆ x_SecondRowFits()

CAlnMixMerger::TSecondRowFits CAlnMixMerger::x_SecondRowFits ( CAlnMixMatch match) const
private

◆ x_SetSeqFrame()

void CAlnMixMerger::x_SetSeqFrame ( CAlnMixMatch match,
CAlnMixSeq *&  seq 
)
private

Member Data Documentation

◆ m_Aln

CRef<CSeq_align> CAlnMixMerger::m_Aln
private

Definition at line 127 of file alnmerger.hpp.

Referenced by GetSeqAlign(), Reset(), and x_CreateDenseg().

◆ m_AlnMixMatches

CRef<CAlnMixMatches> CAlnMixMerger::m_AlnMixMatches
private

Definition at line 131 of file alnmerger.hpp.

Referenced by x_CreateDenseg(), and x_Merge().

◆ m_AlnMixSegments

CRef<CAlnMixSegments> CAlnMixMerger::m_AlnMixSegments
private

Definition at line 139 of file alnmerger.hpp.

Referenced by Reset(), x_CreateDenseg(), and x_Merge().

◆ m_AlnMixSequences

CRef<CAlnMixSequences> CAlnMixMerger::m_AlnMixSequences
private

Definition at line 134 of file alnmerger.hpp.

Referenced by x_Merge().

◆ m_DS

CRef<CDense_seg> CAlnMixMerger::m_DS
private

Definition at line 126 of file alnmerger.hpp.

Referenced by GetDenseg(), Merge(), Reset(), and x_CreateDenseg().

◆ m_DsCnt

const size_t& CAlnMixMerger::m_DsCnt
private

Definition at line 124 of file alnmerger.hpp.

Referenced by Merge(), and x_Merge().

◆ m_ExtraRows

list<CRef<CAlnMixSeq> >& CAlnMixMerger::m_ExtraRows
private

Definition at line 137 of file alnmerger.hpp.

Referenced by Reset(), x_Merge(), and x_SetSeqFrame().

◆ m_IndependentDSs

bool CAlnMixMerger::m_IndependentDSs
private

Definition at line 144 of file alnmerger.hpp.

Referenced by x_Merge(), and x_SecondRowFits().

◆ m_Matches

TMatches& CAlnMixMerger::m_Matches
private

Definition at line 132 of file alnmerger.hpp.

Referenced by x_Merge().

◆ m_MatchIdx

size_t CAlnMixMerger::m_MatchIdx
private

Definition at line 141 of file alnmerger.hpp.

Referenced by x_Merge().

◆ m_MergeFlags

TMergeFlags CAlnMixMerger::m_MergeFlags
private

Definition at line 129 of file alnmerger.hpp.

Referenced by Merge(), x_Merge(), x_SecondRowFits(), and x_SetSeqFrame().

◆ m_Planes

TPlanes CAlnMixMerger::m_Planes
private

Definition at line 148 of file alnmerger.hpp.

Referenced by x_Merge().

◆ m_Rows

vector<CRef<CAlnMixSeq> >& CAlnMixMerger::m_Rows
private

Definition at line 136 of file alnmerger.hpp.

Referenced by Reset(), and x_CreateDenseg().

◆ m_Seqs

TSeqs& CAlnMixMerger::m_Seqs
private

Definition at line 135 of file alnmerger.hpp.

Referenced by Reset(), and x_Merge().

◆ m_SingleRefseq

bool CAlnMixMerger::m_SingleRefseq
private

Definition at line 143 of file alnmerger.hpp.

Referenced by Reset(), and x_Merge().

◆ x_CalculateScore

TCalcScoreMethod CAlnMixMerger::x_CalculateScore
private

Definition at line 146 of file alnmerger.hpp.


The documentation for this class was generated from the following files:
Modified on Wed May 29 18:37:25 2024 by modify_doxy.py rev. 669887