NCBI C++ ToolKit
Classes | Macros | Functions | Variables
wgsloader_impl.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <objects/general/general__.hpp>
#include <objects/seqloc/seqloc__.hpp>
#include <objects/seq/seq__.hpp>
#include <objects/seqres/seqres__.hpp>
#include <objects/seqsplit/ID2S_Split_Info.hpp>
#include <objects/seqsplit/ID2S_Chunk.hpp>
#include <objmgr/impl/data_source.hpp>
#include <objmgr/impl/tse_loadlock.hpp>
#include <objmgr/impl/tse_chunk_info.hpp>
#include <objmgr/impl/tse_split_info.hpp>
#include <objmgr/impl/split_parser.hpp>
#include <objmgr/data_loader_factory.hpp>
#include <corelib/plugin_manager_impl.hpp>
#include <corelib/plugin_manager_store.hpp>
#include <serial/objistr.hpp>
#include <serial/serial.hpp>
#include <util/thread_nonstop.hpp>
#include <sra/error_codes.hpp>
#include <sra/readers/ncbi_traces_path.hpp>
#include <sra/readers/sra/wgsresolver.hpp>
#include <sra/readers/sra/impl/wgsresolver_impl.hpp>
#include <sra/data_loaders/wgs/wgsloader.hpp>
#include <sra/data_loaders/wgs/impl/wgsloader_impl.hpp>
#include <util/sequtil/sequtil_manip.hpp>
#include <algorithm>
#include <cmath>
+ Include dependency graph for wgsloader_impl.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CIndexUpdateThread
 
class  CWGSResolver_DL
 

Macros

#define NCBI_USE_ERRCODE_X   WGSLoader
 

Functions

 NCBI_DEFINE_ERR_SUBCODE_X (23)
 
 NCBI_PARAM_DECL (int, WGS_LOADER, DEBUG)
 
 NCBI_PARAM_DEF_EX (int, WGS_LOADER, DEBUG, 0, eParam_NoThread, WGS_LOADER_DEBUG)
 
static int GetDebugLevel (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, MASTER_DESCR)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, MASTER_DESCR, true)
 
static bool GetMasterDescrParam (void)
 
 NCBI_PARAM_DECL (size_t, WGS_LOADER, GC_SIZE)
 
 NCBI_PARAM_DEF (size_t, WGS_LOADER, GC_SIZE, 100)
 
static size_t GetGCSizeParam (void)
 
 NCBI_PARAM_DECL (string, WGS_LOADER, VOL_PATH)
 
 NCBI_PARAM_DEF (string, WGS_LOADER, VOL_PATH, "")
 
static string GetWGSVolPath (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, RESOLVE_GIS)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, RESOLVE_GIS, true)
 
static bool GetResolveGIsParam (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, RESOLVE_PROT_ACCS)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, RESOLVE_PROT_ACCS, true)
 
static bool GetResolveProtAccsParam (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, SPLIT_QUALITY_GRAPH)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, SPLIT_QUALITY_GRAPH, true)
 
static bool GetSplitQualityGraphParam (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, SPLIT_SEQUENCE)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, SPLIT_SEQUENCE, true)
 
static bool GetSplitSequenceParam (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, SPLIT_FEATURES)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, SPLIT_FEATURES, true)
 
static bool GetSplitFeaturesParam (void)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, KEEP_REPLACED)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, KEEP_REPLACED, true)
 
 NCBI_PARAM_DECL (bool, WGS_LOADER, KEEP_MIGRATED)
 
 NCBI_PARAM_DEF (bool, WGS_LOADER, KEEP_MIGRATED, false)
 
static bool GetKeepReplacedParam (void)
 
static bool GetKeepMigratedParam (void)
 
 NCBI_PARAM_DECL (unsigned, WGS_LOADER, INDEX_UPDATE_TIME)
 
 NCBI_PARAM_DEF (unsigned, WGS_LOADER, INDEX_UPDATE_TIME, 600)
 
static unsigned GetIndexUpdateTimeParam (void)
 
 NCBI_PARAM_DECL (unsigned, WGS_LOADER, RETRY_COUNT)
 
 NCBI_PARAM_DEF (unsigned, WGS_LOADER, RETRY_COUNT, 3)
 
static unsigned GetRetryCountParam (void)
 
 NCBI_PARAM_DECL (unsigned, WGS_LOADER, FILE_REOPEN_TIME)
 
 NCBI_PARAM_DEF (unsigned, WGS_LOADER, FILE_REOPEN_TIME, 60 *60)
 
static unsigned GetFileReopenTimeParam (void)
 
 NCBI_PARAM_DECL (unsigned, WGS_LOADER, FILE_RECHECK_TIME)
 
 NCBI_PARAM_DEF (unsigned, WGS_LOADER, FILE_RECHECK_TIME, 5 *60)
 
static unsigned GetFileRecheckTimeParam (void)
 
void sx_Update (CWGSResolver &resolver)
 
 NCBI_PARAM_DECL (bool, WGS, RESOLVER_GENBANK)
 
 NCBI_PARAM_DEF (bool, WGS, RESOLVER_GENBANK, true)
 
static bool s_ValidateAcc (const CConstRef< CSeq_id > &real_seq_id, const CTextseq_id &asked_text_id)
 
static CBioseq_Handle::TBioseqStateFlags s_GBStateToOM (NCBI_gb_state gb_state)
 

Variables

static const size_t kMaxWGSProteinAccLen = 3+7
 
static const size_t kMinWGSPrefixLetters = 4
 
static const size_t kMaxWGSPrefixLetters = 6
 
static const size_t kWGSPrefixDigits = 2
 
 BEGIN_LOCAL_NAMESPACE
 
 END_LOCAL_NAMESPACE
 

Macro Definition Documentation

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   WGSLoader

Definition at line 78 of file wgsloader_impl.cpp.

Function Documentation

◆ GetDebugLevel()

static int GetDebugLevel ( void  )
static

◆ GetFileRecheckTimeParam()

static unsigned GetFileRecheckTimeParam ( void  )
static

Definition at line 248 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

◆ GetFileReopenTimeParam()

static unsigned GetFileReopenTimeParam ( void  )
static

Definition at line 236 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

◆ GetGCSizeParam()

static size_t GetGCSizeParam ( void  )
static

Definition at line 113 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE.

◆ GetIndexUpdateTimeParam()

static unsigned GetIndexUpdateTimeParam ( void  )
static

Definition at line 212 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

◆ GetKeepMigratedParam()

static bool GetKeepMigratedParam ( void  )
static

Definition at line 200 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

Referenced by CWGSFileInfo::SAccFileInfo::IsMigrated().

◆ GetKeepReplacedParam()

static bool GetKeepReplacedParam ( void  )
static

Definition at line 192 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

Referenced by CWGSDataLoader_Impl::GetWGSFile().

◆ GetMasterDescrParam()

static bool GetMasterDescrParam ( void  )
static

Definition at line 104 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE.

◆ GetResolveGIsParam()

static bool GetResolveGIsParam ( void  )
static

Definition at line 132 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE.

◆ GetResolveProtAccsParam()

static bool GetResolveProtAccsParam ( void  )
static

Definition at line 142 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

◆ GetRetryCountParam()

static unsigned GetRetryCountParam ( void  )
static

Definition at line 224 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

◆ GetSplitFeaturesParam()

static bool GetSplitFeaturesParam ( void  )
static

Definition at line 178 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

Referenced by CWGSFileInfo::LoadBlob().

◆ GetSplitQualityGraphParam()

static bool GetSplitQualityGraphParam ( void  )
static

Definition at line 154 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

Referenced by CWGSFileInfo::LoadBlob().

◆ GetSplitSequenceParam()

static bool GetSplitSequenceParam ( void  )
static

Definition at line 166 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE, and rapidjson::value.

Referenced by CWGSFileInfo::LoadBlob().

◆ GetWGSVolPath()

static string GetWGSVolPath ( void  )
static

Definition at line 122 of file wgsloader_impl.cpp.

References NCBI_PARAM_TYPE.

Referenced by CWGSDataLoader_Impl::CWGSDataLoader_Impl().

◆ NCBI_DEFINE_ERR_SUBCODE_X()

NCBI_DEFINE_ERR_SUBCODE_X ( 23  )

◆ NCBI_PARAM_DECL() [1/16]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
RESOLVER_GENBANK   
)

◆ NCBI_PARAM_DECL() [2/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
KEEP_MIGRATED   
)

◆ NCBI_PARAM_DECL() [3/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
KEEP_REPLACED   
)

◆ NCBI_PARAM_DECL() [4/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
MASTER_DESCR   
)

◆ NCBI_PARAM_DECL() [5/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
RESOLVE_GIS   
)

◆ NCBI_PARAM_DECL() [6/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
RESOLVE_PROT_ACCS   
)

◆ NCBI_PARAM_DECL() [7/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
SPLIT_FEATURES   
)

◆ NCBI_PARAM_DECL() [8/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
SPLIT_QUALITY_GRAPH   
)

◆ NCBI_PARAM_DECL() [9/16]

NCBI_PARAM_DECL ( bool  ,
WGS_LOADER  ,
SPLIT_SEQUENCE   
)

◆ NCBI_PARAM_DECL() [10/16]

NCBI_PARAM_DECL ( int  ,
WGS_LOADER  ,
DEBUG   
)

◆ NCBI_PARAM_DECL() [11/16]

NCBI_PARAM_DECL ( size_t  ,
WGS_LOADER  ,
GC_SIZE   
)

◆ NCBI_PARAM_DECL() [12/16]

NCBI_PARAM_DECL ( string  ,
WGS_LOADER  ,
VOL_PATH   
)

◆ NCBI_PARAM_DECL() [13/16]

NCBI_PARAM_DECL ( unsigned  ,
WGS_LOADER  ,
FILE_RECHECK_TIME   
)

◆ NCBI_PARAM_DECL() [14/16]

NCBI_PARAM_DECL ( unsigned  ,
WGS_LOADER  ,
FILE_REOPEN_TIME   
)

◆ NCBI_PARAM_DECL() [15/16]

NCBI_PARAM_DECL ( unsigned  ,
WGS_LOADER  ,
INDEX_UPDATE_TIME   
)

◆ NCBI_PARAM_DECL() [16/16]

NCBI_PARAM_DECL ( unsigned  ,
WGS_LOADER  ,
RETRY_COUNT   
)

◆ NCBI_PARAM_DEF() [1/15]

NCBI_PARAM_DEF ( bool  ,
WGS  ,
RESOLVER_GENBANK  ,
true   
)

◆ NCBI_PARAM_DEF() [2/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
KEEP_MIGRATED  ,
false   
)

◆ NCBI_PARAM_DEF() [3/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
KEEP_REPLACED  ,
true   
)

◆ NCBI_PARAM_DEF() [4/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
MASTER_DESCR  ,
true   
)

◆ NCBI_PARAM_DEF() [5/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
RESOLVE_GIS  ,
true   
)

◆ NCBI_PARAM_DEF() [6/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
RESOLVE_PROT_ACCS  ,
true   
)

◆ NCBI_PARAM_DEF() [7/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
SPLIT_FEATURES  ,
true   
)

◆ NCBI_PARAM_DEF() [8/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
SPLIT_QUALITY_GRAPH  ,
true   
)

◆ NCBI_PARAM_DEF() [9/15]

NCBI_PARAM_DEF ( bool  ,
WGS_LOADER  ,
SPLIT_SEQUENCE  ,
true   
)

◆ NCBI_PARAM_DEF() [10/15]

NCBI_PARAM_DEF ( size_t  ,
WGS_LOADER  ,
GC_SIZE  ,
100   
)

◆ NCBI_PARAM_DEF() [11/15]

NCBI_PARAM_DEF ( string  ,
WGS_LOADER  ,
VOL_PATH  ,
""   
)

◆ NCBI_PARAM_DEF() [12/15]

NCBI_PARAM_DEF ( unsigned  ,
WGS_LOADER  ,
FILE_RECHECK_TIME  ,
5 *  60 
)

◆ NCBI_PARAM_DEF() [13/15]

NCBI_PARAM_DEF ( unsigned  ,
WGS_LOADER  ,
FILE_REOPEN_TIME  ,
60 *  60 
)

◆ NCBI_PARAM_DEF() [14/15]

NCBI_PARAM_DEF ( unsigned  ,
WGS_LOADER  ,
INDEX_UPDATE_TIME  ,
600   
)

◆ NCBI_PARAM_DEF() [15/15]

NCBI_PARAM_DEF ( unsigned  ,
WGS_LOADER  ,
RETRY_COUNT  ,
 
)

◆ NCBI_PARAM_DEF_EX()

NCBI_PARAM_DEF_EX ( int  ,
WGS_LOADER  ,
DEBUG  ,
,
eParam_NoThread  ,
WGS_LOADER_DEBUG   
)

◆ s_GBStateToOM()

static CBioseq_Handle::TBioseqStateFlags s_GBStateToOM ( NCBI_gb_state  gb_state)
static

◆ s_ValidateAcc()

static bool s_ValidateAcc ( const CConstRef< CSeq_id > &  real_seq_id,
const CTextseq_id asked_text_id 
)
static

◆ sx_Update()

void sx_Update ( CWGSResolver resolver)

Variable Documentation

◆ BEGIN_LOCAL_NAMESPACE

BEGIN_LOCAL_NAMESPACE

Definition at line 352 of file wgsloader_impl.cpp.

◆ END_LOCAL_NAMESPACE

END_LOCAL_NAMESPACE

Definition at line 407 of file wgsloader_impl.cpp.

◆ kMaxWGSPrefixLetters

const size_t kMaxWGSPrefixLetters = 6
static

Definition at line 87 of file wgsloader_impl.cpp.

Referenced by CWGSDataLoader_Impl::GetFileInfoByAcc().

◆ kMaxWGSProteinAccLen

const size_t kMaxWGSProteinAccLen = 3+7
static

Definition at line 85 of file wgsloader_impl.cpp.

Referenced by CWGSDataLoader_Impl::GetFileInfoByAcc().

◆ kMinWGSPrefixLetters

const size_t kMinWGSPrefixLetters = 4
static

Definition at line 86 of file wgsloader_impl.cpp.

Referenced by CWGSDataLoader_Impl::GetFileInfoByAcc().

◆ kWGSPrefixDigits

const size_t kWGSPrefixDigits = 2
static

Definition at line 88 of file wgsloader_impl.cpp.

Referenced by CWGSDataLoader_Impl::GetFileInfoByAcc().

Modified on Fri Sep 20 14:57:09 2024 by modify_doxy.py rev. 669887