NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
CCSraDb_Impl Class Reference

Search Toolkit Book for CCSraDb_Impl

#include <sra/readers/sra/csraread.hpp>

+ Inheritance diagram for CCSraDb_Impl:
+ Collaboration diagram for CCSraDb_Impl:

Classes

struct  SAlnTableCursor
 
struct  SRefInfo
 
struct  SRefTableCursor
 
struct  SSeqTableCursor
 

Public Types

typedef list< SRefInfoTRefInfoList
 
typedef map< string, TRefInfoList::iterator, PNocaseTRefInfoMapByName
 
typedef map< CSeq_id_Handle, TRefInfoList::iterator > TRefInfoMapBySeq_id
 
typedef vector< stringTSpotGroups
 
- 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 Types inherited from SCSraDb_Defs
enum  ERefIdType { eRefId_SEQ_ID , eRefId_gnl_NAME }
 
enum  EPathInIdType { ePathInId_config , ePathInId_yes , ePathInId_no }
 
enum  EAlignType { fPrimaryAlign = 1<<0 , fSecondaryAlign = 1<<1 , fAnyAlign = fPrimaryAlign | fSecondaryAlign }
 
typedef EAlignType TAlignType
 

Public Member Functions

 CCSraDb_Impl (CVDBMgr &mgr, const string &csra_path, IIdMapper *ref_id_mapper, ERefIdType ref_id_type, const string &sra_id_part)
 
virtual ~CCSraDb_Impl (void)
 
const TRefInfoListGetRefInfoList (void) const
 
const TRefInfoMapByNameGetRefInfoMapByName (void) const
 
const TRefInfoMapBySeq_idGetRefInfoMapBySeq_id (void) const
 
TSeqPos GetRowSize (void) const
 
void GetSpotGroups (TSpotGroups &spot_groups)
 
const stringGetCSraPath (void) const
 
const stringGetSraIdPart (void) const
 
void SetSraIdPart (const string &s)
 
CRef< CSeq_idMakeShortReadId (TVDBRowId id1, INSDC_coord_one id2) const
 
void SetShortReadId (string &str, TVDBRowId id1, INSDC_coord_one id2) 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
 

Protected Member Functions

void x_CalcSeqLength (const SRefInfo &info)
 
CRef< SRefTableCursorRef (void)
 
CRef< SAlnTableCursorAln (bool is_secondary)
 
CRef< SSeqTableCursorSeq (void)
 
void Put (CRef< SRefTableCursor > &curs)
 
void Put (CRef< SAlnTableCursor > &curs)
 
void Put (CRef< SSeqTableCursor > &curs)
 
void OpenRefTable (void)
 
void OpenAlnTable (bool is_secondary)
 
void OpenSeqTable (void)
 
const CVDBTableRefTable (void)
 
const CVDBTableAlnTable (bool is_secondary)
 
const CVDBTableSeqTable (void)
 
void x_MakeRefSeq_ids (SRefInfo &info, IIdMapper *ref_id_mapper, int ref_id_type)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Attributes

CVDBMgr m_Mgr
 
CVDB m_Db
 
string m_CSraPath
 
string m_SraIdPart
 
CFastMutex m_TableMutex
 
CFastMutex m_OverlapMutex
 
CVDBTable m_RefTable
 
CVDBTable m_AlnTable [2]
 
CVDBTable m_SeqTable
 
CVDBObjectCache< SRefTableCursorm_Ref
 
CVDBObjectCache< SAlnTableCursorm_Aln [2]
 
CVDBObjectCache< SSeqTableCursorm_Seq
 
TSeqPos m_RowSize
 
TRefInfoList m_RefList
 
TRefInfoMapByName m_RefMapByName
 
TRefInfoMapBySeq_id m_RefMapBySeq_id
 

Friends

class CCSraRefSeqIterator
 
class CCSraAlignIterator
 
class CCSraShortReadIterator
 
struct SSeqTableCursor
 

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

Detailed Description

Definition at line 87 of file csraread.hpp.

Member Typedef Documentation

◆ TRefInfoList

Definition at line 115 of file csraread.hpp.

◆ TRefInfoMapByName

typedef map<string, TRefInfoList::iterator, PNocase> CCSraDb_Impl::TRefInfoMapByName

Definition at line 116 of file csraread.hpp.

◆ TRefInfoMapBySeq_id

typedef map<CSeq_id_Handle, TRefInfoList::iterator> CCSraDb_Impl::TRefInfoMapBySeq_id

Definition at line 117 of file csraread.hpp.

◆ TSpotGroups

Definition at line 133 of file csraread.hpp.

Constructor & Destructor Documentation

◆ CCSraDb_Impl()

CCSraDb_Impl::CCSraDb_Impl ( CVDBMgr mgr,
const string csra_path,
IIdMapper ref_id_mapper,
ERefIdType  ref_id_type,
const string sra_id_part 
)

◆ ~CCSraDb_Impl()

CCSraDb_Impl::~CCSraDb_Impl ( void  )
virtual

Definition at line 374 of file csraread.cpp.

Member Function Documentation

◆ Aln()

CRef< CCSraDb_Impl::SAlnTableCursor > CCSraDb_Impl::Aln ( bool  is_secondary)
protected

◆ AlnTable()

const CVDBTable& CCSraDb_Impl::AlnTable ( bool  is_secondary)
inlineprotected

Definition at line 186 of file csraread.hpp.

References m_AlnTable, OpenAlnTable(), and table.

Referenced by Aln().

◆ GetCSraPath()

const string& CCSraDb_Impl::GetCSraPath ( void  ) const
inline

Definition at line 136 of file csraread.hpp.

References m_CSraPath.

Referenced by OpenSeqTable().

◆ GetRefInfoList()

const TRefInfoList& CCSraDb_Impl::GetRefInfoList ( void  ) const
inline

Definition at line 119 of file csraread.hpp.

References m_RefList.

◆ GetRefInfoMapByName()

const TRefInfoMapByName& CCSraDb_Impl::GetRefInfoMapByName ( void  ) const
inline

Definition at line 122 of file csraread.hpp.

References m_RefMapByName.

◆ GetRefInfoMapBySeq_id()

const TRefInfoMapBySeq_id& CCSraDb_Impl::GetRefInfoMapBySeq_id ( void  ) const
inline

Definition at line 125 of file csraread.hpp.

References m_RefMapBySeq_id.

◆ GetRowSize()

TSeqPos CCSraDb_Impl::GetRowSize ( void  ) const
inline

◆ GetSpotGroups()

void CCSraDb_Impl::GetSpotGroups ( TSpotGroups spot_groups)

Definition at line 424 of file csraread.cpp.

References i, m_Db, and names.

Referenced by CCSraDb::GetSpotGroups().

◆ GetSraIdPart()

const string& CCSraDb_Impl::GetSraIdPart ( void  ) const
inline

Definition at line 140 of file csraread.hpp.

References m_SraIdPart.

◆ MakeShortReadId()

CRef< CSeq_id > CCSraDb_Impl::MakeShortReadId ( TVDBRowId  id1,
INSDC_coord_one  id2 
) const

◆ OpenAlnTable()

void CCSraDb_Impl::OpenAlnTable ( bool  is_secondary)
protected

Definition at line 512 of file csraread.cpp.

References m_AlnTable, m_Db, and m_TableMutex.

Referenced by AlnTable().

◆ OpenRefTable()

void CCSraDb_Impl::OpenRefTable ( void  )
protected

Definition at line 503 of file csraread.cpp.

References m_Db, m_RefTable, and m_TableMutex.

Referenced by RefTable().

◆ OpenSeqTable()

void CCSraDb_Impl::OpenSeqTable ( void  )
protected

Definition at line 523 of file csraread.cpp.

References GetCSraPath(), m_Db, m_Mgr, m_SeqTable, and m_TableMutex.

Referenced by SeqTable().

◆ Put() [1/3]

void CCSraDb_Impl::Put ( CRef< SAlnTableCursor > &  curs)
protected

Definition at line 576 of file csraread.cpp.

References m_Aln.

◆ Put() [2/3]

void CCSraDb_Impl::Put ( CRef< SRefTableCursor > &  curs)
protected

◆ Put() [3/3]

void CCSraDb_Impl::Put ( CRef< SSeqTableCursor > &  curs)
protected

Definition at line 584 of file csraread.cpp.

References m_Seq.

◆ Ref()

CRef< CCSraDb_Impl::SRefTableCursor > CCSraDb_Impl::Ref ( void  )
protected

Definition at line 537 of file csraread.cpp.

References m_Ref, and RefTable().

Referenced by CCSraDb_Impl(), and x_CalcSeqLength().

◆ RefTable()

const CVDBTable& CCSraDb_Impl::RefTable ( void  )
inlineprotected

Definition at line 179 of file csraread.hpp.

References m_RefTable, OpenRefTable(), and table.

Referenced by Ref().

◆ Seq()

CRef< CCSraDb_Impl::SSeqTableCursor > CCSraDb_Impl::Seq ( void  )
protected

Definition at line 559 of file csraread.cpp.

References m_Seq, SeqTable(), and SSeqTableCursor.

Referenced by CCSraShortReadIterator::x_Init().

◆ SeqTable()

const CVDBTable& CCSraDb_Impl::SeqTable ( void  )
inlineprotected

Definition at line 193 of file csraread.hpp.

References m_SeqTable, OpenSeqTable(), and table.

Referenced by CCSraDb_Impl(), and Seq().

◆ SetShortReadId()

void CCSraDb_Impl::SetShortReadId ( string str,
TVDBRowId  id1,
INSDC_coord_one  id2 
) const

Definition at line 1330 of file csraread.cpp.

References m_SraIdPart, and str().

Referenced by CCSraAlignIterator::GetMatchAlign(), and MakeShortReadId().

◆ SetSraIdPart()

void CCSraDb_Impl::SetSraIdPart ( const string s)
inline

Definition at line 143 of file csraread.hpp.

References m_SraIdPart.

◆ x_CalcSeqLength()

void CCSraDb_Impl::x_CalcSeqLength ( const SRefInfo info)
protected

Definition at line 590 of file csraread.cpp.

References GetRowSize(), info, Put(), and Ref().

Referenced by CCSraRefSeqIterator::GetSeqLength().

◆ x_MakeRefSeq_ids()

void CCSraDb_Impl::x_MakeRefSeq_ids ( SRefInfo info,
IIdMapper ref_id_mapper,
int  ref_id_type 
)
protected

Friends And Related Function Documentation

◆ CCSraAlignIterator

friend class CCSraAlignIterator
friend

Definition at line 152 of file csraread.hpp.

◆ CCSraRefSeqIterator

friend class CCSraRefSeqIterator
friend

Definition at line 151 of file csraread.hpp.

◆ CCSraShortReadIterator

friend class CCSraShortReadIterator
friend

Definition at line 153 of file csraread.hpp.

◆ SSeqTableCursor

friend struct SSeqTableCursor
friend

Definition at line 163 of file csraread.hpp.

Referenced by Seq().

Member Data Documentation

◆ m_Aln

CVDBObjectCache<SAlnTableCursor> CCSraDb_Impl::m_Aln[2]
private

Definition at line 218 of file csraread.hpp.

Referenced by Aln(), and Put().

◆ m_AlnTable

CVDBTable CCSraDb_Impl::m_AlnTable[2]
private

Definition at line 214 of file csraread.hpp.

Referenced by AlnTable(), and OpenAlnTable().

◆ m_CSraPath

string CCSraDb_Impl::m_CSraPath
private

Definition at line 208 of file csraread.hpp.

Referenced by GetCSraPath().

◆ m_Db

CVDB CCSraDb_Impl::m_Db
private

Definition at line 207 of file csraread.hpp.

Referenced by CCSraDb_Impl(), GetSpotGroups(), OpenAlnTable(), OpenRefTable(), and OpenSeqTable().

◆ m_Mgr

CVDBMgr CCSraDb_Impl::m_Mgr
private

Definition at line 206 of file csraread.hpp.

Referenced by OpenSeqTable().

◆ m_OverlapMutex

CFastMutex CCSraDb_Impl::m_OverlapMutex
private

Definition at line 212 of file csraread.hpp.

◆ m_Ref

CVDBObjectCache<SRefTableCursor> CCSraDb_Impl::m_Ref
private

Definition at line 217 of file csraread.hpp.

Referenced by Put(), and Ref().

◆ m_RefList

TRefInfoList CCSraDb_Impl::m_RefList
private

Definition at line 222 of file csraread.hpp.

Referenced by CCSraDb_Impl(), and GetRefInfoList().

◆ m_RefMapByName

TRefInfoMapByName CCSraDb_Impl::m_RefMapByName
private

Definition at line 223 of file csraread.hpp.

Referenced by CCSraDb_Impl(), and GetRefInfoMapByName().

◆ m_RefMapBySeq_id

TRefInfoMapBySeq_id CCSraDb_Impl::m_RefMapBySeq_id
private

Definition at line 224 of file csraread.hpp.

Referenced by CCSraDb_Impl(), and GetRefInfoMapBySeq_id().

◆ m_RefTable

CVDBTable CCSraDb_Impl::m_RefTable
private

Definition at line 213 of file csraread.hpp.

Referenced by OpenRefTable(), and RefTable().

◆ m_RowSize

TSeqPos CCSraDb_Impl::m_RowSize
private

Definition at line 221 of file csraread.hpp.

Referenced by CCSraDb_Impl(), and GetRowSize().

◆ m_Seq

CVDBObjectCache<SSeqTableCursor> CCSraDb_Impl::m_Seq
private

Definition at line 219 of file csraread.hpp.

Referenced by Put(), and Seq().

◆ m_SeqTable

CVDBTable CCSraDb_Impl::m_SeqTable
private

Definition at line 215 of file csraread.hpp.

Referenced by OpenSeqTable(), and SeqTable().

◆ m_SraIdPart

string CCSraDb_Impl::m_SraIdPart
private

◆ m_TableMutex

CFastMutex CCSraDb_Impl::m_TableMutex
private

Definition at line 211 of file csraread.hpp.

Referenced by OpenAlnTable(), OpenRefTable(), and OpenSeqTable().


The documentation for this class was generated from the following files:
Modified on Thu Dec 07 10:07:07 2023 by modify_doxy.py rev. 669887