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

Search Toolkit Book for CBamDb

#include <sra/readers/bam/bamread.hpp>

+ Collaboration diagram for CBamDb:

Classes

class  ICollectPileupCallback
 
struct  SAADBImpl
 
struct  SPileupValues
 
struct  STagInfo
 

Public Types

enum  EUseAPI { eUseDefaultAPI , eUseAlignAccess , eUseRawIndex }
 
typedef vector< STagInfoTTagList
 

Public Member Functions

 CBamDb (void)
 
 CBamDb (const CBamMgr &mgr, const string &db_name, EUseAPI use_api=eUseDefaultAPI)
 
 CBamDb (const CBamMgr &mgr, const string &db_name, const string &idx_name, EUseAPI use_api=eUseDefaultAPI)
 
 DECLARE_OPERATOR_BOOL (m_AADB||m_RawDB)
 
bool UsesAlignAccessDB () const
 
bool UsesRawIndex () const
 
CBamRawDbGetRawDb ()
 
const stringGetDbName (void) const
 
const stringGetIndexName (void) const
 
TSeqPos GetPageSize () const
 
void SetIdMapper (IIdMapper *idmapper, EOwnership ownership)
 
IIdMapperGetIdMapper (void) const
 
const TTagListGetIncludedAlignTags () const
 
bool IncludeAlignTag (CTempString tag)
 
bool ExcludeAlignTag (CTempString tag)
 
CRef< CSeq_idGetRefSeq_id (const string &label) const
 
CRef< CSeq_idGetShortSeq_id (const string &str, bool external=false) const
 
TSeqPos GetRefSeqLength (const string &str) const
 
string GetHeaderText (void) const
 
size_t CollectPileup (SPileupValues &values, const string &ref_id, CRange< TSeqPos > graph_range, ICollectPileupCallback *callback=0, SPileupValues::EIntronMode intron_mode=SPileupValues::eNoCountIntron, TSeqPos gap_to_intron_threshold=kInvalidSeqPos) const
 

Static Public Member Functions

static bool UseRawIndex (EUseAPI use_api)
 
static int GetDebugLevel ()
 

Private Types

typedef unordered_map< string, TSeqPosTRefSeqLengths
 
typedef unordered_map< string, CRef< CSeq_id > > TRefSeqIds
 

Private Attributes

string m_DbName
 
string m_IndexName
 
AutoPtr< IIdMapperm_IdMapper
 
TTagList m_IncludedAlignTags
 
AutoPtr< TRefSeqLengthsm_RefSeqLengths
 
AutoPtr< TRefSeqIdsm_RefSeqIds
 
CRef< SAADBImplm_AADB
 
CRef< CObjectFor< CBamRawDb > > m_RawDB
 

Friends

class CBamRefSeqIterator
 
class CBamAlignIterator
 

Detailed Description

Definition at line 186 of file bamread.hpp.

Member Typedef Documentation

◆ TRefSeqIds

typedef unordered_map<string, CRef<CSeq_id> > CBamDb::TRefSeqIds
private

Definition at line 521 of file bamread.hpp.

◆ TRefSeqLengths

typedef unordered_map<string, TSeqPos> CBamDb::TRefSeqLengths
private

Definition at line 519 of file bamread.hpp.

◆ TTagList

typedef vector<STagInfo> CBamDb::TTagList

Definition at line 254 of file bamread.hpp.

Member Enumeration Documentation

◆ EUseAPI

Enumerator
eUseDefaultAPI 
eUseAlignAccess 
eUseRawIndex 

Definition at line 189 of file bamread.hpp.

Constructor & Destructor Documentation

◆ CBamDb() [1/3]

CBamDb::CBamDb ( void  )
inline

Definition at line 194 of file bamread.hpp.

◆ CBamDb() [2/3]

CBamDb::CBamDb ( const CBamMgr mgr,
const string db_name,
EUseAPI  use_api = eUseDefaultAPI 
)

Definition at line 950 of file bamread.cpp.

References m_AADB, m_RawDB, s_UpdateVDBRequestContext(), and UseRawIndex().

◆ CBamDb() [3/3]

CBamDb::CBamDb ( const CBamMgr mgr,
const string db_name,
const string idx_name,
EUseAPI  use_api = eUseDefaultAPI 
)

Member Function Documentation

◆ CollectPileup()

size_t CBamDb::CollectPileup ( SPileupValues values,
const string ref_id,
CRange< TSeqPos graph_range,
ICollectPileupCallback callback = 0,
SPileupValues::EIntronMode  intron_mode = SPileupValues::eNoCountIntron,
TSeqPos  gap_to_intron_threshold = kInvalidSeqPos 
) const

◆ DECLARE_OPERATOR_BOOL()

CBamDb::DECLARE_OPERATOR_BOOL ( m_AADB||  m_RawDB)

◆ ExcludeAlignTag()

bool CBamDb::ExcludeAlignTag ( CTempString  tag)

Definition at line 1640 of file bamread.cpp.

References m_IncludedAlignTags, NCBI_THROW_FMT, and tag.

◆ GetDbName()

const string& CBamDb::GetDbName ( void  ) const
inline

◆ GetDebugLevel()

int CBamDb::GetDebugLevel ( void  )
static

Definition at line 389 of file bamread.cpp.

References DEBUG, NCBI_PARAM_TYPE, and value.

Referenced by CBamIndex::Read(), and s_VDBInit().

◆ GetHeaderText()

string CBamDb::GetHeaderText ( void  ) const

◆ GetIdMapper()

IIdMapper* CBamDb::GetIdMapper ( void  ) const
inline

◆ GetIncludedAlignTags()

const TTagList& CBamDb::GetIncludedAlignTags ( ) const
inline

Definition at line 255 of file bamread.hpp.

References m_IncludedAlignTags.

Referenced by CBamAlignIterator::GetMatchAlign().

◆ GetIndexName()

const string& CBamDb::GetIndexName ( void  ) const
inline

◆ GetPageSize()

TSeqPos CBamDb::GetPageSize ( void  ) const

◆ GetRawDb()

CBamRawDb& CBamDb::GetRawDb ( )
inline

◆ GetRefSeq_id()

CRef< CSeq_id > CBamDb::GetRefSeq_id ( const string label) const

◆ GetRefSeqLength()

TSeqPos CBamDb::GetRefSeqLength ( const string str) const

◆ GetShortSeq_id()

CRef< CSeq_id > CBamDb::GetShortSeq_id ( const string str,
bool  external = false 
) const

Definition at line 1017 of file bamread.cpp.

References GetIdMapper(), str(), and sx_GetShortSeq_id().

◆ IncludeAlignTag()

bool CBamDb::IncludeAlignTag ( CTempString  tag)

Definition at line 1622 of file bamread.cpp.

References info, m_IncludedAlignTags, NCBI_THROW_FMT, and tag.

Referenced by CBamFileInfo::x_Initialize().

◆ SetIdMapper()

void CBamDb::SetIdMapper ( IIdMapper idmapper,
EOwnership  ownership 
)
inline

◆ UseRawIndex()

bool CBamDb::UseRawIndex ( EUseAPI  use_api)
static

Definition at line 401 of file bamread.cpp.

References eUseDefaultAPI, eUseRawIndex, NCBI_PARAM_TYPE, and value.

Referenced by CBamDb().

◆ UsesAlignAccessDB()

bool CBamDb::UsesAlignAccessDB ( ) const
inline

Definition at line 212 of file bamread.hpp.

References m_AADB.

◆ UsesRawIndex()

bool CBamDb::UsesRawIndex ( ) const
inline

Friends And Related Function Documentation

◆ CBamAlignIterator

friend class CBamAlignIterator
friend

Definition at line 504 of file bamread.hpp.

◆ CBamRefSeqIterator

friend class CBamRefSeqIterator
friend

Definition at line 503 of file bamread.hpp.

Member Data Documentation

◆ m_AADB

CRef<SAADBImpl> CBamDb::m_AADB
private

◆ m_DbName

string CBamDb::m_DbName
private

Definition at line 515 of file bamread.hpp.

Referenced by GetDbName().

◆ m_IdMapper

AutoPtr<IIdMapper> CBamDb::m_IdMapper
private

Definition at line 517 of file bamread.hpp.

Referenced by GetIdMapper(), and SetIdMapper().

◆ m_IncludedAlignTags

TTagList CBamDb::m_IncludedAlignTags
private

Definition at line 518 of file bamread.hpp.

Referenced by ExcludeAlignTag(), GetIncludedAlignTags(), and IncludeAlignTag().

◆ m_IndexName

string CBamDb::m_IndexName
private

Definition at line 516 of file bamread.hpp.

Referenced by CBamDb(), and GetIndexName().

◆ m_RawDB

CRef< CObjectFor<CBamRawDb> > CBamDb::m_RawDB
private

◆ m_RefSeqIds

AutoPtr<TRefSeqIds> CBamDb::m_RefSeqIds
mutableprivate

Definition at line 522 of file bamread.hpp.

Referenced by GetRefSeq_id().

◆ m_RefSeqLengths

AutoPtr<TRefSeqLengths> CBamDb::m_RefSeqLengths
mutableprivate

Definition at line 520 of file bamread.hpp.

Referenced by GetRefSeqLength().


The documentation for this class was generated from the following files:
Modified on Fri Feb 23 11:50:36 2024 by modify_doxy.py rev. 669887