NCBI C++ ToolKit
Functions | Variables
reader_snp.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbi_param.hpp>
#include <objtools/data_loaders/genbank/reader_snp.hpp>
#include <objtools/data_loaders/genbank/impl/processor.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqloc/Seq_point.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqfeat/Seq_feat.hpp>
#include <objects/seqfeat/SeqFeatData.hpp>
#include <objects/seqfeat/Imp_feat.hpp>
#include <objects/seqfeat/Gb_qual.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/seqset/Bioseq_set.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objmgr/objmgr_exception.hpp>
#include <objmgr/impl/tse_info.hpp>
#include <serial/objectinfo.hpp>
#include <serial/objectiter.hpp>
#include <serial/objectio.hpp>
#include <serial/serial.hpp>
#include <serial/objistr.hpp>
#include <serial/objistrasnb.hpp>
#include <serial/objostrasnb.hpp>
#include <serial/iterator.hpp>
#include <corelib/reader_writer.hpp>
#include <algorithm>
#include <numeric>
#include <serial/objostrasn.hpp>
+ Include dependency graph for reader_snp.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

 NCBI_PARAM_DECL (bool, GENBANK, SNP_TABLE_STAT)
 
 NCBI_PARAM_DEF_EX (bool, GENBANK, SNP_TABLE_STAT, false, eParam_NoThread, GENBANK_SNP_TABLE_STAT)
 
static bool CollectSNPStat (void)
 
static void write_unsigned (CNcbiOstream &stream, size_t n, const char *name)
 
static unsigned read_unsigned (CNcbiIstream &stream, const char *name)
 
static void write_gi (CNcbiOstream &stream, TGi gi, const char *name)
 
static TGi read_gi (CNcbiIstream &stream, const char *name)
 
static void write_size (CNcbiOstream &stream, size_t size)
 
static size_t read_size (CNcbiIstream &stream, const char *name)
 
static void write_string (CNcbiOstream &stream, const string &str)
 
static void read_string (CNcbiIstream &stream, string &str, size_t max_length)
 
static void write_seq_id (CNcbiOstream &stream, const CSeq_id &id)
 
static CRef< CSeq_idread_seq_id (CNcbiIstream &stream)
 
void StoreIndexedStringsTo (CNcbiOstream &stream, const CIndexedStrings &strings)
 
void LoadIndexedStringsFrom (CNcbiIstream &stream, CIndexedStrings &strings, size_t max_index, size_t max_length)
 
void StoreIndexedOctetStringsTo (CNcbiOstream &stream, const CIndexedOctetStrings &strings)
 
void LoadIndexedOctetStringsFrom (CNcbiIstream &stream, CIndexedOctetStrings &strings, size_t max_index, size_t max_length)
 

Variables

static const size_t kMax_CommentLength = 65536
 
static const size_t kMax_ExtraLength = 256
 
static const size_t kMax_AlleleLength = 256
 
static const size_t kMax_QualityLength = 32
 
static const size_t kMax_StringLength = 256
 
static const unsigned MAGIC = 0x12340008
 

Function Documentation

◆ CollectSNPStat()

static bool CollectSNPStat ( void  )
static

Definition at line 92 of file reader_snp.cpp.

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

◆ LoadIndexedOctetStringsFrom()

void LoadIndexedOctetStringsFrom ( CNcbiIstream stream,
CIndexedOctetStrings strings,
size_t  max_index,
size_t  max_length 
)

Definition at line 512 of file reader_snp.cpp.

References NCBI_THROW, read_size(), and strings.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ LoadIndexedStringsFrom()

void LoadIndexedStringsFrom ( CNcbiIstream stream,
CIndexedStrings strings,
size_t  max_index,
size_t  max_length 
)

Definition at line 481 of file reader_snp.cpp.

References NCBI_THROW, read_size(), read_string(), and strings.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ NCBI_PARAM_DECL()

NCBI_PARAM_DECL ( bool  ,
GENBANK  ,
SNP_TABLE_STAT   
)

◆ NCBI_PARAM_DEF_EX()

NCBI_PARAM_DEF_EX ( bool  ,
GENBANK  ,
SNP_TABLE_STAT  ,
false  ,
eParam_NoThread  ,
GENBANK_SNP_TABLE_STAT   
)

◆ read_gi()

static TGi read_gi ( CNcbiIstream stream,
const char *  name 
)
inlinestatic

Definition at line 361 of file reader_snp.cpp.

References GI_FROM, n, and NCBI_THROW.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ read_seq_id()

static CRef<CSeq_id> read_seq_id ( CNcbiIstream stream)
inlinestatic

Definition at line 463 of file reader_snp.cpp.

References kMax_StringLength, read_string(), Ref(), and str().

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ read_size()

static size_t read_size ( CNcbiIstream stream,
const char *  name 
)
inlinestatic

◆ read_string()

static void read_string ( CNcbiIstream stream,
string str,
size_t  max_length 
)
inlinestatic

◆ read_unsigned()

static unsigned read_unsigned ( CNcbiIstream stream,
const char *  name 
)
inlinestatic

Definition at line 330 of file reader_snp.cpp.

References n, and NCBI_THROW.

Referenced by CSeq_annot_SNP_Info_Reader::Read(), and CSeq_annot_SNP_Info_Reader::x_Read().

◆ StoreIndexedOctetStringsTo()

void StoreIndexedOctetStringsTo ( CNcbiOstream stream,
const CIndexedOctetStrings strings 
)

Definition at line 499 of file reader_snp.cpp.

References strings, and write_size().

Referenced by CSeq_annot_SNP_Info_Reader::x_Write().

◆ StoreIndexedStringsTo()

void StoreIndexedStringsTo ( CNcbiOstream stream,
const CIndexedStrings strings 
)

Definition at line 471 of file reader_snp.cpp.

References strings, write_size(), and write_string().

Referenced by CSeq_annot_SNP_Info_Reader::x_Write().

◆ write_gi()

static void write_gi ( CNcbiOstream stream,
TGi  gi,
const char *  name 
)
inlinestatic

Definition at line 348 of file reader_snp.cpp.

References GI_TO, i, and n.

Referenced by CSeq_annot_SNP_Info_Reader::x_Write().

◆ write_seq_id()

static void write_seq_id ( CNcbiOstream stream,
const CSeq_id id 
)
inlinestatic

Definition at line 456 of file reader_snp.cpp.

References write_string().

Referenced by CSeq_annot_SNP_Info_Reader::x_Write().

◆ write_size()

static void write_size ( CNcbiOstream stream,
size_t  size 
)
inlinestatic

◆ write_string()

static void write_string ( CNcbiOstream stream,
const string str 
)
inlinestatic

◆ write_unsigned()

static void write_unsigned ( CNcbiOstream stream,
size_t  n,
const char *  name 
)
inlinestatic

Definition at line 313 of file reader_snp.cpp.

References n, and NCBI_THROW_FMT.

Referenced by CSeq_annot_SNP_Info_Reader::Write(), and CSeq_annot_SNP_Info_Reader::x_Write().

Variable Documentation

◆ kMax_AlleleLength

const size_t kMax_AlleleLength = 256
static

Definition at line 80 of file reader_snp.cpp.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ kMax_CommentLength

const size_t kMax_CommentLength = 65536
static

Definition at line 78 of file reader_snp.cpp.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ kMax_ExtraLength

const size_t kMax_ExtraLength = 256
static

Definition at line 79 of file reader_snp.cpp.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ kMax_QualityLength

const size_t kMax_QualityLength = 32
static

Definition at line 81 of file reader_snp.cpp.

Referenced by CSeq_annot_SNP_Info_Reader::x_Read().

◆ kMax_StringLength

const size_t kMax_StringLength = 256
static

Definition at line 82 of file reader_snp.cpp.

Referenced by read_seq_id(), and read_string().

◆ MAGIC

const unsigned MAGIC = 0x12340008
static
Modified on Fri May 24 14:58:05 2024 by modify_doxy.py rev. 669887