NCBI C++ ToolKit
|
Search Toolkit Book for CAlnMix
#include <objtools/alnmgr/alnmix.hpp>
Public Types | |
enum | EAddFlags { fCalcScore = 0x01 , fForceTranslation = 0x02 , fPreserveRows = 0x04 } |
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 | TAddFlags |
typedef vector< CConstRef< CDense_seg > > | TConstDSs |
typedef vector< CConstRef< CSeq_align > > | TConstAlns |
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< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Member Functions | |
CAlnMix (void) | |
CAlnMix (CScope &scope, TCalcScoreMethod calc_score=0) | |
~CAlnMix (void) | |
void | Add (const CDense_seg &ds, TAddFlags flags=0) |
void | Add (const CSeq_align &aln, TAddFlags flags=0) |
CScope & | GetScope (void) const |
const TConstDSs & | GetInputDensegs (void) const |
const TConstAlns & | GetInputSeqAligns (void) const |
void | Merge (TMergeFlags flags=0) |
const CDense_seg & | GetDenseg (void) const |
const CSeq_align & | GetSeqAlign (void) const |
Public Member Functions inherited from CObject | |
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... | |
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 | |
typedef map< void *, CConstRef< CDense_seg > > | TConstDSsMap |
typedef map< void *, CConstRef< CSeq_align > > | TConstAlnsMap |
Private Member Functions | |
CAlnMix (const CAlnMix &value) | |
CAlnMix & | operator= (const CAlnMix &value) |
void | x_Init (void) |
void | x_Reset (void) |
virtual void | ChooseSeqId (CSeq_id &id1, const CSeq_id &id2) |
CRef< CDense_seg > | x_ExtendDSWithWidths (const CDense_seg &ds) |
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... | |
ITaskProgressCallback * | x_GetTaskProgressCallback () const |
Callback accessor. More... | |
Definition at line 51 of file alnmix.hpp.
typedef int CAlnMix::TAddFlags |
Definition at line 82 of file alnmix.hpp.
typedef CAlnMixMatches::TCalcScoreMethod CAlnMix::TCalcScoreMethod |
Definition at line 58 of file alnmix.hpp.
typedef vector<CConstRef<CSeq_align> > CAlnMix::TConstAlns |
Definition at line 91 of file alnmix.hpp.
|
private |
Definition at line 134 of file alnmix.hpp.
typedef vector<CConstRef<CDense_seg> > CAlnMix::TConstDSs |
Definition at line 90 of file alnmix.hpp.
|
private |
Definition at line 133 of file alnmix.hpp.
typedef int CAlnMix::TMergeFlags |
Definition at line 114 of file alnmix.hpp.
enum CAlnMix::EAddFlags |
Enumerator | |
---|---|
fCalcScore | |
fForceTranslation | |
fPreserveRows |
Definition at line 69 of file alnmix.hpp.
enum CAlnMix::EMergeFlags |
Enumerator | |
---|---|
fTruncateOverlaps | |
fNegativeStrand | |
fGapJoin | |
fMinGap | |
fRemoveLeadTrailGaps | |
fSortSeqsByScore | |
fSortInputByScore | |
fQuerySeqMergeOnly | |
fFillUnalignedRegions | |
fAllowTranslocation |
Definition at line 100 of file alnmix.hpp.
CAlnMix::CAlnMix | ( | void | ) |
Definition at line 52 of file alnmix.cpp.
References x_Init().
CAlnMix::CAlnMix | ( | CScope & | scope, |
TCalcScoreMethod | calc_score = 0 |
||
) |
Definition at line 59 of file alnmix.cpp.
References CAlnVec::CalculateScore(), x_CalculateScore, and x_Init().
CAlnMix::~CAlnMix | ( | void | ) |
Definition at line 71 of file alnmix.cpp.
void CAlnMix::Add | ( | const CDense_seg & | ds, |
TAddFlags | flags = 0 |
||
) |
Definition at line 120 of file alnmix.cpp.
References CAlnMixMatches::Add(), CAlnMixSequences::Add(), CAlnVec::CalculateScore(), map_checker< Container >::end(), fCalcScore, fForceTranslation, map_checker< Container >::find(), flags, CDense_seg::IsSetWidths(), m_AddFlags, m_AlnMixMatches, m_AlnMixSequences, m_InputDSs, m_InputDSsMap, m_Scope, NCBI_THROW, NStr::NumericToString(), string, CDense_seg::Validate(), x_CalculateScore, x_ExtendDSWithWidths(), and x_Reset().
Referenced by Add(), CAlnMrgApp::AddAlnToMix(), CBuildAlnVecJob::Build(), BuildAlignDataSource(), CSampleAlnmgrApplication::Run(), s_SetAirrAlignmentInfo(), CAlignCleanup::x_Cleanup_AlignVec(), CAnnotCompare_AlignDS::x_Init(), and CPhyTreeCalc::x_InitAlignDS().
void CAlnMix::Add | ( | const CSeq_align & | aln, |
TAddFlags | flags = 0 |
||
) |
Definition at line 95 of file alnmix.cpp.
References Add(), CSeq_align::CreateDensegFromStdseg(), map_checker< Container >::end(), map_checker< Container >::find(), flags, CSeq_align_set_Base::Get(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::C_Segs::GetDisc(), CSeq_align_Base::GetSegs(), CSeq_align_Base::C_Segs::IsDenseg(), CSeq_align_Base::C_Segs::IsDisc(), CSeq_align_Base::C_Segs::IsStd(), ITERATE, m_InputAlns, m_InputAlnsMap, and m_Scope.
Implements CSeq_align::SSeqIdChooser.
Definition at line 229 of file alnmix.cpp.
References CSeq_id::AsFastaString(), CSeq_id::BestRank(), ERR_POST, CTextseq_id_Base::GetAccession(), CSeq_id_Base::GetGi(), CSeq_id::GetTextseq_Id(), CSeq_id_Base::IsGi(), CTextseq_id_Base::IsSetVersion(), m_AlnMixSequences, CAlnMixSeq::m_BioseqHandle, NCBI_THROW, CSeq_id_Base::Reset(), string, and CAlnMixSequences::x_IdentifyAlnMixSeq().
const CDense_seg & CAlnMix::GetDenseg | ( | void | ) | const |
Definition at line 295 of file alnmix.cpp.
References CAlnMixMerger::GetDenseg(), and m_AlnMixMerger.
Referenced by CBuildAlnVecJob::Build(), BuildAlignDataSource(), CAlnMrgApp::PrintMergedAln(), CSampleAlnmgrApplication::Run(), s_SetAirrAlignmentInfo(), CAlnMrgApp::ViewMergedAln(), CAlignCleanup::x_Cleanup_AlignVec(), and CAlignDataSource::x_Init().
|
inline |
Definition at line 174 of file alnmix.hpp.
References m_InputDSs.
|
inline |
Definition at line 181 of file alnmix.hpp.
References m_InputAlns.
Referenced by CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile().
|
inline |
Definition at line 167 of file alnmix.hpp.
Referenced by CBuildAlnVecJob::Build(), and CAlignDataSource::x_Init().
const CSeq_align & CAlnMix::GetSeqAlign | ( | void | ) | const |
Definition at line 302 of file alnmix.cpp.
References CAlnMixMerger::GetSeqAlign(), and m_AlnMixMerger.
Referenced by CAlnMrgApp::PrintMergedAln(), CAlignCleanup::x_Cleanup_AlignVec(), CAnnotCompare_AlignDS::x_Init(), CPhyTreeCalc::x_InitAlignDS(), and CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile().
void CAlnMix::Merge | ( | TMergeFlags | flags = 0 | ) |
Definition at line 273 of file alnmix.cpp.
References flags, fSortInputByScore, fSortSeqsByScore, m_AlnMixMatches, m_AlnMixMerger, m_AlnMixSequences, CAlnMixMerger::Merge(), CTaskProgressReporter::SetTaskProgressCallback(), CAlnMixMatches::SortByChainScore(), CAlnMixSequences::SortByChainScore(), CAlnMixMatches::SortByScore(), CAlnMixSequences::SortByScore(), CTaskProgressReporter::x_GetTaskProgressCallback(), and CTaskProgressReporter::x_SetTaskName().
Referenced by CBuildAlnVecJob::Build(), BuildAlignDataSource(), CAlnMrgApp::Run(), CSampleAlnmgrApplication::Run(), s_SetAirrAlignmentInfo(), CAlignCleanup::x_Cleanup_AlignVec(), CAnnotCompare_AlignDS::x_Init(), CAlignDataSource::x_Init(), CPhyTreeCalc::x_InitAlignDS(), and CXcompareAnnotsApplication::x_ProcessSeqAlignSetFromFile().
|
private |
Definition at line 171 of file alnmix.cpp.
References CDense_seg::Assign(), CDense_seg_Base::GetDim(), CDense_seg_Base::GetIds(), CDense_seg_Base::GetLens(), CDense_seg_Base::GetNumseg(), NStr::IntToString(), CDense_seg::IsSetWidths(), m_AlnMixSequences, CAlnMixSeq::m_IsAA, NCBI_THROW, CDense_seg_Base::SetLens(), CDense_seg::SetWidths(), string, CDense_seg::Validate(), and CAlnMixSequences::x_IdentifyAlnMixSeq().
Referenced by Add().
|
private |
Definition at line 77 of file alnmix.cpp.
References CRef< C, Locker >::IsNull(), m_AlnMixMatches, m_AlnMixMerger, m_AlnMixSequences, m_Scope, and x_CalculateScore.
Referenced by CAlnMix().
|
private |
Definition at line 88 of file alnmix.cpp.
References m_AlnMixMerger, and CAlnMixMerger::Reset().
Referenced by Add().
|
private |
Definition at line 153 of file alnmix.hpp.
Referenced by Add().
|
private |
Definition at line 156 of file alnmix.hpp.
|
private |
Definition at line 157 of file alnmix.hpp.
Referenced by GetDenseg(), GetSeqAlign(), Merge(), x_Init(), and x_Reset().
|
private |
Definition at line 155 of file alnmix.hpp.
Referenced by Add(), ChooseSeqId(), Merge(), x_ExtendDSWithWidths(), and x_Init().
|
private |
Definition at line 149 of file alnmix.hpp.
Referenced by Add(), and GetInputSeqAligns().
|
private |
Definition at line 151 of file alnmix.hpp.
Referenced by Add().
|
private |
Definition at line 148 of file alnmix.hpp.
Referenced by Add(), and GetInputDensegs().
|
private |
Definition at line 150 of file alnmix.hpp.
Referenced by Add().
Definition at line 146 of file alnmix.hpp.
|
private |
Definition at line 147 of file alnmix.hpp.