NCBI C++ ToolKit
|
Search Toolkit Book for CWGSDb_Impl::SAmbiguityInfo
Classes | |
struct | S4naBlock |
struct | S4naReader |
Public Types | |
enum | EBaseType { eBase_2na , eBase_4na , eBase_Gap } |
typedef CWGSDb_Impl::SSeqTableCursor | SSeqTableCursor |
typedef CWGSSeqIterator::TWGSContigGapInfo | TWGSContigGapInfo |
typedef map< TSeqPos, S4naBlock > | T4naBlocks |
![]() | |
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 | |
SAmbiguityInfo (TVDBRowId row_id, CWGSDb_Impl &db, SSeqTableCursor &cur) | |
~SAmbiguityInfo () | |
size_t | GetUsedMemory () const |
vector< Uint1 > | GetAmbiguityBytes (SSeqTableCursor &cur) |
TWGSContigGapInfo | GetGapInfo () const |
TSeqPos | Get2naLengthBlock (TSeqPos pos, TSeqPos len) const |
TSeqPos | Get4naLengthBlock (TSeqPos pos, TSeqPos len) const |
TSeqPos | Get2naLengthExact (TSeqPos pos, TSeqPos len, CWGSDb_Impl &db, SSeqTableCursor &cur) const |
TSeqPos | Get4naLengthExact (TSeqPos pos, TSeqPos len, TSeqPos stop_2na_len, TSeqPos stop_gap_len, CWGSDb_Impl &db, SSeqTableCursor &cur) const |
TSeqPos | GetGapLengthExact (TSeqPos pos, TSeqPos len, CWGSDb_Impl &db, SSeqTableCursor &cur) const |
CRef< CSeq_data > | Get2na (TSeqPos pos, TSeqPos len, SSeqTableCursor &cur) const |
CRef< CSeq_data > | Get4na (TSeqPos pos, TSeqPos len, CWGSDb_Impl &db, SSeqTableCursor &cur) const |
bool | x_AmbiguousBlock (size_t block_index) const |
void | x_SetAmbiguousBlock (size_t block_index) |
void | x_CalculateAmbiguityMask (CWGSDb_Impl &db) |
void | x_Calculate4na (CWGSDb_Impl &db) const |
void | x_Need4na (CWGSDb_Impl &db) const |
bool | x_AddAmbiguities (const Uint1 *ptr, TSeqPos count, TSeqPos pos, TWGSContigGapInfo &gap_info) const |
bool | x_AddAmbiguousBlock (const Uint1 *ptr, TSeqPos count, TSeqPos pos, TWGSContigGapInfo &gap_info) const |
bool | x_IsValid (const S4naReader &reader) const |
S4naReader | Get4naReader (TSeqPos pos, CWGSDb_Impl &db, SSeqTableCursor &cur) const |
EBaseType | GetBaseType (const S4naReader &reader) const |
void | Advance (S4naReader &reader) 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 |
Public Attributes | |
string | m_Prefix |
TVDBRowId | m_RowId |
CFastMutex | m_Mutex |
bool | m_HasGapInfo |
bool | m_HasAmbiguityMask |
bool | m_HasAmbiguityPos |
bool | m_Has4naBlocks |
vector< INSDC_coord_zero > | m_GapStart |
vector< INSDC_coord_len > | m_GapLen |
vector< NCBI_WGS_component_props > | m_GapProps |
vector< NCBI_WGS_gap_linkage > | m_GapLinkage |
vector< Uint1 > | m_AmbiguityMask |
vector< INSDC_coord_zero > | m_AmbiguityPos |
vector< INSDC_4na_bin > | m_Ambiguity4na |
T4naBlocks | m_4naBlocks |
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... | |
Definition at line 1065 of file wgsread.cpp.
Definition at line 1067 of file wgsread.cpp.
Definition at line 1146 of file wgsread.cpp.
Definition at line 1078 of file wgsread.cpp.
Enumerator | |
---|---|
eBase_2na | |
eBase_4na | |
eBase_Gap |
Definition at line 1157 of file wgsread.cpp.
CWGSDb_Impl::SAmbiguityInfo::SAmbiguityInfo | ( | TVDBRowId | row_id, |
CWGSDb_Impl & | db, | ||
SSeqTableCursor & | cur | ||
) |
Definition at line 1175 of file wgsread.cpp.
References bb, NStr::fWithCommas, GetUsedMemory(), i, kInvalidSeqPos, LOG_POST, m_Ambiguity4na, m_AmbiguityMask, m_AmbiguityPos, m_GapLen, m_GapLinkage, m_GapProps, m_GapStart, m_HasAmbiguityMask, m_HasAmbiguityPos, m_HasGapInfo, m_Mutex, m_Prefix, m_RowId, max(), NStr::NumericToString(), s_GetDebugLevel(), swap(), sx_Assign(), x_AmbiguousBlock(), x_CalculateAmbiguityMask(), and x_Need4na().
CWGSDb_Impl::SAmbiguityInfo::~SAmbiguityInfo | ( | ) |
Definition at line 1290 of file wgsread.cpp.
References NStr::fWithCommas, LOG_POST, NStr::NumericToString(), and s_GetDebugLevel().
void CWGSDb_Impl::SAmbiguityInfo::Advance | ( | S4naReader & | reader | ) | const |
Definition at line 1989 of file wgsread.cpp.
References _ASSERT, kAmbiguityBlockSize, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_4naBlocksIter, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_AmbiguityIndex, and CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_Pos.
CRef< CSeq_data > CWGSDb_Impl::SAmbiguityInfo::Get2na | ( | TSeqPos | pos, |
TSeqPos | len, | ||
SSeqTableCursor & | cur | ||
) | const |
Definition at line 2120 of file wgsread.cpp.
References data, len, CWGSDb_Impl::SSeqTableCursor::m_Cursor, CWGSDb_Impl::SSeqTableCursor::m_READ_2na, PROFILE, CVDBCursor::ReadElements(), CAliasBase< TPrim >::Set(), and CSeq_data_Base::SetNcbi2na().
Referenced by CWGSSeqIterator::SAmbiguityAccess::Get2na().
Definition at line 2167 of file wgsread.cpp.
References kAmbiguityBlockSize, len, and min().
TSeqPos CWGSDb_Impl::SAmbiguityInfo::Get2naLengthExact | ( | TSeqPos | pos, |
TSeqPos | len, | ||
CWGSDb_Impl & | db, | ||
SSeqTableCursor & | cur | ||
) | const |
Definition at line 2025 of file wgsread.cpp.
References kAmbiguityBlockSize, len, min(), PROFILE, and sx_Find_4na_Ambiguity().
Referenced by CWGSSeqIterator::SAmbiguityAccess::Get2naLengthExact().
CRef< CSeq_data > CWGSDb_Impl::SAmbiguityInfo::Get4na | ( | TSeqPos | pos, |
TSeqPos | len, | ||
CWGSDb_Impl & | db, | ||
SSeqTableCursor & | cur | ||
) | const |
Definition at line 2137 of file wgsread.cpp.
References data, len, PROFILE, s_Convert_2na_to_4na(), s_SetAmbiguitiesBlocks(), s_SetAmbiguitiesPos(), s_SetGaps(), CAliasBase< TPrim >::Set(), and CSeq_data_Base::SetNcbi4na().
Referenced by CWGSSeqIterator::SAmbiguityAccess::Get4na().
Definition at line 2183 of file wgsread.cpp.
References kAmbiguityBlockSize, len, and min().
TSeqPos CWGSDb_Impl::SAmbiguityInfo::Get4naLengthExact | ( | TSeqPos | pos, |
TSeqPos | len, | ||
TSeqPos | stop_2na_len, | ||
TSeqPos | stop_gap_len, | ||
CWGSDb_Impl & | db, | ||
SSeqTableCursor & | cur | ||
) | const |
Definition at line 2058 of file wgsread.cpp.
References _ASSERT, kRecoverGaps, len, and PROFILE.
Referenced by CWGSSeqIterator::SAmbiguityAccess::Get4naLengthExact().
CWGSDb_Impl::SAmbiguityInfo::S4naReader CWGSDb_Impl::SAmbiguityInfo::Get4naReader | ( | TSeqPos | pos, |
CWGSDb_Impl & | db, | ||
SSeqTableCursor & | cur | ||
) | const |
Definition at line 1933 of file wgsread.cpp.
References kAmbiguityBlockSize, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_4naBlocksIter, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_AmbiguityIndex, and CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_Pos.
|
inline |
Definition at line 1074 of file wgsread.cpp.
References m_AmbiguityMask.
Referenced by CWGSSeqIterator::SAmbiguityAccess::GetAmbiguityBytes().
CWGSDb_Impl::SAmbiguityInfo::EBaseType CWGSDb_Impl::SAmbiguityInfo::GetBaseType | ( | const S4naReader & | reader | ) | const |
Definition at line 1954 of file wgsread.cpp.
References _ASSERT, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_4naBlocksIter, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_AmbiguityIndex, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_Pos, offset, sx_Get_4na(), and sx_Is2na().
CWGSDb_Impl::SAmbiguityInfo::TWGSContigGapInfo CWGSDb_Impl::SAmbiguityInfo::GetGapInfo | ( | ) | const |
Definition at line 1323 of file wgsread.cpp.
References CWGSSeqIterator::SWGSContigGapInfo::gaps_count, CWGSSeqIterator::SWGSContigGapInfo::gaps_len, CWGSSeqIterator::SWGSContigGapInfo::gaps_linkage, CWGSSeqIterator::SWGSContigGapInfo::gaps_props, and CWGSSeqIterator::SWGSContigGapInfo::gaps_start.
Referenced by CWGSSeqIterator::GetGapInfo().
TSeqPos CWGSDb_Impl::SAmbiguityInfo::GetGapLengthExact | ( | TSeqPos | pos, |
TSeqPos | len, | ||
CWGSDb_Impl & | db, | ||
SSeqTableCursor & | cur | ||
) | const |
Definition at line 2101 of file wgsread.cpp.
Referenced by CWGSSeqIterator::SAmbiguityAccess::GetGapLengthExact().
size_t CWGSDb_Impl::SAmbiguityInfo::GetUsedMemory | ( | void | ) | const |
Definition at line 1301 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
bool CWGSDb_Impl::SAmbiguityInfo::x_AddAmbiguities | ( | const Uint1 * | ptr, |
TSeqPos | count, | ||
TSeqPos | pos, | ||
TWGSContigGapInfo & | gap_info | ||
) | const |
Definition at line 1709 of file wgsread.cpp.
References b, count, CWGSSeqIterator::SWGSContigGapInfo::GetDataLength(), CWGSSeqIterator::SWGSContigGapInfo::GetGapLength(), i, CWGSSeqIterator::SWGSContigGapInfo::IsInGap(), CWGSSeqIterator::SWGSContigGapInfo::SetPos(), and sx_Is2na().
bool CWGSDb_Impl::SAmbiguityInfo::x_AddAmbiguousBlock | ( | const Uint1 * | ptr, |
TSeqPos | count, | ||
TSeqPos | pos, | ||
TWGSContigGapInfo & | gap_info | ||
) | const |
Definition at line 1698 of file wgsread.cpp.
References count, s_Pack_4na(), and sx_HasAmbiguity().
|
inline |
Definition at line 1097 of file wgsread.cpp.
References m_AmbiguityMask.
Referenced by SAmbiguityInfo().
void CWGSDb_Impl::SAmbiguityInfo::x_Calculate4na | ( | CWGSDb_Impl & | db | ) | const |
Definition at line 1834 of file wgsread.cpp.
References CVDBValueFor< V >::data(), NStr::fWithCommas, i, kAmbiguityBlockSize, LOG_POST, min(), NStr::NumericToString(), PROFILE, CGuard< Resource, Lock, Unlock, ReportExceptions >::Release(), s_GetDebugLevel(), s_UseFull4naBlocks(), CWGSDb_Impl::Seq4na(), CWGSSeqIterator::SWGSContigGapInfo::SetPos(), and CVDBValue::size().
Referenced by x_Need4na().
void CWGSDb_Impl::SAmbiguityInfo::x_CalculateAmbiguityMask | ( | CWGSDb_Impl & | db | ) |
Definition at line 1741 of file wgsread.cpp.
References bb, CVDBValueFor< V >::data(), NStr::fWithCommas, i, kAmbiguityBlockSize, LOG_POST, min(), NStr::NumericToString(), PROFILE, s_GetDebugLevel(), s_UseFull4naBlocks(), CWGSDb_Impl::Seq4na(), and CVDBValue::size().
Referenced by SAmbiguityInfo().
bool CWGSDb_Impl::SAmbiguityInfo::x_IsValid | ( | const S4naReader & | reader | ) | const |
Definition at line 1915 of file wgsread.cpp.
References _ASSERT, kAmbiguityBlockSize, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_4naBlocksIter, CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_AmbiguityIndex, and CWGSDb_Impl::SAmbiguityInfo::S4naReader::m_Pos.
|
inline |
Definition at line 1111 of file wgsread.cpp.
References m_Has4naBlocks, m_HasAmbiguityPos, and x_Calculate4na().
Referenced by SAmbiguityInfo().
|
inline |
Definition at line 1103 of file wgsread.cpp.
References m_AmbiguityMask.
|
mutable |
Definition at line 1147 of file wgsread.cpp.
|
mutable |
Definition at line 1139 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
vector<Uint1> CWGSDb_Impl::SAmbiguityInfo::m_AmbiguityMask |
Definition at line 1137 of file wgsread.cpp.
Referenced by GetAmbiguityBytes(), SAmbiguityInfo(), x_AmbiguousBlock(), and x_SetAmbiguousBlock().
|
mutable |
Definition at line 1138 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
vector<INSDC_coord_len> CWGSDb_Impl::SAmbiguityInfo::m_GapLen |
Definition at line 1133 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
vector<NCBI_WGS_gap_linkage> CWGSDb_Impl::SAmbiguityInfo::m_GapLinkage |
Definition at line 1135 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
vector<NCBI_WGS_component_props> CWGSDb_Impl::SAmbiguityInfo::m_GapProps |
Definition at line 1134 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
vector<INSDC_coord_zero> CWGSDb_Impl::SAmbiguityInfo::m_GapStart |
Definition at line 1132 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
|
mutable |
Definition at line 1130 of file wgsread.cpp.
Referenced by x_Need4na().
bool CWGSDb_Impl::SAmbiguityInfo::m_HasAmbiguityMask |
Definition at line 1128 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
|
mutable |
Definition at line 1129 of file wgsread.cpp.
Referenced by SAmbiguityInfo(), and x_Need4na().
bool CWGSDb_Impl::SAmbiguityInfo::m_HasGapInfo |
Definition at line 1127 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
|
mutable |
Definition at line 1125 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
string CWGSDb_Impl::SAmbiguityInfo::m_Prefix |
Definition at line 1122 of file wgsread.cpp.
Referenced by SAmbiguityInfo().
TVDBRowId CWGSDb_Impl::SAmbiguityInfo::m_RowId |
Definition at line 1123 of file wgsread.cpp.
Referenced by SAmbiguityInfo().