NCBI C++ ToolKit
Classes | Macros | Functions | Variables
wgsresolver_impl.cpp File Reference
#include <ncbi_pch.hpp>
#include <sra/readers/sra/impl/wgsresolver_impl.hpp>
#include <sra/readers/ncbi_traces_path.hpp>
#include <corelib/ncbifile.hpp>
#include <corelib/ncbi_param.hpp>
#include <util/line_reader.hpp>
#include <sra/error_codes.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/general/Dbtag.hpp>
+ Include dependency graph for wgsresolver_impl.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  CWGSResolver_VDB::SGiIdxTableCursor
 
struct  CWGSResolver_VDB::SAccIdxTableCursor
 

Macros

#define NCBI_USE_ERRCODE_X   WGSResolver
 
#define DEFAULT_WGS_INDEX_ACC   "ZZZZ99"
 
#define DEFAULT_WGS_INDEX2_ACC   "ZZZZ98"
 
#define DEFAULT_WGS_INDEX3_ACC   "ZZZZ97"
 
#define DEFAULT_WGS_INDEX_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ99"
 
#define DEFAULT_WGS_INDEX_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_INDEX"
 
#define DEFAULT_WGS_INDEX2_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ98"
 
#define DEFAULT_WGS_INDEX2_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_INDEX_V2"
 
#define DEFAULT_WGS_INDEX3_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ97"
 
#define DEFAULT_WGS_INDEX3_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_INDEX_V3"
 
#define DEFAULT_WGS_RANGE_INDEX_ACC   "ZZZZ79"
 
#define DEFAULT_WGS_RANGE_INDEX2_ACC   "ZZZZ78"
 
#define DEFAULT_WGS_RANGE_INDEX_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ79"
 
#define DEFAULT_WGS_RANGE_INDEX_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_RANGE_INDEX_1"
 
#define DEFAULT_WGS_RANGE_INDEX2_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ78"
 
#define DEFAULT_WGS_RANGE_INDEX2_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_RANGE_INDEX_2"
 
#define PROFILE(var)
 

Functions

 NCBI_DEFINE_ERR_SUBCODE_X (36)
 
 BEGIN_NAMESPACE (objects)
 
 NCBI_PARAM_DECL (bool, WGS, RESOLVER_DIRECT_WGS_INDEX)
 
 NCBI_PARAM_DEF (bool, WGS, RESOLVER_DIRECT_WGS_INDEX, true)
 
 NCBI_PARAM_DECL (bool, WGS, RESOLVER_WGS_RANGE_INDEX)
 
 NCBI_PARAM_DEF (bool, WGS, RESOLVER_WGS_RANGE_INDEX, true)
 
static bool s_UseWGSRangeIndex (void)
 
 NCBI_PARAM_DECL (string, WGS, WGS_INDEX)
 
 NCBI_PARAM_DEF (string, WGS, WGS_INDEX, "")
 
 NCBI_PARAM_DECL (string, WGS, WGS_INDEX2)
 
 NCBI_PARAM_DEF (string, WGS, WGS_INDEX2, "")
 
 NCBI_PARAM_DECL (string, WGS, WGS_INDEX3)
 
 NCBI_PARAM_DEF (string, WGS, WGS_INDEX3, "")
 
 NCBI_PARAM_DECL (string, WGS, WGS_INDEX_ACC)
 
 NCBI_PARAM_DEF (string, WGS, WGS_INDEX_ACC, "ZZZZ99")
 
 NCBI_PARAM_DECL (string, WGS, WGS_INDEX2_ACC)
 
 NCBI_PARAM_DEF (string, WGS, WGS_INDEX2_ACC, "ZZZZ98")
 
 NCBI_PARAM_DECL (string, WGS, WGS_INDEX3_ACC)
 
 NCBI_PARAM_DEF (string, WGS, WGS_INDEX3_ACC, "ZZZZ97")
 
 NCBI_PARAM_DECL (string, WGS, WGS_RANGE_INDEX)
 
 NCBI_PARAM_DEF (string, WGS, WGS_RANGE_INDEX, "")
 
 NCBI_PARAM_DECL (string, WGS, WGS_RANGE_INDEX2)
 
 NCBI_PARAM_DEF (string, WGS, WGS_RANGE_INDEX2, "")
 
 NCBI_PARAM_DECL (string, WGS, WGS_RANGE_INDEX_ACC)
 
 NCBI_PARAM_DEF (string, WGS, WGS_RANGE_INDEX_ACC, "ZZZZ79")
 
 NCBI_PARAM_DECL (string, WGS, WGS_RANGE_INDEX2_ACC)
 
 NCBI_PARAM_DEF (string, WGS, WGS_RANGE_INDEX2_ACC, "ZZZZ78")
 
static string GetDirectWGSIndexPath (CWGSResolver_VDB::EIndexType index_type)
 
static bool s_SplitAccIndex (string &uacc, Uint2 &key_num)
 
 END_NAMESPACE (objects)
 

Variables

 BEGIN_NCBI_NAMESPACE
 
static const size_t kTypePrefixLen = 4
 
static const size_t kNumLettersV1 = 4
 
static const size_t kNumLettersV2 = 6
 
static const size_t kVersionDigits = 2
 
static const size_t kPrefixLenV1 = kNumLettersV1 + kVersionDigits
 
static const size_t kPrefixLenV2 = kNumLettersV2 + kVersionDigits
 
static const size_t kMinRowDigitsV1 = 6
 
static const size_t kMaxRowDigitsV1 = 8
 
static const size_t kMinRowDigitsV2 = 7
 
static const size_t kMaxRowDigitsV2 = 9
 
 END_NCBI_NAMESPACE
 

Macro Definition Documentation

◆ DEFAULT_WGS_INDEX2_ACC

#define DEFAULT_WGS_INDEX2_ACC   "ZZZZ98"

Definition at line 53 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX2_PATH1

#define DEFAULT_WGS_INDEX2_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ98"

Definition at line 57 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX2_PATH2

#define DEFAULT_WGS_INDEX2_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_INDEX_V2"

Definition at line 58 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX3_ACC

#define DEFAULT_WGS_INDEX3_ACC   "ZZZZ97"

Definition at line 54 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX3_PATH1

#define DEFAULT_WGS_INDEX3_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ97"

Definition at line 59 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX3_PATH2

#define DEFAULT_WGS_INDEX3_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_INDEX_V3"

Definition at line 60 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX_ACC

#define DEFAULT_WGS_INDEX_ACC   "ZZZZ99"

Definition at line 52 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX_PATH1

#define DEFAULT_WGS_INDEX_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ99"

Definition at line 55 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_INDEX_PATH2

#define DEFAULT_WGS_INDEX_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_INDEX"

Definition at line 56 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_RANGE_INDEX2_ACC

#define DEFAULT_WGS_RANGE_INDEX2_ACC   "ZZZZ78"

Definition at line 63 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_RANGE_INDEX2_PATH1

#define DEFAULT_WGS_RANGE_INDEX2_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ78"

Definition at line 66 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_RANGE_INDEX2_PATH2

#define DEFAULT_WGS_RANGE_INDEX2_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_RANGE_INDEX_2"

Definition at line 67 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_RANGE_INDEX_ACC

#define DEFAULT_WGS_RANGE_INDEX_ACC   "ZZZZ79"

Definition at line 62 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_RANGE_INDEX_PATH1

#define DEFAULT_WGS_RANGE_INDEX_PATH1   NCBI_TRACES04_PATH "/wgs03/WGS/ZZ/ZZ/ZZZZ79"

Definition at line 64 of file wgsresolver_impl.cpp.

◆ DEFAULT_WGS_RANGE_INDEX_PATH2

#define DEFAULT_WGS_RANGE_INDEX_PATH2   NCBI_TRACES04_PATH "/wgs03/WGS/WGS_RANGE_INDEX_1"

Definition at line 65 of file wgsresolver_impl.cpp.

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   WGSResolver

Definition at line 46 of file wgsresolver_impl.cpp.

◆ PROFILE

#define PROFILE (   var)

Definition at line 157 of file wgsresolver_impl.cpp.

Function Documentation

◆ BEGIN_NAMESPACE()

BEGIN_NAMESPACE ( objects  )

◆ END_NAMESPACE()

END_NAMESPACE ( objects  )

◆ GetDirectWGSIndexPath()

static string GetDirectWGSIndexPath ( CWGSResolver_VDB::EIndexType  index_type)
static

◆ NCBI_DEFINE_ERR_SUBCODE_X()

NCBI_DEFINE_ERR_SUBCODE_X ( 36  )

◆ NCBI_PARAM_DECL() [1/12]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
RESOLVER_DIRECT_WGS_INDEX   
)

◆ NCBI_PARAM_DECL() [2/12]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
RESOLVER_WGS_RANGE_INDEX   
)

◆ NCBI_PARAM_DECL() [3/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_INDEX   
)

◆ NCBI_PARAM_DECL() [4/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_INDEX2   
)

◆ NCBI_PARAM_DECL() [5/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_INDEX2_ACC   
)

◆ NCBI_PARAM_DECL() [6/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_INDEX3   
)

◆ NCBI_PARAM_DECL() [7/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_INDEX3_ACC   
)

◆ NCBI_PARAM_DECL() [8/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_INDEX_ACC   
)

◆ NCBI_PARAM_DECL() [9/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_RANGE_INDEX   
)

◆ NCBI_PARAM_DECL() [10/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_RANGE_INDEX2   
)

◆ NCBI_PARAM_DECL() [11/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_RANGE_INDEX2_ACC   
)

◆ NCBI_PARAM_DECL() [12/12]

NCBI_PARAM_DECL ( string  ,
WGS  ,
WGS_RANGE_INDEX_ACC   
)

◆ NCBI_PARAM_DEF() [1/12]

NCBI_PARAM_DEF ( bool  ,
WGS  ,
RESOLVER_DIRECT_WGS_INDEX  ,
true   
)

◆ NCBI_PARAM_DEF() [2/12]

NCBI_PARAM_DEF ( bool  ,
WGS  ,
RESOLVER_WGS_RANGE_INDEX  ,
true   
)

◆ NCBI_PARAM_DEF() [3/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_INDEX  ,
""   
)

◆ NCBI_PARAM_DEF() [4/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_INDEX2  ,
""   
)

◆ NCBI_PARAM_DEF() [5/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_INDEX2_ACC  ,
"ZZZZ98"   
)

◆ NCBI_PARAM_DEF() [6/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_INDEX3  ,
""   
)

◆ NCBI_PARAM_DEF() [7/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_INDEX3_ACC  ,
"ZZZZ97"   
)

◆ NCBI_PARAM_DEF() [8/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_INDEX_ACC  ,
"ZZZZ99"   
)

◆ NCBI_PARAM_DEF() [9/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_RANGE_INDEX  ,
""   
)

◆ NCBI_PARAM_DEF() [10/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_RANGE_INDEX2  ,
""   
)

◆ NCBI_PARAM_DEF() [11/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_RANGE_INDEX2_ACC  ,
"ZZZZ78"   
)

◆ NCBI_PARAM_DEF() [12/12]

NCBI_PARAM_DEF ( string  ,
WGS  ,
WGS_RANGE_INDEX_ACC  ,
"ZZZZ79"   
)

◆ s_SplitAccIndex()

static bool s_SplitAccIndex ( string uacc,
Uint2 key_num 
)
inlinestatic

Definition at line 587 of file wgsresolver_impl.cpp.

References i.

Referenced by CWGSResolver_VDB::x_GetAccPrefixes().

◆ s_UseWGSRangeIndex()

static bool s_UseWGSRangeIndex ( void  )
inlinestatic

Variable Documentation

◆ BEGIN_NCBI_NAMESPACE

BEGIN_NCBI_NAMESPACE

Definition at line 44 of file wgsresolver_impl.cpp.

◆ END_NCBI_NAMESPACE

END_NCBI_NAMESPACE

Definition at line 992 of file wgsresolver_impl.cpp.

◆ kMaxRowDigitsV1

const size_t kMaxRowDigitsV1 = 8
static

Definition at line 716 of file wgsresolver_impl.cpp.

Referenced by CWGSResolver_Ids::ParseWGSAcc().

◆ kMaxRowDigitsV2

const size_t kMaxRowDigitsV2 = 9
static

Definition at line 718 of file wgsresolver_impl.cpp.

Referenced by CWGSResolver_Ids::ParseWGSAcc().

◆ kMinRowDigitsV1

const size_t kMinRowDigitsV1 = 6
static

Definition at line 715 of file wgsresolver_impl.cpp.

Referenced by CWGSResolver_Ids::ParseWGSAcc().

◆ kMinRowDigitsV2

const size_t kMinRowDigitsV2 = 7
static

Definition at line 717 of file wgsresolver_impl.cpp.

◆ kNumLettersV1

const size_t kNumLettersV1 = 4
static

◆ kNumLettersV2

const size_t kNumLettersV2 = 6
static

◆ kPrefixLenV1

const size_t kPrefixLenV1 = kNumLettersV1 + kVersionDigits
static

◆ kPrefixLenV2

const size_t kPrefixLenV2 = kNumLettersV2 + kVersionDigits
static

◆ kTypePrefixLen

const size_t kTypePrefixLen = 4
static

Definition at line 709 of file wgsresolver_impl.cpp.

Referenced by CWGSResolver_Ids::ParseWGSPrefix().

◆ kVersionDigits

const size_t kVersionDigits = 2
static
Modified on Fri Sep 20 14:57:29 2024 by modify_doxy.py rev. 669887