NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <sra/data_loaders/snp/impl/id2snp_impl.hpp>
#include <objects/id2/id2processor_interface.hpp>
#include <sra/data_loaders/snp/id2snp_params.h>
#include <sra/readers/sra/snpread.hpp>
#include <sra/error_codes.hpp>
#include <corelib/reader_writer.hpp>
#include <corelib/rwstream.hpp>
#include <util/compress/zlib.hpp>
#include <serial/objostrasnb.hpp>
#include <serial/serial.hpp>
#include <objects/id2/id2__.hpp>
#include <objects/seqsplit/seqsplit__.hpp>
#include <objects/general/general__.hpp>
#include <objects/seqloc/seqloc__.hpp>
#include <objects/seqres/seqres__.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seq/Annot_descr.hpp>
#include <objects/seq/Annotdesc.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/seqsplit/ID2S_Split_Info.hpp>
#include <objects/seqsplit/ID2S_Chunk.hpp>
#include <objmgr/bioseq_handle.hpp>
#include <objmgr/annot_selector.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | COSSWriter |
Macros | |
#define | NCBI_USE_ERRCODE_X ID2SNPProcessor |
#define | TRACE_PROCESSING |
#define | DEFAULT_VDB_CACHE_SIZE 10 |
#define | DEFAULT_INDEX_UPDATE_TIME 600 |
#define | DEFAULT_COMPRESS_DATA CID2SNPContext::eCompressData_some |
#define | START_TRACE() do { if(s_DebugLevel()>0)sw.Restart(); } while(0) |
#define | TRACE_X(t, l, m) |
Enumerations | |
enum | EResolveMaster { eResolveMaster_never , eResolveMaster_without_gi , eResolveMaster_always , eResolveMaster_never , eResolveMaster_without_gi , eResolveMaster_always } |
enum | EDebugLevel { eTraceError = 1 , eTraceOpen = 2 , eTraceConn = 4 , eTraceASN = 5 , eTraceASNData = 8 , eDebug_none = 0 , eDebug_error = 1 , eDebug_open = 2 , eDebug_request = 5 , eDebug_replies = 6 , eDebug_resolve = 7 , eDebug_data = 8 , eDebug_all = 9 } |
Variables | |
BEGIN_NCBI_NAMESPACE | |
static const EResolveMaster | kResolveMaster = eResolveMaster_never |
const int | kSNPSatBase = 2000 |
const int | kNAIndexDigits = 9 |
const int | kNAIndexMin = 1 |
const int | kNAIndexMax = 999999999 |
const int | kNAVersionDigitsMin = 1 |
const int | kNAVersionDigitsMax = 2 |
const int | kNALengthMin = 2 + kNAIndexDigits + 1 + kNAVersionDigitsMin |
const int | kNALengthMax = 2 + kNAIndexDigits + 1 + kNAVersionDigitsMax |
const int | kNAVersionMin = 1 |
const int | kNAVersionMax = 99 |
const int | kSeqIndexCount = 1000000 |
const int | kFilterIndexCount = 2000 |
const int | kFilterIndexMaxLength = 4 |
static const int | kTSEId = 1 |
static const int | kChunkIdFeat = 0 |
static const int | kChunkIdGraph = 1 |
static const int | kChunkIdMul = 2 |
static const TSeqPos | kFeatChunkSize = 1000000 |
static const TSeqPos | kGraphChunkSize = 10000000 |
BEGIN_LOCAL_NAMESPACE | |
static CStopWatch | sw |
END_LOCAL_NAMESPACE | |
END_NCBI_NAMESPACE | |
#define DEFAULT_COMPRESS_DATA CID2SNPContext::eCompressData_some |
Definition at line 79 of file id2snp_impl.cpp.
#define DEFAULT_INDEX_UPDATE_TIME 600 |
Definition at line 78 of file id2snp_impl.cpp.
#define DEFAULT_VDB_CACHE_SIZE 10 |
Definition at line 77 of file id2snp_impl.cpp.
#define NCBI_USE_ERRCODE_X ID2SNPProcessor |
Definition at line 61 of file id2snp_impl.cpp.
#define START_TRACE | ( | ) | do { if(s_DebugLevel()>0)sw.Restart(); } while(0) |
Definition at line 279 of file id2snp_impl.cpp.
#define TRACE_PROCESSING |
Definition at line 67 of file id2snp_impl.cpp.
Definition at line 286 of file id2snp_impl.cpp.
enum EDebugLevel |
Enumerator | |
---|---|
eTraceError | |
eTraceOpen | |
eTraceConn | |
eTraceASN | |
eTraceASNData | |
eDebug_none | |
eDebug_error | |
eDebug_open | |
eDebug_request | |
eDebug_replies | |
eDebug_resolve | |
eDebug_data | |
eDebug_all |
Definition at line 82 of file id2snp_impl.cpp.
enum EResolveMaster |
Enumerator | |
---|---|
eResolveMaster_never | |
eResolveMaster_without_gi | |
eResolveMaster_always | |
eResolveMaster_never | |
eResolveMaster_without_gi | |
eResolveMaster_always |
Definition at line 69 of file id2snp_impl.cpp.
BEGIN_NAMESPACE | ( | objects | ) |
END_NAMESPACE | ( | objects | ) |
string FormatTrack | ( | const SSNPDbTrackInfo & | track | ) |
Definition at line 226 of file id2snp_impl.cpp.
References kNAIndexDigits, SSNPDbTrackInfo::m_FilterIndex, SSNPDbTrackInfo::m_NAIndex, SSNPDbTrackInfo::m_NAVersion, and str().
Referenced by operator<<(), CID2SNPProcessor_Impl::x_LoadBlob(), CID2SNPProcessor_Impl::x_LoadChunk(), and CID2SNPProcessor_Impl::x_ProcessReplyGetBlobId().
string GetNAAccession | ( | const SSNPDbTrackInfo & | track | ) |
Definition at line 217 of file id2snp_impl.cpp.
References kNAIndexDigits, SSNPDbTrackInfo::m_NAIndex, SSNPDbTrackInfo::m_NAVersion, and str().
Referenced by CID2SNPProcessor_Impl::GetSNPDb(), CID2SNPProcessor_Impl::x_ProcessGetBlobId(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
bool IsValidFilterIndex | ( | size_t | filter_index | ) |
Definition at line 211 of file id2snp_impl.cpp.
References kFilterIndexCount.
Referenced by ParseTrack(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
bool IsValidNAIndex | ( | size_t | na_index | ) |
Definition at line 193 of file id2snp_impl.cpp.
References kNAIndexMax, and kNAIndexMin.
Referenced by ParseTrack(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
bool IsValidNAVersion | ( | size_t | na_version | ) |
Definition at line 199 of file id2snp_impl.cpp.
References kNAVersionMax, and kNAVersionMin.
Referenced by ParseTrack().
bool IsValidSeqIndex | ( | size_t | seq_index | ) |
Definition at line 205 of file id2snp_impl.cpp.
References kSeqIndexCount.
Referenced by CID2SNPProcessor_Impl::x_ResolveBlobId().
NCBI_DEFINE_ERR_SUBCODE_X | ( | 24 | ) |
NCBI_PARAM_DECL | ( | bool | , |
ID2SNP | , | ||
ENABLE | |||
) |
NCBI_PARAM_DECL | ( | bool | , |
ID2SNP | , | ||
FILTER_ALL | |||
) |
NCBI_PARAM_DEF_EX | ( | bool | , |
ID2SNP | , | ||
ENABLE | , | ||
true | , | ||
eParam_NoThread | , | ||
ID2SNP_ENABLE | |||
) |
NCBI_PARAM_DEF_EX | ( | bool | , |
ID2SNP | , | ||
FILTER_ALL | , | ||
true | , | ||
eParam_NoThread | , | ||
ID2SNP_FILTER_ALL | |||
) |
NCBI_PARAM_DEF_EX | ( | int | , |
ID2SNP | , | ||
DEBUG | , | ||
eDebug_error | , | ||
eParam_NoThread | , | ||
ID2SNP_DEBUG | |||
) |
CNcbiOstream& operator<< | ( | CNcbiOstream & | out, |
const CID2SNPProcessor_Impl::SSNPEntryInfo & | seq | ||
) |
Definition at line 281 of file id2snp_impl.cpp.
References FormatTrack(), CID2SNPProcessor_Impl::SSNPEntryInfo::m_SeqIndex, CID2SNPProcessor_Impl::SSNPEntryInfo::m_Track, and out().
SSNPDbTrackInfo ParseTrack | ( | CTempString | acc_filter | ) |
Definition at line 236 of file id2snp_impl.cpp.
References CTempString::empty(), NStr::fConvErr_NoThrow, CTempString::find(), IsValidFilterIndex(), IsValidNAIndex(), IsValidNAVersion(), kFilterIndexMaxLength, kNAIndexDigits, kNALengthMax, kNALengthMin, SSNPDbTrackInfo::m_FilterIndex, SSNPDbTrackInfo::m_NAIndex, SSNPDbTrackInfo::m_NAVersion, NPOS, CTempString::size(), and CTempString::substr().
Referenced by CID2SNPProcessor_Impl::x_ProcessGetBlobId().
|
inlinestatic |
Definition at line 126 of file id2snp_impl.cpp.
References s_DebugLevel().
Definition at line 119 of file id2snp_impl.cpp.
References DEBUG, NCBI_PARAM_TYPE, and ncbi::grid::netcache::search::s_Value().
Referenced by s_DebugEnabled().
Definition at line 112 of file id2snp_impl.cpp.
References NCBI_PARAM_TYPE, and ncbi::grid::netcache::search::s_Value().
Definition at line 132 of file id2snp_impl.cpp.
References NCBI_PARAM_TYPE, and ncbi::grid::netcache::search::s_Value().
|
static |
Definition at line 706 of file id2snp_impl.cpp.
References _ASSERT, CSeq_graph_Base::C_Graph::GetByte(), CSeq_graph_Base::GetComp(), CSeq_interval_Base::GetFrom(), CSeq_graph_Base::GetGraph(), CSeq_loc_Base::GetInt(), CSeq_graph_Base::C_Graph::GetInt(), CSeq_interval::GetLength(), CSeq_graph_Base::GetLoc(), CSeq_graph_Base::GetNumval(), CByte_graph_Base::GetValues(), CInt_graph_Base::GetValues(), CSeq_graph_Base::C_Graph::IsByte(), kChunkSize, and sx_AddBits2().
Referenced by CID2SNPProcessor_Impl::x_LoadBlob().
void sx_AddBits2 | ( | vector< char > & | bits, |
TSeqPos | bit_values, | ||
TSeqPos | pos_index, | ||
const TValues & | values | ||
) |
Definition at line 680 of file id2snp_impl.cpp.
References map_checker< Container >::size(), and sx_HasNonZero().
Referenced by sx_AddBits().
Cont::value_type::TObjectType& sx_AddNew | ( | Cont & | cont | ) |
Definition at line 177 of file id2snp_impl.cpp.
Referenced by sx_SetZoomLevel(), CID2SNPProcessor_Impl::x_LoadBlob(), CID2SNPProcessor_Impl::x_LoadChunk(), CID2SNPProcessor_Impl::x_ProcessGetBlobInfo(), CID2SNPProcessor_Impl::x_ProcessGetChunks(), and CID2SNPProcessor_Impl::x_ProcessReplyGetBlobId().
size_t sx_GetSize | ( | const CID2_Reply_Data & | data | ) |
Definition at line 330 of file id2snp_impl.cpp.
References data, ITERATE, and ncbi::grid::netcache::search::fields::size.
Referenced by CID2SNPProcessor_Impl::x_ProcessGetBlobInfo(), and CID2SNPProcessor_Impl::x_ProcessGetChunks().
Definition at line 667 of file id2snp_impl.cpp.
References count, i, and min().
Referenced by sx_AddBits2(), and CID2SNPProcessor_Impl::x_LoadBlob().
void sx_SetZoomLevel | ( | CSeq_annot & | annot, |
int | zoom_level | ||
) |
Definition at line 185 of file id2snp_impl.cpp.
References CUser_object::AddField(), CSeq_annot_Base::SetDesc(), CUser_object_Base::SetType(), and sx_AddNew().
Referenced by CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
BEGIN_LOCAL_NAMESPACE |
Definition at line 173 of file id2snp_impl.cpp.
BEGIN_NCBI_NAMESPACE |
Definition at line 59 of file id2snp_impl.cpp.
END_LOCAL_NAMESPACE |
Definition at line 340 of file id2snp_impl.cpp.
END_NCBI_NAMESPACE |
Definition at line 1081 of file id2snp_impl.cpp.
Definition at line 166 of file id2snp_impl.cpp.
Referenced by CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
Definition at line 167 of file id2snp_impl.cpp.
Referenced by CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
Definition at line 168 of file id2snp_impl.cpp.
Referenced by CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
Definition at line 169 of file id2snp_impl.cpp.
Referenced by CSNPDbSeqIterator::GetChunkForVersion(), CSNPDbSeqIterator::GetEntry(), CSNPDbSeqIterator::GetSplitInfoAndVersion(), CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
Definition at line 160 of file id2snp_impl.cpp.
Referenced by IsValidFilterIndex().
Definition at line 161 of file id2snp_impl.cpp.
Referenced by ParseTrack().
Definition at line 170 of file id2snp_impl.cpp.
Referenced by CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
Definition at line 150 of file id2snp_impl.cpp.
Referenced by FormatTrack(), GetNAAccession(), and ParseTrack().
Definition at line 152 of file id2snp_impl.cpp.
Referenced by IsValidNAIndex().
Definition at line 151 of file id2snp_impl.cpp.
Referenced by IsValidNAIndex().
const int kNALengthMax = 2 + kNAIndexDigits + 1 + kNAVersionDigitsMax |
Definition at line 156 of file id2snp_impl.cpp.
Referenced by ParseTrack().
const int kNALengthMin = 2 + kNAIndexDigits + 1 + kNAVersionDigitsMin |
Definition at line 155 of file id2snp_impl.cpp.
Referenced by ParseTrack().
Definition at line 154 of file id2snp_impl.cpp.
Definition at line 153 of file id2snp_impl.cpp.
Definition at line 158 of file id2snp_impl.cpp.
Referenced by IsValidNAVersion(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
Definition at line 157 of file id2snp_impl.cpp.
Referenced by IsValidNAVersion(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
|
static |
Definition at line 74 of file id2snp_impl.cpp.
Definition at line 159 of file id2snp_impl.cpp.
Referenced by IsValidSeqIndex(), CID2SNPProcessor_Impl::x_GetBlobId(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
Definition at line 149 of file id2snp_impl.cpp.
Referenced by CID2SNPProcessor_Impl::x_GetBlobId(), and CID2SNPProcessor_Impl::x_ResolveBlobId().
Definition at line 165 of file id2snp_impl.cpp.
Referenced by CID2SNPProcessor_Impl::x_LoadBlob(), and CID2SNPProcessor_Impl::x_LoadChunk().
|
static |
Definition at line 277 of file id2snp_impl.cpp.
Referenced by CBuildDatabase::AddSequences(), BOOST_AUTO_TEST_CASE(), CBuildDatabase::Build(), CPhyloTreePS::CalcForces(), call_get_stack_size(), call_with_args(), CBamFileInfo::CBamFileInfo(), CompressAssembly(), emit_stack_frame_release(), CBDB_Cache::EvaluateTimeLine(), CExecute::Exec(), CMacroWorker::ExecuteMacros(), CFlatFileGenerator::Generate(), CSNPDataLoader_Impl::GetBlobByIdOnce(), GetBlobReader(), CSNPDataLoader_Impl::GetChunkOnce(), CSNPFileInfo::InitializeDb(), CBamRefSeqInfo::LoadAlignChunk(), CSNPDataLoader_Impl::LoadBlob(), CBamRefSeqInfo::LoadMainSplit(), CBamRefSeqInfo::LoadPileupChunk(), CBamRefSeqInfo::LoadSeqChunk(), CBDB_SplitTest::LoadSplitStore(), CBDB_SplitTest::LoadTestSet(), CConnTestThread::Main(), CSeqGraphicWidget::OnDataChanged(), CLBLASTUIDataSource::Open(), CNetBLASTUIDataSource::Open(), CBamUIDataSource::Open(), CGenBankUIDataSource::Open(), CSQLITE3_Cache::Open(), CAlignSort::SAlignExtractor::operator()(), CQueryExecEvalFunc::operator()(), operator<<(), CSequenceInputStats::PrintReport(), CBam2GraphApp::ProcessFile(), CGlCgiImageApplication::ProcessRequest(), CBamIndex::Read(), CBiosampleChkApp::ReadClassMember(), CAsnvalThreadState::ReadClassMember(), CSeqDescrRetrievalJob::Run(), CAnnotMetaDataJob::Run(), CPubmedFetchApplication::Run(), CBlastInputDemoApplication::Run(), CAsnCacheTestApplication::Run(), CCacheIndexCopyApp::Run(), CConcatSeqEntriesApplication::Run(), CAsnCacheDumpSeqIdsApplication::Run(), CAsnSubCacheCreateApplication::Run(), CWalkAsnCacheApplication::Run(), CDemoApp::Run(), CMytestApplication::Run(), CProjBulderApp::Run(), CObjConvProfile::Run(), CSampleNetScheduleClient::Run(), CConvImageApp::Run(), CSubImageApp::Run(), s_GetDBTree(), CSparseGraph::Save(), CCachedTaxon3_impl::SendOrgRefList(), skip_frames_before_return(), sljit_emit_enter(), sljit_emit_get_return_address(), sljit_emit_mem(), sljit_emit_op_dst(), sljit_set_context(), tail_call_reg_arg_with_args(), tail_call_with_args(), UncomressAndCreate(), CPhyloTreePS::Update(), CAsnvalThreadState::ValidateTraditionally(), CAsnvalThreadState::ValidateWorker(), CThread::WaitForAllThreads(), CBuildDatabase::x_AddRemoteSequences(), CPrimeCacheApplication::x_CacheSeqEntry(), CForceJob::x_Calculate(), CImportFeatTable::x_CreateCommand(), CAlnMultiDSBuilder::x_CreateSparseDataSource(), CComponentSearchJob::x_DoSearch(), CVcfSearchJob::x_DoSearch(), CCrossPanelIR::x_DrawCrossAlignment(), CBuildDatabase::x_DupLocal(), CBlastVdbCmdApp::x_FormatRuntime(), CNAUtils::x_GetAllNAIds(), CNAUtils::x_GetNAMetaData(), CRemoteBlast::x_GetRequestInfoFromRID(), CRemoteBlast::x_GetSubjects(), CBlastVdbCmdApp::x_GetVDBBlastUtil(), CCSRARefSeqInfo::x_LoadRangesStat(), CBlastVdbCmdApp::x_PrintBlastDatabaseInformation(), CBlastVdbCmdApp::x_PrintVDBPaths(), CPrimeCacheApplication::x_Process_Fasta(), CPrimeCacheApplication::x_Process_Ids(), CNetScheduleHandler::x_ProcessMsgBatchSubmit(), CId2FetchApp::x_ProcessRequest(), CBGZFFile::x_ReadBlock(), CPagedFile::x_ReadPage(), CRemoteBlast::x_SendRequest(), CAlignTabExportPage2::x_StartNAAlignNamesJob(), CReadIndexSpeedApp::x_WalkIndex(), and CEditObjectFeaturePropagate::xGetEditCommandAllSequences().