NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions | Variables
wgsread.cpp File Reference
#include <ncbi_pch.hpp>
#include <sra/readers/sra/wgsread.hpp>
#include <sra/readers/ncbi_traces_path.hpp>
#include <corelib/ncbistr.hpp>
#include <corelib/ncbifile.hpp>
#include <corelib/ncbi_param.hpp>
#include <util/line_reader.hpp>
#include <objects/general/general__.hpp>
#include <objects/seq/seq__.hpp>
#include <objects/seqset/seqset__.hpp>
#include <objects/seqloc/seqloc__.hpp>
#include <objects/seqalign/seqalign__.hpp>
#include <objects/seqres/seqres__.hpp>
#include <objects/seqfeat/seqfeat__.hpp>
#include <objects/seqsplit/seqsplit__.hpp>
#include <serial/objistrasnb.hpp>
#include <serial/objostrasnb.hpp>
#include <serial/serial.hpp>
#include <serial/pack_string.hpp>
#include <serial/objhook.hpp>
#include <serial/objectio.hpp>
#include <sra/error_codes.hpp>
#include <sra/readers/sra/kdbread.hpp>
#include <ncbi/ncbi.h>
#include <insdc/insdc.h>
#include <sra/readers/sra/impl/wgs-contig.h>
#include <vdb/vdb-priv.h>
#include <numeric>
+ Include dependency graph for wgsread.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CWGSAsnBinData
 
struct  CWGSAsnBinData::SFtableInfo
 
class  CFtableWriteHook
 
class  CDescrWriteHook
 
struct  CWGSDb_Impl::SSeq0TableCursor
 
struct  CWGSDb_Impl::SSeqTableCursor
 
struct  CWGSDb_Impl::SSeq4naTableCursor
 
struct  CWGSDb_Impl::SScfTableCursor
 
struct  CWGSDb_Impl::SProt0TableCursor
 
struct  CWGSDb_Impl::SProtTableCursor
 
struct  CWGSDb_Impl::SFeatTableCursor
 
struct  CWGSDb_Impl::SGiIdxTableCursor
 
struct  CWGSDb_Impl::SProtIdxTableCursor
 
struct  CWGSDb_Impl::SAmbiguityInfo
 
struct  CWGSDb_Impl::SAmbiguityInfo::S4naBlock
 
struct  CWGSDb_Impl::SAmbiguityInfo::S4naReader
 
class  SStaticGlobalAmbiguityCacheCallbacks
 
struct  SWGSCreateInfo
 
struct  CWGSSeqIterator::SAmbiguityAccess
 
struct  SWGSFeatChunkInfo
 
struct  SWGSFeatChunkInfo::SFeatureSet
 

Macros

#define USE_GLOBAL_AMBIGUITY_CACHE
 
#define DEFAULT_AMBIGUITY_CACHE_SIZE   "128MB"
 
#define NCBI_USE_ERRCODE_X   WGSReader
 
#define PROFILE(var)
 

Typedefs

typedef limited_resource_map< pair< string, TVDBRowId >, CRef< CWGSDb_Impl::SAmbiguityInfo >, size_t > TGlobalAmbiguityCache
 

Enumerations

enum  EChunkType {
  eChunk_prod , eChunk_data , eChunk_feat , eChunk_qual ,
  kChunkIdStep = 4
}
 
enum  EFromFlags { eFromFlags }
 
enum  EFromSplitVersion { eFromSplitVersion }
 
enum  EDeltaType { eDelta_all , eDelta_split }
 

Functions

 NCBI_DEFINE_ERR_SUBCODE_X (19)
 
 BEGIN_NAMESPACE (objects)
 
 NCBI_PARAM_DECL (int, WGS, DEBUG)
 
 NCBI_PARAM_DEF_EX (int, WGS, DEBUG, 0, eParam_NoThread, WGS_DEBUG)
 
static int s_GetDebugLevel (void)
 
 NCBI_PARAM_DECL (bool, WGS, MASTER_DESCR)
 
 NCBI_PARAM_DEF (bool, WGS, MASTER_DESCR, true)
 
 NCBI_PARAM_DECL (bool, WGS, CLIP_BY_QUALITY)
 
 NCBI_PARAM_DEF_EX (bool, WGS, CLIP_BY_QUALITY, true, eParam_NoThread, CSRA_CLIP_BY_QUALITY)
 
static bool s_GetClipByQuality (void)
 
 NCBI_PARAM_DECL (bool, WGS, USE_AMBIGUITY_MASK)
 
 NCBI_PARAM_DEF_EX (bool, WGS, USE_AMBIGUITY_MASK, true, eParam_NoThread, WGS_USE_AMBIGUITY_MASK)
 
static bool s_UseAmbiguityMask (void)
 
 NCBI_PARAM_DECL (bool, WGS, USE_GAP_INFO)
 
 NCBI_PARAM_DEF_EX (bool, WGS, USE_GAP_INFO, true, eParam_NoThread, WGS_USE_GAP_INFO)
 
static bool s_UseGapInfo (void)
 
 NCBI_PARAM_DECL (bool, WGS, USE_AMBIGUITY_4NA)
 
 NCBI_PARAM_DEF_EX (bool, WGS, USE_AMBIGUITY_4NA, true, eParam_NoThread, WGS_USE_AMBIGUITY_4NA)
 
static bool s_UseAmbiguity4na (void)
 
 NCBI_PARAM_DECL (bool, WGS, USE_FULL_4NA_BLOCKS)
 
 NCBI_PARAM_DEF_EX (bool, WGS, USE_FULL_4NA_BLOCKS, false, eParam_NoThread, WGS_USE_FULL_4NA_BLOCKS)
 
static bool s_UseFull4naBlocks (void)
 
 NCBI_PARAM_DECL (string, WGS, AMBIGUITY_CACHE)
 
 NCBI_PARAM_DEF_EX (string, WGS, AMBIGUITY_CACHE, "128MB", eParam_NoThread, WGS_AMBIGUITY_CACHE)
 
static size_t s_GetAmbiguityCacheSize (void)
 
template<class Value >
static void sx_Assign (vector< Value > &dst, const CVDBValueFor< Value > &src)
 
static bool sx_Is2na (Uint1 b)
 
static const Uint1sx_FindAmbiguity (const Uint1 *ptr, const Uint1 *end)
 
static Uint1 sx_Get_4na (const char *ptr, size_t offset)
 
static size_t sx_Find_4na_Ambiguity (const char *ptr, size_t offset, size_t base_count)
 
static bool sx_HasAmbiguity (const Uint1 *ptr, const Uint1 *end)
 
static bool sx_HasAmbiguity (const Uint1 *ptr, TSeqPos count, TSeqPos pos, CWGSDb_Impl::SAmbiguityInfo::TWGSContigGapInfo &gap_info)
 
static char s_ConvertBits_2na_to_4na (char bits_2na)
 
static char s_ConvertBits_2na_to_4na_1st (char bits_2na)
 
static char s_ConvertBits_2na_to_4na_2nd (char bits_2na)
 
static void s_Convert_2na_to_4na (char *dst_4na, const char *src_2na, size_t base_count)
 
static void s_Convert_2na_to_4na (vector< char > &dst_4na_vec, const vector< char > &src_2na_vec, size_t base_count)
 
static void s_Set_4na (vector< char > &dst_4na_vec, size_t offset, INSDC_4na_bin amb)
 
static void s_Set_4na_gap (vector< char > &dst_4na_vec, size_t offset, size_t len)
 
static void s_Copy_4na (char *dst_4na, TSeqPos dst_offset, const char *src_4na, TSeqPos src_offset, size_t base_count)
 
static void s_Pack_4na (char *dst_packed_4na, const Uint1 *src_4na, size_t base_count)
 
static void s_SetAmbiguitiesPos (vector< char > &dst_4na_vec, TSeqPos pos, TSeqPos len, const vector< INSDC_coord_zero > &amb_pos, const vector< INSDC_4na_bin > &amb_4na)
 
static void s_SetAmbiguitiesBlocks (vector< char > &dst_4na_vec, TSeqPos pos, TSeqPos len, const CWGSDb_Impl::SAmbiguityInfo::T4naBlocks &blocks)
 
static void s_SetGaps (vector< char > &dst_4na_vec, TSeqPos pos, TSeqPos len, CWGSSeqIterator::TWGSContigGapInfo gap_info)
 
 DEFINE_STATIC_FAST_MUTEX (s_GlobalAmbiguityCacheMutex)
 
bool sx_SetVersion (CSeq_id &id, int version)
 
bool sx_SetAccession (CSeq_id &id, CTempString accession)
 
int sx_NewStringToNonNegativeInt (CTempString str)
 
int sx_StringToNonNegativeInt (const CTempString &str)
 
int sx_GetStringId (CTempString str)
 
void sx_SetTag (CDbtag &tag, CTempString str)
 
void sx_AddDescrBytes (CSeq_descr &descr, CTempString bytes)
 
void sx_AddAnnotBytes (CBioseq::TAnnot &annot_set, CTempString bytes)
 
void sx_SetSplitId (CID2S_Bioseq_Ids::C_E &split_id, CSeq_id &id)
 
void sx_SetSplitId (CID2S_Chunk_Data::TId &split_id, CSeq_id &id)
 
void sx_AddSplitId (CID2S_Bioseq_Ids::Tdata &split_ids, CSeq_id &id)
 
void sx_AddSplitIds (CID2S_Bioseq_Ids::Tdata &split_ids, const CBioseq::TId &ids)
 
void sx_SetSplitInterval (CID2S_Seq_loc &split_loc, CSeq_id &id, TSeqPos pos, TSeqPos end)
 
static string s_GetUserObjectType (const CSeqdesc &desc)
 
static void s_AddUserObjectType (const CSeqdesc &desc, set< string > &existing_uo_types)
 
static TGi s_ToGi (TVDBRowId gi, const char *method)
 
static CWGSSeqIterator::TIncludeFlags s_ToFlags (CWGSSeqIterator::EWithdrawn withdrawn)
 
static TTaxId s_GetTaxId (const CVDBValueFor< NCBI_taxid > &value)
 
static void s_GetMinMax (const Uint1 *arr, size_t size, Uint1 &min_v, Uint1 &max_v)
 
static void sx_AddEvidence (CSeq_gap &gap, CLinkage_evidence::TType type)
 
static CRef< CSeq_literalsx_MakeGapLiteral (TSeqPos len, NCBI_WGS_component_props props, NCBI_WGS_gap_linkage gap_linkage)
 
static void s_AddGiRange (CID2S_Seq_loc::TLoc_set &loc_set, CSeq_id::TGi gi_range_start, CSeq_id::TGi gi_range_stop)
 
static bool sx_HasMoreProducts (const CWGSDb &db, TVDBRowIdRange range, size_t count)
 
static void sx_AddMasterDescr (const CWGSDb &db, SWGSCreateInfo &info, SWGSDb_Defs::TFlags flags)
 
 END_NAMESPACE (objects)
 

Variables

 BEGIN_NCBI_NAMESPACE
 
static const char kSeq_descrFirstByte = 49
 
static const TSeqPos kAmbiguityBlockSize = 1024
 
static bool kEnableSplitQual = true
 
static bool kEnableSplitData = true
 
static bool kEnableSplitProd = true
 
static bool kEnableSplitFeat = true
 
static int kAssignedDefaultSplitVersion = 1
 
static int kMainEntryId = 1
 
static const size_t kProdPerChunk = 64
 
static const size_t kMinFeatCountToSplit = 64
 
static const size_t kFeatPerChunk = 256
 
static const TSeqPos kQualChunkSize = 64<<10
 
static const TSeqPos kDataChunkSize = 256<<10
 
static const TSeqPos kMinDataSplitSize = 128<<10
 
static const bool kRecoverGaps = true
 
static CSafeStatic< TGlobalAmbiguityCache, SStaticGlobalAmbiguityCacheCallbackss_GlobalAmbiguityCache
 
 BEGIN_LOCAL_NAMESPACE
 
 END_LOCAL_NAMESPACE
 
static const TSeqPos kMin2naSize = kAmbiguityBlockSize
 
static const TSeqPos kChunk4naSize = 1<<16
 
static const TSeqPos kChunk2naSize = 1<<17
 
static const TSeqPos kSplit4naSize = kChunk4naSize+kChunk4naSize/4
 
static const TSeqPos kSplit2naSize = kChunk2naSize
 
 END_NCBI_NAMESPACE
 

Macro Definition Documentation

◆ DEFAULT_AMBIGUITY_CACHE_SIZE

#define DEFAULT_AMBIGUITY_CACHE_SIZE   "128MB"

Definition at line 70 of file wgsread.cpp.

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   WGSReader

Definition at line 77 of file wgsread.cpp.

◆ PROFILE

#define PROFILE (   var)

Definition at line 306 of file wgsread.cpp.

◆ USE_GLOBAL_AMBIGUITY_CACHE

#define USE_GLOBAL_AMBIGUITY_CACHE

Definition at line 67 of file wgsread.cpp.

Typedef Documentation

◆ TGlobalAmbiguityCache

Definition at line 2202 of file wgsread.cpp.

Enumeration Type Documentation

◆ EChunkType

enum EChunkType
Enumerator
eChunk_prod 
eChunk_data 
eChunk_feat 
eChunk_qual 
kChunkIdStep 

Definition at line 190 of file wgsread.cpp.

◆ EDeltaType

enum EDeltaType
Enumerator
eDelta_all 
eDelta_split 

Definition at line 5110 of file wgsread.cpp.

◆ EFromFlags

enum EFromFlags
Enumerator
eFromFlags 

Definition at line 3797 of file wgsread.cpp.

◆ EFromSplitVersion

Enumerator
eFromSplitVersion 

Definition at line 3800 of file wgsread.cpp.

Function Documentation

◆ BEGIN_NAMESPACE()

BEGIN_NAMESPACE ( objects  )

◆ DEFINE_STATIC_FAST_MUTEX()

DEFINE_STATIC_FAST_MUTEX ( s_GlobalAmbiguityCacheMutex  )

◆ END_NAMESPACE()

END_NAMESPACE ( objects  )

◆ NCBI_DEFINE_ERR_SUBCODE_X()

NCBI_DEFINE_ERR_SUBCODE_X ( 19  )

◆ NCBI_PARAM_DECL() [1/8]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
CLIP_BY_QUALITY   
)

◆ NCBI_PARAM_DECL() [2/8]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
MASTER_DESCR   
)

◆ NCBI_PARAM_DECL() [3/8]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
USE_AMBIGUITY_4NA   
)

◆ NCBI_PARAM_DECL() [4/8]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
USE_AMBIGUITY_MASK   
)

◆ NCBI_PARAM_DECL() [5/8]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
USE_FULL_4NA_BLOCKS   
)

◆ NCBI_PARAM_DECL() [6/8]

NCBI_PARAM_DECL ( bool  ,
WGS  ,
USE_GAP_INFO   
)

◆ NCBI_PARAM_DECL() [7/8]

NCBI_PARAM_DECL ( int  ,
WGS  ,
DEBUG   
)

◆ NCBI_PARAM_DECL() [8/8]

NCBI_PARAM_DECL ( string  ,
WGS  ,
AMBIGUITY_CACHE   
)

◆ NCBI_PARAM_DEF()

NCBI_PARAM_DEF ( bool  ,
WGS  ,
MASTER_DESCR  ,
true   
)

◆ NCBI_PARAM_DEF_EX() [1/7]

NCBI_PARAM_DEF_EX ( bool  ,
WGS  ,
CLIP_BY_QUALITY  ,
true  ,
eParam_NoThread  ,
CSRA_CLIP_BY_QUALITY   
)

◆ NCBI_PARAM_DEF_EX() [2/7]

NCBI_PARAM_DEF_EX ( bool  ,
WGS  ,
USE_AMBIGUITY_4NA  ,
true  ,
eParam_NoThread  ,
WGS_USE_AMBIGUITY_4NA   
)

◆ NCBI_PARAM_DEF_EX() [3/7]

NCBI_PARAM_DEF_EX ( bool  ,
WGS  ,
USE_AMBIGUITY_MASK  ,
true  ,
eParam_NoThread  ,
WGS_USE_AMBIGUITY_MASK   
)

◆ NCBI_PARAM_DEF_EX() [4/7]

NCBI_PARAM_DEF_EX ( bool  ,
WGS  ,
USE_FULL_4NA_BLOCKS  ,
false  ,
eParam_NoThread  ,
WGS_USE_FULL_4NA_BLOCKS   
)

◆ NCBI_PARAM_DEF_EX() [5/7]

NCBI_PARAM_DEF_EX ( bool  ,
WGS  ,
USE_GAP_INFO  ,
true  ,
eParam_NoThread  ,
WGS_USE_GAP_INFO   
)

◆ NCBI_PARAM_DEF_EX() [6/7]

NCBI_PARAM_DEF_EX ( int  ,
WGS  ,
DEBUG  ,
,
eParam_NoThread  ,
WGS_DEBUG   
)

◆ NCBI_PARAM_DEF_EX() [7/7]

NCBI_PARAM_DEF_EX ( string  ,
WGS  ,
AMBIGUITY_CACHE  ,
"128MB"  ,
eParam_NoThread  ,
WGS_AMBIGUITY_CACHE   
)

◆ s_AddGiRange()

static void s_AddGiRange ( CID2S_Seq_loc::TLoc_set loc_set,
CSeq_id::TGi  gi_range_start,
CSeq_id::TGi  gi_range_stop 
)
static

◆ s_AddUserObjectType()

static void s_AddUserObjectType ( const CSeqdesc desc,
set< string > &  existing_uo_types 
)
static

Definition at line 3182 of file wgsread.cpp.

References set< Key, Compare >::insert(), and s_GetUserObjectType().

Referenced by CWGSDb_Impl::AddMasterDescr().

◆ s_Convert_2na_to_4na() [1/2]

static void s_Convert_2na_to_4na ( char *  dst_4na,
const char *  src_2na,
size_t  base_count 
)
static

◆ s_Convert_2na_to_4na() [2/2]

static void s_Convert_2na_to_4na ( vector< char > &  dst_4na_vec,
const vector< char > &  src_2na_vec,
size_t  base_count 
)
static

Definition at line 1488 of file wgsread.cpp.

References s_Convert_2na_to_4na().

◆ s_ConvertBits_2na_to_4na()

static char s_ConvertBits_2na_to_4na ( char  bits_2na)
inlinestatic

Definition at line 1428 of file wgsread.cpp.

References table.

Referenced by s_ConvertBits_2na_to_4na_1st(), and s_ConvertBits_2na_to_4na_2nd().

◆ s_ConvertBits_2na_to_4na_1st()

static char s_ConvertBits_2na_to_4na_1st ( char  bits_2na)
inlinestatic

Definition at line 1443 of file wgsread.cpp.

References s_ConvertBits_2na_to_4na().

Referenced by s_Convert_2na_to_4na().

◆ s_ConvertBits_2na_to_4na_2nd()

static char s_ConvertBits_2na_to_4na_2nd ( char  bits_2na)
inlinestatic

Definition at line 1452 of file wgsread.cpp.

References s_ConvertBits_2na_to_4na().

Referenced by s_Convert_2na_to_4na().

◆ s_Copy_4na()

static void s_Copy_4na ( char *  dst_4na,
TSeqPos  dst_offset,
const char *  src_4na,
TSeqPos  src_offset,
size_t  base_count 
)
static

Definition at line 1545 of file wgsread.cpp.

Referenced by s_SetAmbiguitiesBlocks().

◆ s_GetAmbiguityCacheSize()

static size_t s_GetAmbiguityCacheSize ( void  )
static

◆ s_GetClipByQuality()

static bool s_GetClipByQuality ( void  )
static

Definition at line 103 of file wgsread.cpp.

References NCBI_PARAM_TYPE, and ncbi::grid::netcache::search::s_Value().

Referenced by CWGSSeqIterator::x_Init().

◆ s_GetDebugLevel()

static int s_GetDebugLevel ( void  )
static

◆ s_GetMinMax()

static void s_GetMinMax ( const Uint1 arr,
size_t  size,
Uint1 min_v,
Uint1 max_v 
)
inlinestatic

Definition at line 4712 of file wgsread.cpp.

References arr, max(), min(), ncbi::grid::netcache::search::fields::size, and v2.

Referenced by CWGSSeqIterator::x_GetQualityAnnot().

◆ s_GetTaxId()

static TTaxId s_GetTaxId ( const CVDBValueFor< NCBI_taxid > &  value)
static

Definition at line 4393 of file wgsread.cpp.

References TAX_ID_FROM, rapidjson::value, and ZERO_TAX_ID.

Referenced by CWGSSeqIterator::GetTaxId(), and CWGSProteinIterator::GetTaxId().

◆ s_GetUserObjectType()

static string s_GetUserObjectType ( const CSeqdesc desc)
static

◆ s_Pack_4na()

static void s_Pack_4na ( char *  dst_packed_4na,
const Uint1 src_4na,
size_t  base_count 
)
static

Definition at line 1604 of file wgsread.cpp.

Referenced by CWGSDb_Impl::SAmbiguityInfo::x_AddAmbiguousBlock().

◆ s_Set_4na()

static void s_Set_4na ( vector< char > &  dst_4na_vec,
size_t  offset,
INSDC_4na_bin  amb 
)
inlinestatic

Definition at line 1503 of file wgsread.cpp.

References offset.

Referenced by s_SetAmbiguitiesPos().

◆ s_Set_4na_gap()

static void s_Set_4na_gap ( vector< char > &  dst_4na_vec,
size_t  offset,
size_t  len 
)
inlinestatic

Definition at line 1520 of file wgsread.cpp.

References len, and offset.

Referenced by s_SetGaps().

◆ s_SetAmbiguitiesBlocks()

static void s_SetAmbiguitiesBlocks ( vector< char > &  dst_4na_vec,
TSeqPos  pos,
TSeqPos  len,
const CWGSDb_Impl::SAmbiguityInfo::T4naBlocks blocks 
)
static

Definition at line 1641 of file wgsread.cpp.

References blocks, kAmbiguityBlockSize, len, min(), and s_Copy_4na().

Referenced by CWGSDb_Impl::SAmbiguityInfo::Get4na().

◆ s_SetAmbiguitiesPos()

static void s_SetAmbiguitiesPos ( vector< char > &  dst_4na_vec,
TSeqPos  pos,
TSeqPos  len,
const vector< INSDC_coord_zero > &  amb_pos,
const vector< INSDC_4na_bin > &  amb_4na 
)
static

Definition at line 1626 of file wgsread.cpp.

References len, and s_Set_4na().

Referenced by CWGSDb_Impl::SAmbiguityInfo::Get4na().

◆ s_SetGaps()

static void s_SetGaps ( vector< char > &  dst_4na_vec,
TSeqPos  pos,
TSeqPos  len,
CWGSSeqIterator::TWGSContigGapInfo  gap_info 
)
static

◆ s_ToFlags()

static CWGSSeqIterator::TIncludeFlags s_ToFlags ( CWGSSeqIterator::EWithdrawn  withdrawn)
inlinestatic

◆ s_ToGi()

static TGi s_ToGi ( TVDBRowId  gi,
const char *  method 
)
inlinestatic

◆ s_UseAmbiguity4na()

static bool s_UseAmbiguity4na ( void  )
static

Definition at line 139 of file wgsread.cpp.

References NCBI_PARAM_TYPE.

Referenced by CWGSDb_Impl::SSeqTableCursor::SSeqTableCursor().

◆ s_UseAmbiguityMask()

static bool s_UseAmbiguityMask ( void  )
static

Definition at line 115 of file wgsread.cpp.

References NCBI_PARAM_TYPE.

Referenced by CWGSDb_Impl::SSeqTableCursor::SSeqTableCursor().

◆ s_UseFull4naBlocks()

static bool s_UseFull4naBlocks ( void  )
static

◆ s_UseGapInfo()

static bool s_UseGapInfo ( void  )
static

Definition at line 127 of file wgsread.cpp.

References NCBI_PARAM_TYPE.

Referenced by CWGSDb_Impl::SSeqTableCursor::SSeqTableCursor().

◆ sx_AddAnnotBytes()

void sx_AddAnnotBytes ( CBioseq::TAnnot annot_set,
CTempString  bytes 
)

◆ sx_AddDescrBytes()

void sx_AddDescrBytes ( CSeq_descr descr,
CTempString  bytes 
)

◆ sx_AddEvidence()

static void sx_AddEvidence ( CSeq_gap gap,
CLinkage_evidence::TType  type 
)
static

Definition at line 4978 of file wgsread.cpp.

References CSeq_gap_Base::SetLinkage_evidence().

Referenced by sx_MakeGapLiteral().

◆ sx_AddMasterDescr()

static void sx_AddMasterDescr ( const CWGSDb db,
SWGSCreateInfo info,
SWGSDb_Defs::TFlags  flags 
)
static

Definition at line 6032 of file wgsread.cpp.

References flags, and info.

Referenced by CWGSSeqIterator::x_CreateEntry(), and CWGSScaffoldIterator::x_CreateEntry().

◆ sx_AddSplitId()

void sx_AddSplitId ( CID2S_Bioseq_Ids::Tdata split_ids,
CSeq_id id 
)

Definition at line 2733 of file wgsread.cpp.

References sx_SetSplitId().

Referenced by sx_AddSplitIds().

◆ sx_AddSplitIds()

void sx_AddSplitIds ( CID2S_Bioseq_Ids::Tdata split_ids,
const CBioseq::TId ids 
)

Definition at line 2741 of file wgsread.cpp.

References ITERATE, and sx_AddSplitId().

Referenced by SWGSCreateInfo::x_CreateProtSet().

◆ sx_Assign()

template<class Value >
static void sx_Assign ( vector< Value > &  dst,
const CVDBValueFor< Value > &  src 
)
static

◆ sx_Find_4na_Ambiguity()

static size_t sx_Find_4na_Ambiguity ( const char *  ptr,
size_t  offset,
size_t  base_count 
)
inlinestatic

Definition at line 1378 of file wgsread.cpp.

References i, offset, sx_Get_4na(), and sx_Is2na().

Referenced by CWGSDb_Impl::SAmbiguityInfo::Get2naLengthExact().

◆ sx_FindAmbiguity()

static const Uint1* sx_FindAmbiguity ( const Uint1 ptr,
const Uint1 end 
)
inlinestatic

Definition at line 1354 of file wgsread.cpp.

References sx_Is2na().

Referenced by sx_HasAmbiguity().

◆ sx_Get_4na()

static Uint1 sx_Get_4na ( const char *  ptr,
size_t  offset 
)
inlinestatic

Definition at line 1366 of file wgsread.cpp.

References b, and offset.

Referenced by CWGSDb_Impl::SAmbiguityInfo::GetBaseType(), and sx_Find_4na_Ambiguity().

◆ sx_GetStringId()

int sx_GetStringId ( CTempString  str)

◆ sx_HasAmbiguity() [1/2]

static bool sx_HasAmbiguity ( const Uint1 ptr,
const Uint1 end 
)
inlinestatic

◆ sx_HasAmbiguity() [2/2]

static bool sx_HasAmbiguity ( const Uint1 ptr,
TSeqPos  count,
TSeqPos  pos,
CWGSDb_Impl::SAmbiguityInfo::TWGSContigGapInfo gap_info 
)
inlinestatic

◆ sx_HasMoreProducts()

static bool sx_HasMoreProducts ( const CWGSDb db,
TVDBRowIdRange  range,
size_t  count 
)
static

Definition at line 5914 of file wgsread.cpp.

References count, and compile_time_bits::range().

Referenced by CWGSSeqIterator::x_InitSplit().

◆ sx_Is2na()

static bool sx_Is2na ( Uint1  b)
inlinestatic

◆ sx_MakeGapLiteral()

static CRef<CSeq_literal> sx_MakeGapLiteral ( TSeqPos  len,
NCBI_WGS_component_props  props,
NCBI_WGS_gap_linkage  gap_linkage 
)
static

◆ sx_NewStringToNonNegativeInt()

int sx_NewStringToNonNegativeInt ( CTempString  str)

Definition at line 2568 of file wgsread.cpp.

References i, len, CNcbiError::SetErrno(), and str().

Referenced by sx_StringToNonNegativeInt().

◆ sx_SetAccession()

bool sx_SetAccession ( CSeq_id id,
CTempString  accession 
)

Definition at line 2549 of file wgsread.cpp.

Referenced by CWGSDb_Impl::GetAccSeq_id().

◆ sx_SetSplitId() [1/2]

void sx_SetSplitId ( CID2S_Bioseq_Ids::C_E split_id,
CSeq_id id 
)

◆ sx_SetSplitId() [2/2]

void sx_SetSplitId ( CID2S_Chunk_Data::TId split_id,
CSeq_id id 
)

◆ sx_SetSplitInterval()

void sx_SetSplitInterval ( CID2S_Seq_loc split_loc,
CSeq_id id,
TSeqPos  pos,
TSeqPos  end 
)

◆ sx_SetTag()

void sx_SetTag ( CDbtag tag,
CTempString  str 
)

◆ sx_SetVersion()

bool sx_SetVersion ( CSeq_id id,
int  version 
)

Definition at line 2539 of file wgsread.cpp.

References dtl::version.

Referenced by CWGSDb_Impl::GetAccSeq_id(), and CWGSDb_Impl::GetMasterSeq_id().

◆ sx_StringToNonNegativeInt()

int sx_StringToNonNegativeInt ( const CTempString str)
inline

Definition at line 2563 of file wgsread.cpp.

References str(), and sx_NewStringToNonNegativeInt().

Referenced by sx_GetStringId().

Variable Documentation

◆ BEGIN_LOCAL_NAMESPACE

BEGIN_LOCAL_NAMESPACE

Definition at line 2537 of file wgsread.cpp.

◆ BEGIN_NCBI_NAMESPACE

BEGIN_NCBI_NAMESPACE

Definition at line 75 of file wgsread.cpp.

◆ END_LOCAL_NAMESPACE

END_LOCAL_NAMESPACE

Definition at line 2768 of file wgsread.cpp.

◆ END_NCBI_NAMESPACE

END_NCBI_NAMESPACE

Definition at line 7928 of file wgsread.cpp.

◆ kAmbiguityBlockSize

const TSeqPos kAmbiguityBlockSize = 1024
static

◆ kAssignedDefaultSplitVersion

int kAssignedDefaultSplitVersion = 1
static

Definition at line 188 of file wgsread.cpp.

Referenced by SWGSCreateInfo::x_SetFlags(), and SWGSCreateInfo::x_SetSplitVersion().

◆ kChunk2naSize

const TSeqPos kChunk2naSize = 1<<17
static

◆ kChunk4naSize

const TSeqPos kChunk4naSize = 1<<16
static

◆ kDataChunkSize

const TSeqPos kDataChunkSize = 256<<10
static

◆ kEnableSplitData

bool kEnableSplitData = true
static

Definition at line 183 of file wgsread.cpp.

Referenced by CWGSSeqIterator::x_InitSplit().

◆ kEnableSplitFeat

bool kEnableSplitFeat = true
static

Definition at line 185 of file wgsread.cpp.

Referenced by CWGSSeqIterator::x_InitSplit().

◆ kEnableSplitProd

bool kEnableSplitProd = true
static

Definition at line 184 of file wgsread.cpp.

Referenced by CWGSSeqIterator::x_InitSplit().

◆ kEnableSplitQual

bool kEnableSplitQual = true
static

Definition at line 182 of file wgsread.cpp.

Referenced by CWGSSeqIterator::x_InitSplit().

◆ kFeatPerChunk

const size_t kFeatPerChunk = 256
static

◆ kMainEntryId

int kMainEntryId = 1
static

◆ kMin2naSize

const TSeqPos kMin2naSize = kAmbiguityBlockSize
static

◆ kMinDataSplitSize

const TSeqPos kMinDataSplitSize = 128<<10
static

Definition at line 204 of file wgsread.cpp.

Referenced by CWGSSeqIterator::x_InitSplit().

◆ kMinFeatCountToSplit

const size_t kMinFeatCountToSplit = 64
static

Definition at line 200 of file wgsread.cpp.

Referenced by CWGSSeqIterator::x_InitSplit().

◆ kProdPerChunk

const size_t kProdPerChunk = 64
static

◆ kQualChunkSize

const TSeqPos kQualChunkSize = 64<<10
static

◆ kRecoverGaps

const bool kRecoverGaps = true
static

◆ kSeq_descrFirstByte

const char kSeq_descrFirstByte = 49
static

◆ kSplit2naSize

const TSeqPos kSplit2naSize = kChunk2naSize
static

◆ kSplit4naSize

const TSeqPos kSplit4naSize = kChunk4naSize+kChunk4naSize/4
static

◆ s_GlobalAmbiguityCache

Definition at line 2208 of file wgsread.cpp.

Referenced by CWGSDb_Impl::GetAmbiguityInfo(), and CWGSDb_Impl::PutAmbiguityInfo().

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