NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
CWGSDb_Impl::SAmbiguityInfo Struct Reference

Search Toolkit Book for CWGSDb_Impl::SAmbiguityInfo

+ Inheritance diagram for CWGSDb_Impl::SAmbiguityInfo:
+ Collaboration diagram 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, S4naBlockT4naBlocks
 
- 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

 SAmbiguityInfo (TVDBRowId row_id, CWGSDb_Impl &db, SSeqTableCursor &cur)
 
 ~SAmbiguityInfo ()
 
size_t GetUsedMemory () const
 
vector< Uint1GetAmbiguityBytes (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_dataGet2na (TSeqPos pos, TSeqPos len, SSeqTableCursor &cur) const
 
CRef< CSeq_dataGet4na (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
 
- 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 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_zerom_GapStart
 
vector< INSDC_coord_lenm_GapLen
 
vector< NCBI_WGS_component_propsm_GapProps
 
vector< NCBI_WGS_gap_linkagem_GapLinkage
 
vector< Uint1m_AmbiguityMask
 
vector< INSDC_coord_zerom_AmbiguityPos
 
vector< INSDC_4na_bin > m_Ambiguity4na
 
T4naBlocks m_4naBlocks
 

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

Detailed Description

Definition at line 1065 of file wgsread.cpp.

Member Typedef Documentation

◆ SSeqTableCursor

Definition at line 1067 of file wgsread.cpp.

◆ T4naBlocks

Definition at line 1146 of file wgsread.cpp.

◆ TWGSContigGapInfo

Definition at line 1078 of file wgsread.cpp.

Member Enumeration Documentation

◆ EBaseType

Enumerator
eBase_2na 
eBase_4na 
eBase_Gap 

Definition at line 1157 of file wgsread.cpp.

Constructor & Destructor Documentation

◆ SAmbiguityInfo()

CWGSDb_Impl::SAmbiguityInfo::SAmbiguityInfo ( TVDBRowId  row_id,
CWGSDb_Impl db,
SSeqTableCursor cur 
)

◆ ~SAmbiguityInfo()

CWGSDb_Impl::SAmbiguityInfo::~SAmbiguityInfo ( )

Definition at line 1290 of file wgsread.cpp.

References NStr::fWithCommas, LOG_POST, NStr::NumericToString(), and s_GetDebugLevel().

Member Function Documentation

◆ Advance()

void CWGSDb_Impl::SAmbiguityInfo::Advance ( S4naReader reader) const

◆ Get2na()

CRef< CSeq_data > CWGSDb_Impl::SAmbiguityInfo::Get2na ( TSeqPos  pos,
TSeqPos  len,
SSeqTableCursor cur 
) const

◆ Get2naLengthBlock()

TSeqPos CWGSDb_Impl::SAmbiguityInfo::Get2naLengthBlock ( TSeqPos  pos,
TSeqPos  len 
) const

Definition at line 2167 of file wgsread.cpp.

References kAmbiguityBlockSize, len, and min().

◆ Get2naLengthExact()

TSeqPos CWGSDb_Impl::SAmbiguityInfo::Get2naLengthExact ( TSeqPos  pos,
TSeqPos  len,
CWGSDb_Impl db,
SSeqTableCursor cur 
) const

◆ Get4na()

CRef< CSeq_data > CWGSDb_Impl::SAmbiguityInfo::Get4na ( TSeqPos  pos,
TSeqPos  len,
CWGSDb_Impl db,
SSeqTableCursor cur 
) const

◆ Get4naLengthBlock()

TSeqPos CWGSDb_Impl::SAmbiguityInfo::Get4naLengthBlock ( TSeqPos  pos,
TSeqPos  len 
) const

Definition at line 2183 of file wgsread.cpp.

References kAmbiguityBlockSize, len, and min().

◆ Get4naLengthExact()

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

◆ Get4naReader()

CWGSDb_Impl::SAmbiguityInfo::S4naReader CWGSDb_Impl::SAmbiguityInfo::Get4naReader ( TSeqPos  pos,
CWGSDb_Impl db,
SSeqTableCursor cur 
) const

◆ GetAmbiguityBytes()

vector<Uint1> CWGSDb_Impl::SAmbiguityInfo::GetAmbiguityBytes ( SSeqTableCursor cur)
inline

Definition at line 1074 of file wgsread.cpp.

References m_AmbiguityMask.

Referenced by CWGSSeqIterator::SAmbiguityAccess::GetAmbiguityBytes().

◆ GetBaseType()

CWGSDb_Impl::SAmbiguityInfo::EBaseType CWGSDb_Impl::SAmbiguityInfo::GetBaseType ( const S4naReader reader) const

◆ GetGapInfo()

CWGSDb_Impl::SAmbiguityInfo::TWGSContigGapInfo CWGSDb_Impl::SAmbiguityInfo::GetGapInfo ( ) const

◆ GetGapLengthExact()

TSeqPos CWGSDb_Impl::SAmbiguityInfo::GetGapLengthExact ( TSeqPos  pos,
TSeqPos  len,
CWGSDb_Impl db,
SSeqTableCursor cur 
) const

Definition at line 2101 of file wgsread.cpp.

References len, and PROFILE.

Referenced by CWGSSeqIterator::SAmbiguityAccess::GetGapLengthExact().

◆ GetUsedMemory()

size_t CWGSDb_Impl::SAmbiguityInfo::GetUsedMemory ( void  ) const

Definition at line 1301 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ x_AddAmbiguities()

bool CWGSDb_Impl::SAmbiguityInfo::x_AddAmbiguities ( const Uint1 ptr,
TSeqPos  count,
TSeqPos  pos,
TWGSContigGapInfo gap_info 
) const

◆ x_AddAmbiguousBlock()

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 s_Pack_4na(), and sx_HasAmbiguity().

◆ x_AmbiguousBlock()

bool CWGSDb_Impl::SAmbiguityInfo::x_AmbiguousBlock ( size_t  block_index) const
inline

Definition at line 1097 of file wgsread.cpp.

References m_AmbiguityMask.

Referenced by SAmbiguityInfo().

◆ x_Calculate4na()

void CWGSDb_Impl::SAmbiguityInfo::x_Calculate4na ( CWGSDb_Impl db) const

◆ x_CalculateAmbiguityMask()

void CWGSDb_Impl::SAmbiguityInfo::x_CalculateAmbiguityMask ( CWGSDb_Impl db)

◆ x_IsValid()

bool CWGSDb_Impl::SAmbiguityInfo::x_IsValid ( const S4naReader reader) const

◆ x_Need4na()

void CWGSDb_Impl::SAmbiguityInfo::x_Need4na ( CWGSDb_Impl db) const
inline

Definition at line 1111 of file wgsread.cpp.

References m_Has4naBlocks, m_HasAmbiguityPos, and x_Calculate4na().

Referenced by SAmbiguityInfo().

◆ x_SetAmbiguousBlock()

void CWGSDb_Impl::SAmbiguityInfo::x_SetAmbiguousBlock ( size_t  block_index)
inline

Definition at line 1103 of file wgsread.cpp.

References m_AmbiguityMask.

Member Data Documentation

◆ m_4naBlocks

T4naBlocks CWGSDb_Impl::SAmbiguityInfo::m_4naBlocks
mutable

Definition at line 1147 of file wgsread.cpp.

◆ m_Ambiguity4na

vector<INSDC_4na_bin> CWGSDb_Impl::SAmbiguityInfo::m_Ambiguity4na
mutable

Definition at line 1139 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_AmbiguityMask

vector<Uint1> CWGSDb_Impl::SAmbiguityInfo::m_AmbiguityMask

◆ m_AmbiguityPos

vector<INSDC_coord_zero> CWGSDb_Impl::SAmbiguityInfo::m_AmbiguityPos
mutable

Definition at line 1138 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_GapLen

vector<INSDC_coord_len> CWGSDb_Impl::SAmbiguityInfo::m_GapLen

Definition at line 1133 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_GapLinkage

vector<NCBI_WGS_gap_linkage> CWGSDb_Impl::SAmbiguityInfo::m_GapLinkage

Definition at line 1135 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_GapProps

vector<NCBI_WGS_component_props> CWGSDb_Impl::SAmbiguityInfo::m_GapProps

Definition at line 1134 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_GapStart

vector<INSDC_coord_zero> CWGSDb_Impl::SAmbiguityInfo::m_GapStart

Definition at line 1132 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_Has4naBlocks

bool CWGSDb_Impl::SAmbiguityInfo::m_Has4naBlocks
mutable

Definition at line 1130 of file wgsread.cpp.

Referenced by x_Need4na().

◆ m_HasAmbiguityMask

bool CWGSDb_Impl::SAmbiguityInfo::m_HasAmbiguityMask

Definition at line 1128 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_HasAmbiguityPos

bool CWGSDb_Impl::SAmbiguityInfo::m_HasAmbiguityPos
mutable

Definition at line 1129 of file wgsread.cpp.

Referenced by SAmbiguityInfo(), and x_Need4na().

◆ m_HasGapInfo

bool CWGSDb_Impl::SAmbiguityInfo::m_HasGapInfo

Definition at line 1127 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_Mutex

CFastMutex CWGSDb_Impl::SAmbiguityInfo::m_Mutex
mutable

Definition at line 1125 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_Prefix

string CWGSDb_Impl::SAmbiguityInfo::m_Prefix

Definition at line 1122 of file wgsread.cpp.

Referenced by SAmbiguityInfo().

◆ m_RowId

TVDBRowId CWGSDb_Impl::SAmbiguityInfo::m_RowId

Definition at line 1123 of file wgsread.cpp.

Referenced by SAmbiguityInfo().


The documentation for this struct was generated from the following file:
Modified on Wed Apr 17 13:10:49 2024 by modify_doxy.py rev. 669887