NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <objtools/data_loaders/genbank/impl/psg_cdd.hpp>
#include <objtools/data_loaders/genbank/psg_loader.hpp>
#include <objmgr/impl/data_source.hpp>
#include <objmgr/impl/tse_split_info.hpp>
#include <objmgr/impl/tse_chunk_info.hpp>
#include <objmgr/impl/tse_loadlock.hpp>
#include <serial/objistr.hpp>
#include <serial/serial.hpp>
#include <util/compress/compress.hpp>
#include <util/compress/stream.hpp>
#include <util/compress/zlib.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Variables | |
BEGIN_NCBI_NAMESPACE | |
bool | s_GetBlobByIdShouldFail = false |
END_NCBI_NAMESPACE | |
BEGIN_NAMESPACE | ( | objects | ) |
BEGIN_NAMESPACE | ( | psgl | ) |
END_NAMESPACE | ( | objects | ) |
END_NAMESPACE | ( | psgl | ) |
CObjectIStream* GetBlobDataStream | ( | const CPSG_BlobInfo & | blob_info, |
const CPSG_BlobData & | blob_data | ||
) |
Definition at line 123 of file psg_cdd.cpp.
References _ASSERT, _TRACE, eNoOwnership, eSerial_AsnBinary, eSerial_AsnText, eSerial_Json, eSerial_Xml, eTakeOwnership, CZipCompression::fGZip, CCompressionStream::fOwnProcessor, CPSG_BlobInfo::GetCompression(), CPSG_BlobInfo::GetFormat(), CPSG_BlobData::GetStream(), in(), CObjectIStream::Open(), and z_stream.
Referenced by CPSGL_Blob_Processor::ParseChunk(), CPSGL_Blob_Processor::ParseSplitInfo(), CPSGL_Blob_Processor::ParseTSE(), CPSGL_CDDAnnot_Processor::ProcessReplySlow(), and CPSGDataLoader_Impl::x_ReadCDDChunk().
NCBI_PARAM_DECL | ( | unsigned | , |
PSG_LOADER | , | ||
DEBUG | |||
) |
NCBI_PARAM_DEF_EX | ( | unsigned | , |
PSG_LOADER | , | ||
DEBUG | , | ||
1 | , | ||
eParam_NoThread | , | ||
PSG_LOADER_DEBUG | |||
) |
typedef NCBI_PARAM_TYPE | ( | PSG_LOADER | , |
DEBUG | |||
) |
CSeq_id_Handle PsgIdToHandle | ( | const CPSG_BioId & | id | ) |
Definition at line 73 of file psg_cdd.cpp.
References ERR_POST, and CSeq_id_Handle::GetHandle().
Referenced by SPsgBioseqInfo::Update().
unsigned s_GetDebugLevel | ( | void | ) |
Definition at line 66 of file psg_cdd.cpp.
References rapidjson::value.
Referenced by CPSGDataLoader_Impl::GetBlobByIdOnce(), CPSGDataLoader_Impl::GetBlobsOnce(), CPSGL_Blob_Processor::ObtainSkippedTSE_Lock(), s_CreateNAChunk(), CPSGL_Blob_Processor::TSE_ToOM(), x_CreateEmptyLocalCDDEntry(), x_CreateLocalCDDEntryChunk(), and CPSGDataLoader_Impl::x_ReadCDDChunk().
void UpdateOMBlobId | ( | CTSE_LoadLock & | load_lock, |
const CConstRef< CPsgBlobId > & | dl_blob_id | ||
) |
Definition at line 87 of file psg_cdd.cpp.
References _ASSERT, CPsgBlobId::BioseqIsDead(), CBioseq_Handle::fState_dead, CTSE_Info::GetBlobId(), CPsgBlobId::GetTSEName(), CPsgBlobId::HasBioseqIsDead(), CPsgBlobId::HasTSEName(), CTSE_Info::SetBlobState(), and CTSE_Info::SetName().
Referenced by CPSGL_NA_Processor::ProcessItemSlow(), CPSGL_CDDAnnot_Processor::ProcessReplySlow(), CPSGL_Blob_Processor::TSE_ToOM(), and x_CreateLocalCDDEntry().
void x_CreateEmptyLocalCDDEntry | ( | CDataSource * | data_source, |
CTSE_Chunk_Info * | chunk | ||
) |
Definition at line 329 of file psg_cdd.cpp.
References _ASSERT, CTSE_Chunk_Info::GetBlobId(), CTSE_Info::GetBlobId(), CDataSource::GetTSE_LoadLock(), CSeq_entry_Info::HasNoSeq_entry(), Info(), CTSE_LoadLock::IsLoaded(), LOG_POST, s_GetDebugLevel(), CTSE_Chunk_Info::SetLoaded(), CTSE_Info::SetSeq_entry(), CBioseq_set_Base::SetSeq_set(), CSeq_entry_Base::SetSet(), and CBlobIdKey::ToString().
Referenced by CPSGDataLoader_Impl::LoadChunksOnce(), and CPSGL_LocalCDDBlob_Processor::ProcessReplySlow().
CTSE_Lock x_CreateLocalCDDEntry | ( | CDataSource * | data_source, |
const SCDDIds & | cdd_ids | ||
) |
Definition at line 305 of file psg_cdd.cpp.
References _ASSERT, CTSE_Split_Info::AddChunk(), CTSE_Info::GetSplitInfo(), CDataSource::GetTSE_LoadLock(), CTSE_LoadLock::IsLoaded(), kCDDAnnotName, s_GetBlobByIdShouldFail, CTSE_LoadLock::SetLoaded(), UpdateOMBlobId(), x_CreateLocalCDDEntryChunk(), x_MakeLocalCDDEntryId(), and CTSE_Info::x_NeedsDelayedMainChunk().
Referenced by CPSGDataLoader_Impl::GetAnnotRecordsNAOnce(), CPSGDataLoader_Impl::GetBlobByIdOnce(), and CPSGL_CDDAnnot_Processor::ProcessReplySlow().
CRef<CTSE_Chunk_Info> x_CreateLocalCDDEntryChunk | ( | const SCDDIds & | cdd_ids | ) |
Definition at line 269 of file psg_cdd.cpp.
References SCDDIds::acc_ver, CSeqFeatData::eSubtype_region, CSeqFeatData::eSubtype_site, GetSeqId(), COpenRange< Position >::GetWhole(), SCDDIds::gi, i, Info(), set< Key, Compare >::insert(), kCDDAnnotName, kDelayedMain_ChunkId, LOG_POST, MSerial_AsnText, compile_time_bits::range(), s_GetDebugLevel(), type, and CTSE_Chunk_Info::x_AddAnnotType().
Referenced by x_CreateLocalCDDEntry().
SCDDIds x_GetCDDIds | ( | const CDataLoader::TIds & | ids | ) |
Definition at line 170 of file psg_cdd.cpp.
References SCDDIds::acc_ver, CSeq_id_Base::e_Pdb, CSeq_id::fAcc_nuc, CSeq_id::fAcc_prot, CSeq_id_Handle::GetHandle(), CSeq_id_Handle::GetSeqId(), SCDDIds::gi, CSeq_id::IdentifyAccession(), NStr::NumericToString(), and CSeq_id_Handle::Reset().
Referenced by CPSGDataLoader_Impl::CPSG_PrefetchCDD_Task::AddRequest(), CPSGDataLoader_Impl::GetAnnotRecordsNAOnce(), CPSGDataLoader_Impl::GetCDDAnnotsOnce(), and CPSGDataLoader_Impl::GetRecordsOnce().
Definition at line 346 of file psg_cdd.cpp.
References CBioseq_set_Base::GetSeq_set(), CSeq_entry_Base::GetSet(), and CTSE_Info::GetTSECore().
Referenced by CPSGDataLoader_Impl::GetCDDAnnotsOnce(), and CPSGL_CDDAnnot_Processor::ProcessReplySlow().
bool x_IsLocalCDDEntryId | ( | const CPsgBlobId & | blob_id | ) |
Definition at line 220 of file psg_cdd.cpp.
References kLocalCDDEntryIdPrefix, NStr::StartsWith(), and CPsgBlobId::ToPsgId().
Referenced by CPSGDataLoader_Impl::GetCDDAnnotsOnce(), x_ParseLocalCDDEntryId(), and CPSGDataLoader_Impl::x_ReadCDDChunk().
CPSG_BioId x_LocalCDDEntryIdToBioId | ( | const CPsgBlobId & | blob_id | ) |
Definition at line 260 of file psg_cdd.cpp.
References CSeq_id_Base::e_Gi, kLocalCDDEntryIdPrefix, kLocalCDDEntryIdSeparator, str(), and CPsgBlobId::ToPsgId().
CPSG_BioId x_LocalCDDEntryIdToBioId | ( | const SCDDIds & | cdd_ids | ) |
Definition at line 254 of file psg_cdd.cpp.
References CSeq_id_Base::e_Gi, CSeq_id_Handle::GetGi(), SCDDIds::gi, and NStr::NumericToString().
Referenced by CPSGDataLoader_Impl::LoadChunksOnce().
Definition at line 208 of file psg_cdd.cpp.
References _ASSERT, SCDDIds::acc_ver, CSeq_id_Handle::GetGi(), SCDDIds::gi, CSeq_id_Handle::IsGi(), kLocalCDDEntryIdPrefix, kLocalCDDEntryIdSeparator, and str().
Referenced by CPSGDataLoader_Impl::CPSG_PrefetchCDD_Task::AddRequest(), CPSGDataLoader_Impl::GetCDDAnnotsOnce(), CPSGDataLoader_Impl::GetRecordsOnce(), CPSGL_CDDAnnot_Processor::ProcessReplyFast(), CPSGL_CDDAnnot_Processor::ProcessReplySlow(), and x_CreateLocalCDDEntry().
SCDDIds x_ParseLocalCDDEntryId | ( | const CPsgBlobId & | blob_id | ) |
Definition at line 226 of file psg_cdd.cpp.
References CSeq_id_Handle::GetGiHandle(), CSeq_id_Handle::GetHandle(), GI_FROM, kLocalCDDEntryIdPrefix, kLocalCDDEntryIdSeparator, str(), CPsgBlobId::ToPsgId(), and x_IsLocalCDDEntryId().
Referenced by CPSGDataLoader_Impl::GetBlobByIdOnce(), CPSGDataLoader_Impl::LoadChunksOnce(), and x_ParseLocalCDDEntryId().
bool x_ParseLocalCDDEntryId | ( | const CPsgBlobId & | blob_id, |
SCDDIds & | cdd_ids | ||
) |
Definition at line 248 of file psg_cdd.cpp.
References x_ParseLocalCDDEntryId().
BEGIN_NCBI_NAMESPACE |
Definition at line 48 of file psg_cdd.cpp.
END_NCBI_NAMESPACE |
Definition at line 361 of file psg_cdd.cpp.
Definition at line 58 of file psg_cdd.cpp.
Referenced by CPSGDataLoader_Impl::GetGetBlobByIdShouldFail(), CPSGDataLoader_Impl::SetGetBlobByIdShouldFail(), and x_CreateLocalCDDEntry().