__h = 5381;
63 for(
autoc :
val) {
74 #define NCBI_USE_ERRCODE_X SNPReader 80 #define RC_NO_MORE_ALIGNMENTS RC(rcApp, rcQuery, rcSearching, rcRow, rcNotFound) 329 boolanother_vdb_table =
false;
334another_vdb_table =
true;
339 if( another_vdb_table ) {
343 "Cannot open VDB: "<<path_or_acc,
359 for(
size_t i= 0;
i< track_count; ++
i) {
362 info.m_Name = *cur.NAME(
row);
364 info.m_Filter.m_Filter = *cur.BITS(
row);
365 info.m_Filter.m_FilterMask = *cur.MASK(
row);
368 if( track_count == 0 ) {
387 size_tseq_count = cur->m_Cursor.GetMaxRowId();
390 for(
size_t i= 0;
i< seq_count; ++
i) {
396 info.m_SeqLength = *cur->LEN(
row);
397 info.m_Circular =
false;
410 for(
TVDBRowId row= 1, max_row = cur->m_Cursor.GetMaxRowId();
411 row<= max_row; ++
row) {
417 if( !
info.m_PageSets.empty() ) {
425 info.m_PageSets.push_back(pset);
436 if( !
info.m_SeqLength ) {
439 info.m_GraphRowId = graph_row;
441graph_row += pages * track_count;
470CSNPDb_Impl::TTrackInfoList::const_iterator
483CSNPDb_Impl::TSeqInfoList::const_iterator
486 stringprefix = accession+
'.';
491 if( !range.second ) {
500 if( !range.second ) {
503 size_tindex = size_t(range.first-1);
507TSeqInfoList::const_iterator iter =
m_SeqList.begin()+index;
513CSNPDb_Impl::TSeqInfoList::const_iterator
519 if( text_id->IsSetAccession() && text_id->IsSetVersion() &&
520!text_id->IsSetName() && !text_id->IsSetRelease() ) {
521 return FindSeq(text_id->GetAccession(), text_id->GetVersion());
540 if( seq->GetMainSeq_id() ) {
546 size_tseq_index = seq-
m_SeqList.begin();
548 if(
info.m_Seq_id ) {
562 info.m_SeqLength = *cur->LEN(seq_row);
563 info.m_Circular =
false;
572 TVDBRowIdmax_row = cur->m_Cursor.GetMaxRowId();
580max_row = iter->second;
585row_before = slot.second;
590 while( row_before+1 <
row) {
592 if( *cur->SEQ_ID_ROW_NUM(mid_row) < seq_row ) {
593row_before = mid_row;
601 info.m_PageSets.clear();
602 for( ;
row<= max_row; ++
row) {
603 if( *cur->SEQ_ID_ROW_NUM(
row) != seq_row ) {
611 if( !
info.m_PageSets.empty() ) {
619 info.m_PageSets.push_back(pset);
627 if( !
info.m_SeqLength ) {
634 info.m_Seq_id = seq_id;
643 "Sequence index is out of bounds: "<<
646 returnseq->GetPageVDBRowRange();
652TTrackInfoList::const_iterator track)
656 "Sequence index is out of bounds: "<<
661 "Filter track index is out of bounds: "<<
678m_Iter(GetList().begin())
689 "Track index is out of bounds: "<<
690db->GetDbPath()<<
"."<<track_index);
699m_Iter(db->FindTrack(name))
708 "CSNPDbTrackIterator is invalid");
717 m_Iter= TList::const_iterator();
728m_Iter(db->GetSeqInfoList().begin()),
729m_TrackIter(db->GetTrackInfoList().begin())
740 if( seq_index >= db->m_SeqList.size() ) {
742 "Sequence index is out of bounds: "<<
743db->GetDbPath()<<
"."<<seq_index);
746 m_Iter= db->m_SeqList.begin()+seq_index;
757m_Iter(db.GetNCObject().FindSeq(seq_id)),
758m_TrackIter(db->GetTrackInfoList().begin())
764 const string& accession,
767m_Iter(db.GetNCObject().FindSeq(accession,
version)),
768m_TrackIter(db->GetTrackInfoList().begin())
783 "CSNPDbSeqIterator is invalid");
791 m_Iter= CSNPDb_Impl::TSeqInfoList::const_iterator();
792 m_TrackIter= CSNPDb_Impl::TTrackInfoList::const_iterator();
825end += *cur->FEATURE_ROWS_COUNT(row_ids.
GetTo());
860 returnunsigned(v>>32)+unsigned(v);
867 char* dst = os.data();
868 for(
int i= 0;
i< 8; ++
i) {
869dst[
i] = char(
data>>(8*
i));
883 returnpos - pos%step;
966 auto& gr = graph.
SetGraph().SetByte();
970 count= gr.GetValues().size();
973 auto& gr = graph.
SetGraph().SetInt();
977 count= gr.GetValues().size();
1016 auto& vv = graph.
SetGraph().SetByte().SetValues();
1017vv.resize(vv.size() +
count);
1020 auto& vv = graph.
SetGraph().SetInt().SetValues();
1021vv.resize(vv.size() +
count);
1041 auto& vv = graph.
SetGraph().SetByte().SetValues();
1042vv.insert(vv.end(), values, values+
count);
1047 auto& old_vv = old_data->GetValues();
1048 auto& vv = graph.
SetGraph().SetInt().SetValues();
1049 const Uint1*
bb=
reinterpret_cast<const Uint1*
>(old_vv.data());
1050vv.assign(
bb,
bb+old_vv.size());
1052 auto& vv = graph.
SetGraph().SetInt().SetValues();
1053vv.insert(vv.end(), values, values+
count);
1073 while(
count&& *values == 0 ) {
1078 if( empty_before ) {
1089 if( empty_after ) {
1137 g.AddValue(it.GetTotalValue());
1160 if( !it.GetTotalValue() ) {
1166 g.AddValues(
count, values.
data()+skip_beg);
1177TFlags
flags)
const 1183 return g.FinishGraph();
1189 const string& annot_name,
1190TFlags
flags)
const 1197annot->
SetData().SetGraph().swap(
g.FinishAnnot());
1204TFlags
flags)
const 1215 return g.FinishGraph();
1221 const string& annot_name,
1222TFlags
flags)
const 1227annot->
SetData().SetGraph().swap(
g.FinishAnnot());
1234TFlags
flags)
const 1243TFlags
flags)
const 1250feats.push_back(it.GetSeq_feat());
1252 if( feats.empty() ) {
1261TFlags
flags)
const 1271 const char* name = 0)
1304 const char*
name= 0)
1311 const char*
name= 0)
1382col->
SetData().ChangeToInt8();
1409 for(
int i= 0;
i<
size; ++
i) {
1426 size_tsparse_size =
column.values->size();
1437to = (*
column.values)[j++];
1440to = (*backup_column.
values)[
i];
1442values.push_back(to);
1456 typedefunordered_map<CTempString, int>
TIndex;
1467 const char*
name= 0)
1482TIndex::const_iterator it =
index.find(
val);
1483 if( it ==
index.end() ) {
1519 const char*
name= 0)
1533pair<TIndex::iterator, bool> ins =
1536ins.first->second =
values->size();
1537vector<char>*
data=
newvector<char>();
1541 autovalue_index = ins.first->second;
1544 "CSNPDbSeqIterator: common bytes table is too big");
1546 indexes->push_back(
int(value_index));
1591 const string&
value)
1595 table.SetColumns().push_back(col);
1604 table.SetColumns().push_back(col);
1613 table.SetColumns().push_back(col);
1622 table.SetColumns().push_back(col);
1656 for(
size_t i= 0;
i< range.second; ++
i) {
1695total_to += max_len-1;
1698total_loc->
SetInt().SetId(seq_id);
1699total_loc->
SetInt().SetFrom(total_from);
1700total_loc->
SetInt().SetTo(total_to);
1702 "Seq-table location",
1706 "Sorted, max length",
1749vector< CRef<CSeq_annot> >
GetAnnots(
const string& annot_name);
1762vector< CRef<CSeq_annot> >
1765vector< CRef<CSeq_annot> > ret;
1766 for(
intk = 0; k < 2; ++k ) {
1771ret.push_back(annot);
1787 size_tlast_index = range.second - 1;
1814 const string& annot_name,
1816TFlags
flags)
const 1832TFlags
flags)
const 1840 const string& annot_name,
1841TFlags
flags)
const 1849TFlags
flags)
const 1879m_SearchMode(eSearchByOverlap)
1889: m_SeqIter(db, ref_id)
1900: m_SeqIter(db, ref_id)
1902 Select(range, search_mode);
1911 Select(range, search_mode);
1924 if(
this!= &iter ) {
2010 "CSNPDbPageIterator::"<<method<<
"(): " 2011 "Invalid iterator state");
2017 x_CheckValid(
"CSNPDbPageIterator::GetFirstFeatRowId");
2046: m_CurrPageRowId(0),
2068 if(
this!= &iter ) {
2097 if( !iter || ref_range.
Empty() ) {
2136 "CSNPDbGraphIterator::"<<method<<
"(): " 2137 "Invalid iterator state");
2150 x_CheckValid(
"CSNPDbGraphIterator::GetCoverageValues");
2195 while( first < max_row && *m_Feat->SEQ_ID_ROW_NUM(
first) < seq_row ) {
2219: m_PageIter(db, ref_id, ref_pos, window, sel.m_SearchMode)
2231: m_PageIter(db, ref_id, range, sel.m_SearchMode)
2242: m_PageIter(seq, range, sel.m_SearchMode)
2259 if(
this!= &iter ) {
2300 Uint8best_bits_count = 0;
2301CSNPDb_Impl::TTrackInfoList::const_iterator best_track;
2313 if( bits_count > best_bits_count ) {
2314best_bits_count = bits_count;
2318 if( best_bits_count ) {
2396 if( ref_len == 0 ) {
2398 if( ref_pos > 0 ) {
2403 TSeqPosref_end = ref_pos + ref_len;
2452 "CSNPDbFeatIterator::"<<method<<
"(): " 2453 "Invalid iterator state");
2459 x_CheckValid(
"CSNPDbFeatIterator::GetFeatIdPrefix");
2473 x_CheckValid(
"CSNPDbFeatIterator::x_GetExtraRange");
2490 _ASSERT(index < range.second);
2491 return*
m_Extra->RS_ALLELE(range.first + index);
2508 template<
size_tValueSize>
2512 return str.size() == ValueSize-1 &&
str==
value;
2515 #define x_SetStringConstant(obj, Field, value) \ 2516 if ( !(obj).NCBI_NAME2(IsSet,Field)() || \ 2517 !x_IsStringConstant((obj).NCBI_NAME2(Get,Field)(), value) ) { \ 2518 (obj).NCBI_NAME2(Set,Field)((value)); \ 2527 if( !ptr || !ptr->ReferencedOnlyOnce() ) {
2548 #define ALLELE_CACHE 2578 if(
val.size() == 1 ) {
2579 switch(
val[0] ) {
2588 if(
val.size() == 0 ) {
2659quals.assign(range.second,
null);
2660 for(
size_t i= 0;
i< range.second; ++
i) {
2686dbtag.
SetTag().SetId8(feat_id);
2696 if(
flags& ext_flags ) {
2707 "VariationClass"));
2743 template<
classValues>
2748 if( values[
i] ) {
2756 template<
classTValues>
2762 TSeqPosdst_ind = pos_index / bit_values;
2764 if(
TSeqPosfirst_offset = pos_index % bit_values ) {
2765 TSeqPosfirst_count = bit_values - first_offset;
2766 if( !bits[dst_ind] ) {
2770src_ind += first_count;
2772 while( src_ind < values.
size() ) {
2773 if( !bits[dst_ind] ) {
2774bits[dst_ind] =
sx_HasNonZero(values, src_ind, bit_values);
2777src_ind += bit_values;
2798 sx_AddBits2(bits, bit_values, pos_index, values);
2803 sx_AddBits2(bits, bit_values, pos_index, values);
2817 Uint8feat_per_page = total_feat_count/page_count+1;
2832 template<
classCont>
2833 typenameCont::value_type::TObjectType&
sx_AddNew(Cont& cont)
2835 typename Cont::value_typeobj(
new typenameCont::value_type::TObjectType);
2836cont.push_back(obj);
2844obj.
SetType().SetStr(
"AnnotationTrack");
2845obj.
AddField(
"ZoomLevel", zoom_level);
2850CSNPDbSeqIterator::TFlags
flags,
2851 const string& annot_name,
2867TFlags
flags)
const 2883 for(
auto&
g: annot->GetData().GetGraph() ) {
2888annots.push_back(annot);
2902annots.push_back(annot);
2912annots.push_back(annot);
2922TFlags
flags)
const 2941 for(
auto&
g: annot->GetData().GetGraph() ) {
2946skeleton.
SetAnnot().push_back(annot);
2959chunk.
SetId().Set(chunk_id);
2961annot_info.
SetName(graph_annot_name);
2973 if( !feat_chunks[
i] ) {
2978chunk.
SetId().Set(chunk_id);
2980annot_info.
SetName(base_name);
2990 returnmake_pair(split_info, split_version);
3000 "CSNPDbSeqIterator::GetChunkForVersion("<<chunk_id<<
", "<<split_version<<
")" 3001 ": invalid split version");
3017 data.SetAnnots().push_back(annot);
3027 data.SetAnnots().push_back(annot);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
ncbi::TMaskedQueryRegions mask
@Gb_qual.hpp User-defined methods of the data storage class.
CID2S_Feat_type_Info â.
CID2S_Seq_annot_Info â.
CID2S_Seq_id_Interval â.
@Imp_feat.hpp User-defined methods of the data storage class.
void GetBitfieldOS(vector< char > &octet_stream) const
AutoPtr< SCreateCache > m_CreateCache
TFilter GetBitfield(void) const
CTempString GetAllele(const TExtraRange &range, size_t index) const
static char GetFeatSubtypeChar(EFeatSubtype subtype)
~CSNPDbFeatIterator(void)
TVDBRowId m_GraphBaseRowId
const CSNPDb_Impl::SFeatTableCursor & Cur(void) const
CSNPDb_Impl & GetDb(void) const
TVDBRowId m_FirstBadFeatId
TSeqPos x_GetFrom(void) const
ESearchMode GetSearchMode(void) const
COpenRange< TSeqPos > m_CurRange
pair< TVDBRowId, size_t > TExtraRange
Uint4 GetFeatIdPrefix(void) const
TSeqPos GetSNPLength(void) const
EExcluded x_Excluded(void)
EFeatSubtype GetFeatSubtype(void) const
CSNPDbFeatIterator & Select(COpenRange< TSeqPos > ref_range, const SSelector &sel=SSelector())
const CSNPDbSeqIterator & GetRefIter(void) const
TSeqPos GetSNPPosition(void) const
Uint8 GetFeatId(void) const
CRef< CSNPDb_Impl::SGraphTableCursor > m_Graph
TExtraRange GetExtraRange(void) const
TSeqPos x_GetLength(void) const
CRef< CSNPDb_Impl::SExtraTableCursor > m_Extra
void x_CheckValid(const char *method) const
CSNPDb_Impl::TSeqInfoList::const_iterator x_GetSeqIter() const
const CRange< TSeqPos > & GetSearchRange(void) const
CTempString GetFeatType(void) const
CRef< CSeq_feat > GetSeq_feat(TFlags flags=fDefaultFlags) const
CTempString GetFeatSubtypeString(void) const
CSNPDbPageIterator m_PageIter
CRef< CSNPDb_Impl::SFeatTableCursor > m_Feat
TVDBRowId x_GetGraphVDBRowId() const
SCreateCache & x_GetCreateCache(void) const
CSNPDbFeatIterator & operator=(const CSNPDbFeatIterator &iter)
void x_ReportInvalid(const char *method) const
CRef< CSeq_id > GetSeqId(void) const
const CSNPDbPageIterator & GetPageIter(void) const
void x_SetFilter(const SSelector &sel)
CVDBValueFor< Uint4 > GetCoverageValues(void) const
~CSNPDbGraphIterator(void)
Uint4 GetTotalValue(void) const
TVDBRowId m_CurrPageRowId
CSNPDb_Impl & GetDb(void) const
CRef< CSNPDb_Impl::SGraphTableCursor > m_Cur
CSNPDbGraphIterator & Select(const CSNPDbSeqIterator &iter, COpenRange< TSeqPos > ref_range)
void x_CheckValid(const char *method) const
CSNPDbGraphIterator & operator=(const CSNPDbGraphIterator &iter)
CRange< TSeqPos > m_SearchRange
CSNPDbGraphIterator(void)
void x_ReportInvalid(const char *method) const
TVDBRowId GetFirstFeatRowId(void) const
TVDBRowId GetPageRowId(void) const
TSeqPos GetPagePos(void) const
CSNPDbPageIterator & Select(COpenRange< TSeqPos > ref_range, ESearchMode search_mode=eSearchByOverlap)
const CSNPDb_Impl::SPageTableCursor & Cur(void) const
TVDBRowCount GetFeatCount(void) const
TVDBRowId m_LastGraphRowId
CSNPDbSeqIterator m_SeqIter
CSNPDbPageIterator & operator=(const CSNPDbPageIterator &iter)
void x_ReportInvalid(const char *method) const
CSNPDb_Impl & GetDb(void) const
void x_CheckValid(const char *method) const
~CSNPDbPageIterator(void)
CRef< CSNPDb_Impl::SPageTableCursor > m_Cur
TVDBRowId m_CurrPageRowId
CRange< TSeqPos > m_SearchRange
CRef< CSNPDb_Impl::SGraphTableCursor > m_GraphCur
CRef< CSeq_graph > GetCoverageGraph(CRange< TSeqPos > range) const
CRef< CSeq_annot > GetOverviewAnnot(CRange< TSeqPos > range, const string &annot_name, TFlags flags=fDefaultFlags) const
const SFilter & GetFilter() const
Uint8 GetSNPCount(CRange< TSeqPos > range) const
TList::const_iterator m_Iter
CSNPDb_Impl::TTrackInfoList::const_iterator m_TrackIter
CSNPDbSeqIterator & operator++(void)
CRef< CSeq_id > GetSeqId(void) const
pair< CRef< CID2S_Split_Info >, TSplitVersion > GetSplitInfoAndVersion(const string &base_name, TFlags flags=fDefaultFlags) const
vector< CRef< CSeq_annot > > TAnnotSet
TSeqPos GetCoverageZoom(void) const
TSeqPos GetOverviewZoom(void) const
@ fOverviewWithZoomAlways
TSeqPos GetMaxSNPLength(void) const
TSeqPos GetPageSize(void) const
CRef< CSeq_annot > GetCoverageAnnot(CRange< TSeqPos > range, const string &annot_name, TFlags flags=fDefaultFlags) const
void SetTrack(const CSNPDbTrackIterator &track)
CSNPDb_Impl & GetDb(void) const
CRef< CSeq_annot > GetFeatAnnot(CRange< TSeqPos > range, const SFilter &filter, TFlags flags=fDefaultFlags) const
CRef< CSeq_entry > GetEntry(const string &base_name, TFlags flags=fDefaultFlags) const
TVDBRowId GetVDBRowId(void) const
TAnnotSet GetTableFeatAnnots(CRange< TSeqPos > range, const string &annot_name, const SFilter &filter, TFlags flags=fDefaultFlags) const
const TInfo & GetInfo() const
TVDBRowId GetGraphVDBRowId() const
Uint8 GetSNPCount(void) const
CRange< TVDBRowId > GetPageVDBRowRange(void) const
CRef< CSeq_graph > GetOverviewGraph(CRange< TSeqPos > range, TFlags flags=fDefaultFlags) const
CRange< TSeqPos > GetSNPRange(void) const
TList::const_iterator x_GetSeqIter() const
CRef< CID2S_Chunk > GetChunkForVersion(const string &base_name, TChunkId chunk_id, TSplitVersion split_version) const
CSNPDb_Impl::TTrackInfoList::const_iterator x_GetTrackIter() const
bool IsCircular(void) const
const TInfo & GetInfo() const
TList::const_iterator m_Iter
CSNPDbTrackIterator(void)
const TList & GetList() const
CVDBObjectCache< SGraphTableCursor > m_Graph
CRef< SExtraTableCursor > Extra(TVDBRowId row=0)
const CVDBTable & ExtraTable(void)
TTrackInfoMapByName m_TrackMapByName
CRef< SPageTableCursor > Page(TVDBRowId row=0)
TSeqInfoList::const_iterator FindSeq(const string &accession, int version)
const CVDBTable & PageTable(void)
const string & GetDbPath(void) const
const TTrackInfoList & GetTrackInfoList(void) const
CSNPDb_Impl(CVDBMgr &mgr, CTempString path_or_acc)
const CVDBTable & FeatTable(void)
const TSeqInfoList & GetSeqInfoList(void) const
TTrackInfoList m_TrackList
TSeqPos GetOverviewZoom(void) const
const CVDBTable & SeqTable(void)
TSeqPos GetPageSize(void) const
TSeqPos GetCoverageZoom(void) const
CRef< SFeatTableCursor > Feat(TVDBRowId row=0)
void x_Update(TSeqInfoList::const_iterator seq)
CRef< SGraphTableCursor > Graph(TVDBRowId row=0)
virtual ~CSNPDb_Impl(void)
TVDBRowId x_GetGraphVDBRowId(TSeqInfoList::const_iterator seq, TTrackInfoList::const_iterator track)
CVDBObjectCache< SExtraTableCursor > m_Extra
CVDBObjectCache< SFeatTableCursor > m_Feat
CVDBTableIndex m_SeqAccIndex
CVDBObjectCache< SSeqTableCursor > m_Seq
CRange< TVDBRowId > x_GetPageVDBRowRange(TSeqInfoList::const_iterator seq)
TSeq2PageMap m_Seq2PageMap
CVDBObjectCache< SPageTableCursor > m_Page
vector< STrackInfo > TTrackInfoList
CRef< SSeqTableCursor > Seq(TVDBRowId row=0)
const CVDBTable & GraphTable(void)
void Put(CRef< SSeqTableCursor > &curs, TVDBRowId row=0)
TTrackInfoList::const_iterator FindTrack(const string &name) const
TSeqInfoMapBySeq_id m_SeqMapBySeq_id
static string CombineWithZoomLevel(const string &acc, int zoom_level)
Combine accession string and zoom level into a string with separator.
void SetNameDesc(const string &name)
namespace ncbi::objects::
TSeqPos GetLength(void) const
@ eNotFoundDb
DB main file not found.
virtual TErrCode GetErrCode(void) const
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CUser_object & AddField(const string &label, const string &value, EParseField parse=eParse_String)
add a data field to the user object that holds a given value
TVDBRowId GetMaxRowId(void) const
TVDBRowIdRange Find(const string &value) const
const TValue * data() const
container_type::const_iterator const_iterator
const_iterator begin() const
const_iterator end() const
const_iterator lower_bound(const key_type &key) const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
const_iterator find(const key_type &key) const
The NCBI C++ standard methods for dealing with std::string.
static const unsigned kGraphChunkSize
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const char * str(char *buf, int n)
unsigned int TSeqPos
Type for sequence locations and lengths.
constexpr size_t ArraySize(const Element(&)[Size])
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
CConstRef< CSeq_id > GetSeqId(void) const
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
const CTextseq_id * GetTextseq_Id(void) const
Return embedded CTextseq_id, if any.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
uint8_t Uint1
1-byte (8-bit) unsigned integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
position_type GetLength(void) const
TThisType & SetFrom(position_type from)
TThisType & SetToOpen(position_type toOpen)
TThisType IntersectionWith(const TThisType &r) const
position_type GetToOpen(void) const
position_type GetFrom(void) const
static void TrimSuffixInPlace(string &str, const CTempString suffix, ECase use_case=eCase)
Trim suffix from a string (in-place)
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static string & ToUpper(string &str)
Convert string to upper case â string& version.
BEGIN_STD_SCOPE bool is_sorted(Iterator iter1, Iterator iter2)
is_sorted is provided by some implementations of the STL and may be included in future releases of al...
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTag(TTag &value)
Assign a value to Tag data member.
TData & SetData(void)
Assign a value to Data data member.
void SetLabel(TLabel &value)
Assign a value to Label data member.
TStr & SetStr(void)
Select the variant.
void SetType(TType &value)
Assign a value to Type data member.
void SetData(TData &value)
Assign a value to Data data member.
vector< CRef< CUser_field > > TData
EField_id
identification of the column data in the objects described by the table known column data types posit...
void SetHeader(THeader &value)
Assign a value to Header data member.
void ResetSparse(void)
Reset Sparse data member.
vector< unsigned > TIndexes
void ResetData(void)
Reset Data data member.
void SetSparse(TSparse &value)
Assign a value to Sparse data member.
void SetData(TData &value)
Assign a value to Data data member.
bool IsSetData(void) const
row data Check if a value has been assigned to Data data member.
vector< CStringUTF8 > TStrings
vector< vector< char > * > TBytes
void SetDefault(TDefault &value)
Assign a value to Default data member.
@ eField_id_qual
field-name must be "Q.xxx", see below
@ eField_id_location_id
location Seq-id
@ eField_id_ext_type
extra fields, see also special values for str below
@ eField_id_data_imp_key
various data fields
void SetName(const TName &value)
Assign a value to Name data member.
void SetType(TType value)
Assign a value to Type data member.
TSubtypes & SetSubtypes(void)
Assign a value to Subtypes data member.
void SetSkeleton(TSkeleton &value)
Assign a value to Skeleton data member.
void SetId(const TId &value)
Assign a value to Id data member.
void SetSeq_loc(TSeq_loc &value)
Assign a value to Seq_loc data member.
TChunks & SetChunks(void)
Assign a value to Chunks data member.
void SetStart(TStart value)
Assign a value to Start data member.
TData & SetData(void)
Assign a value to Data data member.
TFeat & SetFeat(void)
Assign a value to Feat data member.
TContent & SetContent(void)
Assign a value to Content data member.
void SetSeq_id(TSeq_id &value)
Assign a value to Seq_id data member.
void SetGraph(void)
Set NULL data member (assign 'NULL' value to Graph data member).
void SetLength(TLength value)
Assign a value to Length data member.
void SetQual(const TQual &value)
Assign a value to Qual data member.
vector< CRef< CDbtag > > TDbxref
TDbxref & SetDbxref(void)
Assign a value to Dbxref data member.
void ResetDescr(void)
Reset Descr data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void ResetLoc(void)
Reset Loc data member.
void SetExt(TExt &value)
Assign a value to Ext data member.
void SetData(TData &value)
Assign a value to Data data member.
void ResetExt(void)
Reset Ext data member.
void SetVal(const TVal &value)
Assign a value to Val data member.
vector< CRef< CGb_qual > > TQual
void ResetDbxref(void)
Reset Dbxref data member.
TQual & SetQual(void)
Assign a value to Qual data member.
void ResetQual(void)
Reset Qual data member.
void SetTo(TTo value)
Assign a value to To data member.
void SetPoint(TPoint value)
Assign a value to Point data member.
void SetId(TId &value)
Assign a value to Id data member.
void SetId(TId &value)
Assign a value to Id data member.
TFrom GetFrom(void) const
Get the From member data.
void SetFrom(TFrom value)
Assign a value to From data member.
virtual void Reset(void)
Reset the whole object.
const TInt & GetInt(void) const
Get the variant data.
void SetTitle(const TTitle &value)
Assign a value to Title data member.
const TInt & GetInt(void) const
Get the variant data.
void SetNumval(TNumval value)
Assign a value to Numval data member.
void SetComp(TComp value)
Assign a value to Comp data member.
const TGraph & GetGraph(void) const
Get the Graph member data.
const TValues & GetValues(void) const
Get the Values member data.
const TByte & GetByte(void) const
Get the variant data.
void SetGraph(TGraph &value)
Assign a value to Graph data member.
const TValues & GetValues(void) const
Get the Values member data.
bool IsByte(void) const
Check if variant Byte is selected.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
const TLoc & GetLoc(void) const
Get the Loc member data.
TNumval GetNumval(void) const
Get the Numval member data.
TComp GetComp(void) const
Get the Comp member data.
TSet & SetSet(void)
Select the variant.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
void SetId(TId &value)
Assign a value to Id data member.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetDesc(TDesc &value)
Assign a value to Desc data member.
list< CRef< CSeq_feat > > TFtable
unsigned int
A callback function used to compare two keys in a database.
static const TSeqPos kFeatChunkSize
Definition of all error codes used in SRA C++ support libraries.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const string version
version string
double value_type
The numeric datatype used by the parser.
const struct ncbi::grid::netcache::search::fields::SIZE size
Magic spell ;-) needed for some weird compilers... very empiric.
const GenericPointer< typename T::ValueType > T2 value
#define NCBI_CONST_UINT8(v)
static bool GetSeqId(const T &d, set< string > &labels, const string name="", bool detect=false, bool found=false)
static sljit_uw total_size
CRef< CSeqTable_column > x_MakeColumn(CSeqTable_column_info::EField_id id, const char *name=0)
void x_CollectOverviewGraph(SGraphMaker &g, const CSNPDbSeqIterator &seq_it, CRange< TSeqPos > range, SGraphMaker::EGraphSet graph_set, SGraphMaker::EGapsType gaps_type)
void x_AdjustGraphRange(CRange< TSeqPos > &range, const CSNPDbSeqIterator &it, const TSeqPos comp)
NCBI_DEFINE_ERR_SUBCODE_X(1)
static const TSeqPos kDefaultFeatChunkPages
static bool x_IsStringConstant(const string &str, const char(&value)[ValueSize])
TSeqPos sx_CalcFeatChunkPages(const CSNPDbSeqIterator &it)
void x_RoundRange(CRange< TSeqPos > &range, TSeqPos step)
unsigned x_SetBitCount(Uint8 v)
bool sx_HasNonZero(const Values &values, TSeqPos index, TSeqPos count)
static const char kDefaultAnnotName[]
static const TSeqPos kTargetFeatsPerChunk
static const TSeqPos kPageSize
static const TSeqPos kFeatChunksPerGraphChunk
void sx_SetZoomLevel(CSeq_annot &annot, int zoom_level)
static const TSeqPos kOverviewZoom
void x_SetOS8(vector< char > &os, Uint8 data)
static void sx_AddBits(vector< char > &bits, TSeqPos kChunkSize, const CSeq_graph &graph)
void sx_SetOverviewName(CSeq_annot &annot, CSNPDbSeqIterator::TFlags flags, const string &annot_name, int overview_zoom)
static const TSeqPos kMaxSNPLength
static const char kFeatSubtypesToChars[]
void x_CollectCoverageGraph(SGraphMaker &g, const CSNPDbSeqIterator &seq_it, CRange< TSeqPos > range, SGraphMaker::EGraphSet graph_set)
static const int kChunkIdMul
static const int kMaxTableAlleles
static const bool kPreloadSeqList
CRef< CSeq_annot > x_NewAnnot(const string &annot_name=kDefaultAnnotName)
static const TSeqPos kCoverageZoom
static CObject_id & x_GetObject_id(CRef< CObject_id > &cache, const char *name)
static const bool kPage2FeatErrorWorkaround
static T & x_GetPrivate(CRef< T > &ref)
string sx_CombineWithZoomLevel(const string &acc, int zoom_level)
static const int kChunkIdFeat
TSeqPos x_RoundPos(TSeqPos pos, TSeqPos step)
#define x_SetStringConstant(obj, Field, value)
static const int kChunkIdGraph
TSeqPos x_RoundPosUp(TSeqPos pos, TSeqPos step)
void x_AdjustRange(CRange< TSeqPos > &range, const CSNPDbSeqIterator &it)
void sx_AddBits2(vector< char > &bits, TSeqPos bit_values, TSeqPos pos_index, const TValues &values)
Cont::value_type::TObjectType & sx_AddNew(Cont &cont)
#define NCBI_THROW2_FMT(exception_class, err_code, message, extra)
#define row(bind, expected)
CRef< CUser_field > m_Bitfield
CRef< CGb_qual > m_AlleleCache_empty
CRef< CGb_qual > m_AlleleCache_minus
CRef< CGb_qual > m_AlleleCacheG
CRef< CSeq_interval > m_LocInt
CGb_qual & x_GetCommonAllele(CRef< CGb_qual > &cache, CTempString val)
CRef< CGb_qual > m_AlleleCacheT
CRef< CUser_field > m_Subtype
CRef< CObject_id > m_ObjectIdBitfield
CRef< CSeq_point > m_LocPnt
CRef< CGb_qual > m_Allele[4]
CGb_qual & GetAllele(CRef< CGb_qual > &cache, CTempString val)
CRef< CUser_object > m_Ext
CGb_qual & x_GetCachedAllele(CRef< CGb_qual > &cache, CTempString val)
CRef< CGb_qual > m_AlleleCacheC
CRef< CGb_qual > m_AlleleCacheA
CRef< CObject_id > m_ObjectIdQAdata
CRef< CObject_id > m_ObjectIdSubtype
DECLARE_VDB_COLUMN_AS(Uint4, FEAT_ID_PREFIX)
DECLARE_VDB_COLUMN_AS_STRING(FEAT_TYPE)
DECLARE_VDB_COLUMN_AS(Uint4, FEAT_SUBTYPE)
DECLARE_VDB_COLUMN_AS(TVDBRowId, SEQ_ID_ROW_NUM)
SFeatTableCursor(const CVDBTable &table)
DECLARE_VDB_COLUMN_AS(INSDC_coord_len, LEN)
DECLARE_VDB_COLUMN_AS(TVDBRowCount, EXTRA_ROWS_COUNT)
DECLARE_VDB_COLUMN_AS(TVDBRowId, EXTRA_ROW_FROM)
DECLARE_VDB_COLUMN_AS(Uint8, BIT_FLAGS)
DECLARE_VDB_COLUMN_AS(Uint8, FEAT_ID_VALUE)
DECLARE_VDB_COLUMN_AS(INSDC_coord_zero, FROM)
DECLARE_VDB_COLUMN_AS(Uint4, GR_ZOOM)
DECLARE_VDB_COLUMN_AS(TVDBRowId, FILTER_ID_ROW_NUM)
SGraphTableCursor(const CVDBTable &table)
DECLARE_VDB_COLUMN_AS(INSDC_coord_zero, BLOCK_FROM)
DECLARE_VDB_COLUMN_AS(Uint4, GR_TOTAL)
DECLARE_VDB_COLUMN_AS(TVDBRowId, SEQ_ID_ROW_NUM)
SPageTableCursor(const CVDBTable &table)
DECLARE_VDB_COLUMN_AS(TVDBRowCount, FEATURE_ROWS_COUNT)
DECLARE_VDB_COLUMN_AS(TVDBRowId, SEQ_ID_ROW_NUM)
DECLARE_VDB_COLUMN_AS(TVDBRowId, FEATURE_ROW_FROM)
DECLARE_VDB_COLUMN_AS(INSDC_coord_zero, PAGE_FROM)
TSeqPos GetSeqPosEnd(TSeqPos page_size) const
TVDBRowId GetRowIdEnd(void) const
vector< SPageSet > TPageSets
SSeqTableCursor(const CVDBTable &table)
DECLARE_VDB_COLUMN_AS(INSDC_coord_len, LEN)
DECLARE_VDB_COLUMN_AS_STRING(ACCESSION)
STrackTableCursor(const CVDBTable &table)
DECLARE_VDB_COLUMN_AS(Uint8, MASK)
DECLARE_VDB_COLUMN_AS_STRING(NAME)
DECLARE_VDB_COLUMN_AS(Uint8, BITS)
SColumn(CSeqTable_column_info::EField_id id, const char *name=0)
CSeqTable_column * x_GetColumn(void)
DECLARE_OPERATOR_BOOL_REF(column)
void Attach(CSeq_table &table)
CRef< CSeqTable_column > column
void Init(CSeqTable_column_info::EField_id id, const char *name=0)
CRef< CSeqTable_column > GetColumn(void)
CCommonBytes_table::TIndexes * indexes
void Attach(CSeq_table &table)
map< Uint8, size_t > TIndex
CCommonBytes_table::TBytes * values
SCommon8Bytes(CSeqTable_column_info::EField_id id, const char *name=0)
SCommonStrings(CSeqTable_column_info::EField_id id, const char *name=0)
CCommonString_table::TIndexes * indexes
void Attach(CSeq_table &table)
list< string > index_strings
unordered_map< CTempString, int > TIndex
void Add(CTempString val)
CCommonString_table::TStrings * values
void Start(const CSNPDbSeqIterator &it, CRange< TSeqPos > &range, TSeqPos comp, EGraphSet graph_set=eMultipleGraphs, EGapsType gaps_type=eAllowGaps)
CRef< CSeq_graph > m_Graph
void AddValue(Uint4 value)
CRange< TSeqPos > m_Range
list< CRef< CSeq_graph > > TGraphs
static const TSeqPos kMinGraphGap
CRef< CSeq_graph > FinishGraph()
void AddValues(TSeqPos count, const Uint4 *values)
void AddActualValues(TSeqPos count, const Uint4 *values)
CSeq_graph & x_GetGraph()
void AddActualValue(Uint4 value)
void x_EndGraph(bool save=true)
void AddActualZeroes(TSeqPos count)
void AddEmpty(TSeqPos count)
SInt8Column(CSeqTable_column_info::EField_id id, const char *name=0)
CSeqTable_multi_data::TInt8 * values8
SIntColumn(CSeqTable_column_info::EField_id id, const char *name=0)
CSeqTable_multi_data::TInt * values
bool Matches(TFilter bits) const
SCommon8Bytes col_bitfield
static void AddFixedInt(CSeq_table &table, const char *name, int value)
void Add(const CSNPDbFeatIterator &it)
CRef< CSeq_annot > GetAnnot(const string &annot_name, CSeq_id &seq_id)
static void AddFixedSeq_id(CSeq_table &table, CSeqTable_column_info::EField_id id, CSeq_id &value)
SCommonStrings col_subtype
SCommonStrings col_alleles[kMaxTableAlleles]
static void AddFixedSeq_loc(CSeq_table &table, const char *name, CSeq_loc &value)
static void AddFixedString(CSeq_table &table, CSeqTable_column_info::EField_id id, const string &value)
bool AddToTable(const CSNPDbFeatIterator &it)
SSeqTableContent m_Tables[2][kMaxTableAlleles]
SSeqTableConverter(const CSNPDbSeqIterator &it)
vector< CRef< CSeq_annot > > GetAnnots(const string &annot_name)
CRef< CSeq_annot > m_RegularAnnot
void Add(const CSNPDbFeatIterator &it)
SSparseIndex(SColumn &column)
CSeqTable_sparse_index::TIndexes * indexes
void Optimize(SIntColumn &column, const SIntColumn &backup_column)
size_t operator()(ncbi::CTempString val) const
int g(Seg_Gsm *spe, Seq_Mtf *psm, Thd_Gsm *tdg)
#define INIT_VDB_COLUMN(name)
pair< TVDBRowId, TVDBRowCount > TVDBRowIdRange
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4