NCBI C++ ToolKit
|
Search Toolkit Book for CBAMDataLoader_Impl
#include <sra/data_loaders/bam/impl/bamloader_impl.hpp>
Classes | |
struct | SDirSeqInfo |
Public Types | |
typedef pair< CBamFileInfo *, const CBamRefSeqInfo * > | TRefSeqInfo |
typedef vector< CSeq_id_Handle > | TIds |
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 | |
CBAMDataLoader_Impl (const CBAMDataLoader::SLoaderParams ¶ms) | |
~CBAMDataLoader_Impl (void) | |
void | AddSrzDef (void) |
void | AddBamFile (const CBAMDataLoader::SBamFileName &bam) |
void | OpenBAMFiles () |
void | OpenBAMFilesOnce () |
bool | BAMFilesOpened () const |
CRef< CBAMBlobId > | GetShortSeqBlobId (const CSeq_id_Handle &idh) |
CRef< CBAMBlobId > | GetRefSeqBlobId (const CSeq_id_Handle &idh) |
CBamRefSeqInfo * | GetRefSeqInfo (const CBAMBlobId &blob_id) |
void | LoadBAMEntry (const CBAMBlobId &blob_id, CTSE_LoadLock &load_lock) |
void | LoadChunk (const CBAMBlobId &blob_id, CTSE_Chunk_Info &chunk) |
double | EstimateLoadSeconds (const CBAMBlobId &blob_id, const CTSE_Chunk_Info &chunk, Uint4 bytes) |
CBAMDataLoader::TAnnotNames | GetPossibleAnnotNames (void) const |
bool | IsShortSeq (const CSeq_id_Handle &idh) |
void | GetIds (const CSeq_id_Handle &idh, TIds &ids) |
CDataSource::SAccVerFound | GetAccVer (const CSeq_id_Handle &idh) |
CDataSource::SGiFound | GetGi (const CSeq_id_Handle &idh) |
string | GetLabel (const CSeq_id_Handle &idh) |
TTaxId | GetTaxId (const CSeq_id_Handle &idh) |
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 |
Private Types | |
typedef map< string, CRef< CBamFileInfo > > | TBamFiles |
typedef vector< SDirSeqInfo > | TSeqInfos |
Private Attributes | |
CMutex | m_Mutex |
CBamMgr | m_Mgr |
string | m_DirPath |
TSeqInfos | m_SeqInfos |
TBamFiles | m_BamFiles |
AutoPtr< IIdMapper > | m_IdMapper |
Friends | |
class | CBamFileInfo |
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... | |
Definition at line 268 of file bamloader_impl.hpp.
|
private |
Definition at line 315 of file bamloader_impl.hpp.
typedef vector<CSeq_id_Handle> CBAMDataLoader_Impl::TIds |
Definition at line 296 of file bamloader_impl.hpp.
typedef pair<CBamFileInfo*, const CBamRefSeqInfo*> CBAMDataLoader_Impl::TRefSeqInfo |
Definition at line 283 of file bamloader_impl.hpp.
|
private |
Definition at line 316 of file bamloader_impl.hpp.
|
explicit |
Definition at line 430 of file bamloader_impl.cpp.
References AddBamFile(), AddSrzDef(), CSrzPath::FindAccPathNoThrow(), GetMapperContext(), GetMapperFileName(), CBAMDataLoader::GetPreOpenParam(), in(), ITERATE, CBAMDataLoader::SLoaderParams::m_BamFiles, CBAMDataLoader::SLoaderParams::m_DirPath, m_DirPath, m_IdMapper, OpenBAMFiles(), AutoPtr< X, Del >::reset(), and SRZ_CONFIG_NAME.
CBAMDataLoader_Impl::~CBAMDataLoader_Impl | ( | void | ) |
Definition at line 470 of file bamloader_impl.cpp.
References GetDebugLevel(), Info(), LOG_POST_X, s_AttachTime, and s_CreateTime.
void CBAMDataLoader_Impl::AddBamFile | ( | const CBAMDataLoader::SBamFileName & | bam | ) |
Definition at line 577 of file bamloader_impl.cpp.
References CDirEntry::GetBase(), info, and m_SeqInfos.
Referenced by CBAMDataLoader_Impl().
void CBAMDataLoader_Impl::AddSrzDef | ( | void | ) |
Definition at line 481 of file bamloader_impl.cpp.
References CSeq_id_Base::e_Local, ctll::empty(), CDirEntry::GetBase(), CSeq_id_Handle::GetHandle(), in(), info, m_DirPath, m_IdMapper, m_SeqInfos, NCBI_THROW, AutoPtr< X, Del >::release(), AutoPtr< X, Del >::reset(), NStr::Split(), and SRZ_CONFIG_NAME.
Referenced by CBAMDataLoader_Impl().
bool CBAMDataLoader_Impl::BAMFilesOpened | ( | ) | const |
Definition at line 528 of file bamloader_impl.cpp.
References map_checker< Container >::empty(), m_BamFiles, and m_Mutex.
Referenced by GetShortSeqBlobId().
double CBAMDataLoader_Impl::EstimateLoadSeconds | ( | const CBAMBlobId & | blob_id, |
const CTSE_Chunk_Info & | chunk, | ||
Uint4 | bytes | ||
) |
Definition at line 612 of file bamloader_impl.cpp.
References CBamRefSeqInfo::EstimateLoadSeconds(), and GetRefSeqInfo().
Referenced by CBAMDataLoader::EstimateLoadSeconds().
CDataSource::SAccVerFound CBAMDataLoader_Impl::GetAccVer | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 672 of file bamloader_impl.cpp.
References CDataLoader::SAccVerFound::acc_ver, CSeq_id_Handle::GetSeqId(), CSeq_id::GetTextseq_Id(), CSeq_id_Handle::IsGi(), IsShortSeq(), and CDataLoader::SAccVerFound::sequence_found.
Referenced by CBAMDataLoader::GetAccVerFound().
CDataSource::SGiFound CBAMDataLoader_Impl::GetGi | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 684 of file bamloader_impl.cpp.
References CSeq_id_Handle::GetGi(), CDataLoader::SGiFound::gi, CSeq_id_Handle::IsGi(), IsShortSeq(), and CDataLoader::SGiFound::sequence_found.
Referenced by CBAMDataLoader::GetGiFound().
void CBAMDataLoader_Impl::GetIds | ( | const CSeq_id_Handle & | idh, |
TIds & | ids | ||
) |
Definition at line 663 of file bamloader_impl.cpp.
References IsShortSeq().
Referenced by CBAMDataLoader::GetIds().
string CBAMDataLoader_Impl::GetLabel | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 695 of file bamloader_impl.cpp.
References GetLabel(), IsShortSeq(), and string.
Referenced by CBAMDataLoader::GetLabel().
CBAMDataLoader::TAnnotNames CBAMDataLoader_Impl::GetPossibleAnnotNames | ( | void | ) | const |
Definition at line 645 of file bamloader_impl.cpp.
References ITERATE, m_SeqInfos, names, and ct::sort().
Referenced by CBAMDataLoader::GetPossibleAnnotNames().
CRef< CBAMBlobId > CBAMDataLoader_Impl::GetRefSeqBlobId | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 634 of file bamloader_impl.cpp.
References ITERATE, m_BamFiles, and OpenBAMFiles().
Referenced by CBAMDataLoader::GetRecords().
CBamRefSeqInfo * CBAMDataLoader_Impl::GetRefSeqInfo | ( | const CBAMBlobId & | blob_id | ) |
Definition at line 586 of file bamloader_impl.cpp.
References map_checker< Container >::end(), map_checker< Container >::find(), info, m_BamFiles, CBAMBlobId::m_BamName, CBAMBlobId::m_SeqId, and OpenBAMFiles().
Referenced by EstimateLoadSeconds(), LoadBAMEntry(), and LoadChunk().
CRef< CBAMBlobId > CBAMDataLoader_Impl::GetShortSeqBlobId | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 621 of file bamloader_impl.cpp.
References BAMFilesOpened(), ITERATE, and m_BamFiles.
Referenced by CBAMDataLoader::GetBlobId(), and IsShortSeq().
TTaxId CBAMDataLoader_Impl::GetTaxId | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 704 of file bamloader_impl.cpp.
References INVALID_TAX_ID, IsShortSeq(), and ZERO_TAX_ID.
Referenced by CBAMDataLoader::GetTaxId().
bool CBAMDataLoader_Impl::IsShortSeq | ( | const CSeq_id_Handle & | idh | ) |
Definition at line 713 of file bamloader_impl.cpp.
References GetShortSeqBlobId().
Referenced by GetAccVer(), GetGi(), GetIds(), GetLabel(), and GetTaxId().
void CBAMDataLoader_Impl::LoadBAMEntry | ( | const CBAMBlobId & | blob_id, |
CTSE_LoadLock & | load_lock | ||
) |
Definition at line 598 of file bamloader_impl.cpp.
References GetRefSeqInfo(), and RETRY.
Referenced by CBAMDataLoader::GetBlobById().
void CBAMDataLoader_Impl::LoadChunk | ( | const CBAMBlobId & | blob_id, |
CTSE_Chunk_Info & | chunk | ||
) |
Definition at line 605 of file bamloader_impl.cpp.
References GetRefSeqInfo(), and RETRY.
Referenced by CBAMDataLoader::GetChunk().
void CBAMDataLoader_Impl::OpenBAMFiles | ( | ) |
Definition at line 571 of file bamloader_impl.cpp.
References OpenBAMFilesOnce(), and RETRY.
Referenced by CBAMDataLoader_Impl(), GetRefSeqBlobId(), and GetRefSeqInfo().
void CBAMDataLoader_Impl::OpenBAMFilesOnce | ( | ) |
Definition at line 535 of file bamloader_impl.cpp.
References CBamFileInfo::AddRefSeq(), CBamFileInfo, map_checker< Container >::empty(), map_checker< Container >::end(), ERR_POST_X, file_name, map_checker< Container >::find(), CBamFileInfo::GetRefSeqInfo(), info, ITERATE, m_BamFiles, m_DirPath, m_Mutex, and m_SeqInfos.
Referenced by OpenBAMFiles().
|
friend |
Definition at line 304 of file bamloader_impl.hpp.
Referenced by OpenBAMFilesOnce().
|
private |
Definition at line 323 of file bamloader_impl.hpp.
Referenced by BAMFilesOpened(), GetRefSeqBlobId(), GetRefSeqInfo(), GetShortSeqBlobId(), and OpenBAMFilesOnce().
|
private |
Definition at line 321 of file bamloader_impl.hpp.
Referenced by AddSrzDef(), CBAMDataLoader_Impl(), and OpenBAMFilesOnce().
Definition at line 324 of file bamloader_impl.hpp.
Referenced by AddSrzDef(), and CBAMDataLoader_Impl().
|
private |
Definition at line 320 of file bamloader_impl.hpp.
|
mutableprivate |
Definition at line 319 of file bamloader_impl.hpp.
Referenced by BAMFilesOpened(), and OpenBAMFilesOnce().
|
private |
Definition at line 322 of file bamloader_impl.hpp.
Referenced by AddBamFile(), AddSrzDef(), GetPossibleAnnotNames(), and OpenBAMFilesOnce().