39 #include <unordered_map>
48 unsigned long __h = 5381;
49 for (
auto c :
val ) {
60 #define NCBI_USE_ERRCODE_X SNPReader
84 info.m_Flags =
info.fQualityCodesOs |
info.fAlleleReplace;
85 info.m_CommentIndex =
info.kNo_CommentIndex;
87 info.m_ExtraIndex =
info.kNo_ExtraIndex;
97 if (
len >
info.kMax_PositionDelta+1 ) {
104 if (
range.second >
info.kMax_AllelesCount ) {
108 for ( ; index <
range.second; ++index ) {
114 if ( a_index ==
info.kNo_AlleleIndex ) {
117 info.m_AllelesIndices[index] = a_index;
119 for ( ; index <
info.kMax_AllelesCount; ++index ) {
120 info.m_AllelesIndices[index] =
info.kNo_AlleleIndex;
126 if (
info.m_QualityCodesIndex ==
info.kNo_QualityCodesIndex ) {
133 "CSNPDbSeqIterator: FEAT_ID doesn't fit into table SNPId");
156 CSNPDbSeqIterator::TFlags
flags)
168 feats.push_back(it.GetSeq_feat());
171 if ( packed->
empty() ) {
173 if ( feats.empty() ) {
186 CSNPDbSeqIterator::TFlags
flags)
void GetBitfieldOS(vector< char > &octet_stream) const
CTempString GetAllele(const TExtraRange &range, size_t index) const
pair< TVDBRowId, size_t > TExtraRange
TSeqPos GetSNPLength(void) const
TSeqPos GetSNPPosition(void) const
Uint8 GetFeatId(void) const
TExtraRange GetExtraRange(void) const
const SFilter & GetFilter() const
CRef< CSeq_id > GetSeqId(void) const
CRange< TSeqPos > GetSNPRange(void) const
SSNP_Info::TAlleleIndex x_GetAlleleIndex(const string &allele)
SSNP_Info::TQualityCodesIndex x_GetQualityCodesIndex(const string &str)
void SetSeq_id(const CSeq_id &id)
void x_AddSNP(const SSNP_Info &snp_info)
void SetNameDesc(const string &name)
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
size_type size(void) const
Return the length of the represented array.
void SetData(TData &value)
Assign a value to Data data member.
list< CRef< CSeq_feat > > TFtable
Definition of all error codes used in SRA C++ support libraries.
range(_Ty, _Ty) -> range< _Ty >
Magic spell ;-) needed for some weird compilers... very empiric.
NCBI_DEFINE_ERR_SUBCODE_X(1)
bool x_ParseSNP_Info(SSNP_Info &info, const CSNPDbFeatIterator &it, CSeq_annot_SNP_Info &packed)
static const char kDefaultAnnotName[]
void x_InitSNP_Info(SSNP_Info &info)
static const size_t kMax_AlleleLength
TPackedAnnot GetPackedFeatAnnot(const CSNPDbSeqIterator &seq, CRange< TSeqPos > range, const CSNPDbSeqIterator::SFilter &filter, CSNPDbSeqIterator::TFlags flags)
END_NAMESPACE(SNPDbPacked)
CRef< CSeq_annot > x_NewAnnot(const string &annot_name=kDefaultAnnotName)
void x_AdjustRange(CRange< TSeqPos > &range, const CSNPDbSeqIterator &it)
pair< CRef< CSeq_annot >, CRef< CSeq_annot_SNP_Info > > TPackedAnnot
size_t operator()(ncbi::CTempString val) const