NCBI C++ ToolKit
vdbgraphloader_impl.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: vdbgraphloader_impl.cpp 64474 2014-09-16 19:14:26Z grichenk $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Eugene Vasilchenko
27  *
28  * File Description: data loader for VDB graph data
29  *
30  * ===========================================================================
31  */
32 
33 #include <ncbi_pch.hpp>
34 #include <corelib/ncbistd.hpp>
35 
38 #include <objects/seq/seq__.hpp>
40 
49 
53 #include <sra/error_codes.hpp>
54 
56 
57 #define NCBI_USE_ERRCODE_X VDBGraphLoader
59 
60 class CObject;
61 
63 
64 class CDataLoader;
65 
66 #define OVERVIEW_NAME_SUFFIX "@@5000"
67 #define MID_ZOOM_NAME_SUFFIX "@@100"
68 
69 static const TSeqPos kOverviewChunkSize = 20000*5000;
70 static const TSeqPos kMidZoomChunkSize = 20000*100;
71 static const TSeqPos kMainChunkSize = 100000;
72 
73 static const size_t kOverviewChunkIdAdd = 0;
74 static const size_t kMidZoomChunkIdAdd = 1;
75 static const size_t kMainGraphChunkIdAdd = 2;
76 static const size_t kMainTableChunkIdAdd = 3;
77 static const size_t kChunkIdMul = 4;
78 
79 static const int kTSEId = 1;
80 
81 NCBI_PARAM_DECL(int, VDBGRAPH_LOADER, DEBUG);
82 NCBI_PARAM_DEF_EX(int, VDBGRAPH_LOADER, DEBUG, 0,
83  eParam_NoThread, VDBGRAPH_LOADER_DEBUG);
84 
85 static int GetDebugLevel(void)
86 {
88  return s_Value->Get();
89 }
90 
91 
92 NCBI_PARAM_DECL(size_t, VDBGRAPH_LOADER, GC_SIZE);
93 NCBI_PARAM_DEF_EX(size_t, VDBGRAPH_LOADER, GC_SIZE, 10,
94  eParam_NoThread, VDBGRAPH_LOADER_GC_SIZE);
95 
96 static size_t GetGCSize(void)
97 {
99  return s_Value->Get();
100 }
101 
102 
103 NCBI_PARAM_DECL(size_t, VDBGRAPH_LOADER, MISSING_GC_SIZE);
104 NCBI_PARAM_DEF_EX(size_t, VDBGRAPH_LOADER, MISSING_GC_SIZE, 10000,
105  eParam_NoThread, VDBGRAPH_LOADER_MISSING_GC_SIZE);
106 
107 static size_t GetMissingGCSize(void)
108 {
110  return s_Value->Get();
111 }
112 
113 
114 NCBI_PARAM_DECL(int, VDBGRAPH_LOADER, USE_TABLE);
115 NCBI_PARAM_DEF_EX(int, VDBGRAPH_LOADER, USE_TABLE, 2,
116  eParam_NoThread, VDBGRAPH_LOADER_USE_TABLE);
117 
118 static int GetUseTable(void)
119 {
121  return s_Value->Get();
122 }
123 
124 
125 NCBI_PARAM_DECL(bool, VDBGRAPH_LOADER, DISABLE_ZOOM);
126 NCBI_PARAM_DEF_EX(bool, VDBGRAPH_LOADER, DISABLE_ZOOM, false,
127  eParam_NoThread, VDBGRAPH_LOADER_DISABLE_ZOOM);
128 
129 static bool GetDisabledZoom(void)
130 {
132  return s_Value->Get();
133 }
134 
135 
136 static bool GetEnabledOverview(void)
137 {
138  return !GetDisabledZoom();
139 }
140 
141 
142 static bool GetEnabledMidZoom(void)
143 {
144  return !GetDisabledZoom();
145 }
146 
147 
148 /////////////////////////////////////////////////////////////////////////////
149 // CVDBGraphBlobId
150 /////////////////////////////////////////////////////////////////////////////
151 
152 class CVDBGraphBlobId : public CBlobId
153 {
154 public:
155  CVDBGraphBlobId(const string& file, const CSeq_id_Handle& id);
156  ~CVDBGraphBlobId(void);
157 
158  string m_VDBFile;
161 
162  string ToString(void) const;
163  CVDBGraphBlobId(const string& str);
164 
165  bool operator<(const CBlobId& id) const;
166  bool operator==(const CBlobId& id) const;
167 };
168 
169 
171  : m_VDBFile(file),
172  m_SeqId(id)
173 {
174 }
175 
176 
178 {
179 }
180 
181 
182 string CVDBGraphBlobId::ToString(void) const
183 {
185  out << m_VDBFile << '\0' << m_SeqId;
186  return CNcbiOstrstreamToString(out);
187 }
188 
189 
191 {
192  SIZE_TYPE pos1 = str.find('\0');
193  m_VDBFile = str.substr(0, pos1);
194  m_SeqId = CSeq_id_Handle::GetHandle(str.substr(pos1+1));
195 }
196 
197 
198 bool CVDBGraphBlobId::operator<(const CBlobId& id) const
199 {
200  const CVDBGraphBlobId& sra2 = dynamic_cast<const CVDBGraphBlobId&>(id);
201  return m_SeqId < sra2.m_SeqId ||
202  (m_SeqId == sra2.m_SeqId && m_VDBFile < sra2.m_VDBFile);
203 }
204 
205 
207 {
208  const CVDBGraphBlobId& sra2 = dynamic_cast<const CVDBGraphBlobId&>(id);
209  return m_SeqId == sra2.m_SeqId && m_VDBFile == sra2.m_VDBFile;
210 }
211 
212 
213 /////////////////////////////////////////////////////////////////////////////
214 // CVDBGraphDataLoader_Impl
215 /////////////////////////////////////////////////////////////////////////////
216 
217 
219  : m_AutoFileMap(GetGCSize()),
220  m_MissingFileSet(GetMissingGCSize())
221 {
222  ITERATE ( TVDBFiles, it, vdb_files ) {
223  if ( GetDebugLevel() >= 2 ) {
224  LOG_POST_X(1, "CVDBGraphDataLoader: opening explicit file "<<*it);
225  }
227  info->m_VDBFile = *it;
228  info->m_BaseAnnotName = CDirEntry(*it).GetName();
229  info->m_VDB = CVDBGraphDb(m_Mgr, *it);
230  m_FixedFileMap[*it] = info;
231  for ( CVDBGraphSeqIterator seq_it(info->m_VDB); seq_it; ++seq_it ) {
232  if ( GetDebugLevel() >= 3 ) {
233  LOG_POST_X(8, "CVDBGraphDataLoader: found id "<<
234  seq_it.GetSeq_id_Handle());
235  }
237  (TSeqIdIndex::value_type(seq_it.GetSeq_id_Handle(), info));
238  }
239  }
240 }
241 
242 
244 {
245 }
246 
247 
249 {
250  return CVDBGraphSeqIterator(m_VDB, id);
251 }
252 
253 
255 {
256  return m_BaseAnnotName;
257 }
258 
259 
261 {
262  return m_BaseAnnotName+OVERVIEW_NAME_SUFFIX;
263 }
264 
265 
267 {
268  return m_BaseAnnotName+MID_ZOOM_NAME_SUFFIX;
269 }
270 
271 
274 {
275  TAnnotNames names;
277  const SVDBFileInfo& info = *it->second;
278  names.push_back(CAnnotName(info.GetMainAnnotName()));
279  names.push_back(CAnnotName(info.GetMidZoomAnnotName()));
280  names.push_back(CAnnotName(info.GetOverviewAnnotName()));
281  }
282  sort(names.begin(), names.end());
283  names.erase(unique(names.begin(), names.end()), names.end());
284  return names;
285 }
286 
287 
290 {
291  // no blobs with sequence
292  return CDataLoader::TBlobId();
293 }
294 
295 
298 {
299  return CDataLoader::TBlobId(new CVDBGraphBlobId(str));
300 }
301 
302 
305  const CDataLoader::TBlobId& blob_id0)
306 {
307  CTSE_LoadLock load_lock = ds->GetTSE_LoadLock(blob_id0);
308  if ( !load_lock.IsLoaded() ) {
309  const CVDBGraphBlobId& blob_id =
310  dynamic_cast<const CVDBGraphBlobId&>(*blob_id0);
311  if ( 1 ) {
312  LoadSplitEntry(*load_lock, blob_id);
313  }
314  else {
315  load_lock->SetSeq_entry(*LoadFullEntry(blob_id));
316  }
317  load_lock.SetLoaded();
318  }
319  return load_lock;
320 }
321 
322 
325  const CSeq_id_Handle& id,
326  CDataLoader::EChoice choice)
327 {
328  TTSE_LockSet locks;
329  if ( choice == CDataLoader::eOrphanAnnot ||
330  choice == CDataLoader::eAll ) {
332  it != m_SeqIdIndex.end() && it->first == id; ++it ) {
333  TBlobId blob_id(new CVDBGraphBlobId(it->second->m_VDBFile, id));
334  locks.insert(GetBlobById(ds, blob_id));
335  }
336  }
337  return locks;
338 }
339 
340 
343  const CSeq_id_Handle& id,
344  const SAnnotSelector* sel)
345 {
346  TTSE_LockSet locks;
347  // explicitly specified files
349  it != m_SeqIdIndex.end() && it->first == id; ++it ) {
350  if ( !sel || sel->IsIncludedNamedAnnotAccession(it->second->m_BaseAnnotName) ) {
351  TBlobId blob_id(new CVDBGraphBlobId(it->second->m_VDBFile, id));
352  locks.insert(GetBlobById(ds, blob_id));
353  }
354  }
355  // implicitly load NA accessions
356  if ( sel && sel->IsIncludedAnyNamedAnnotAccession() ) {
359  if ( m_AutoFileMap.get_size_limit() < accs.size() ) {
360  // increase VDB cache size
362  }
363  if ( m_MissingFileSet.get_size_limit() < accs.size() ) {
364  // increase VDB cache size
366  }
368  if ( 1 ) {
369  TBlobId blob_id(new CVDBGraphBlobId(it->first, id));
370  if ( CTSE_LoadLock lock = ds->GetTSE_LoadLockIfLoaded(blob_id) ) {
371  locks.insert(GetBlobById(ds, blob_id));
372  continue;
373  }
374  }
375  SVDBFileInfo* file = x_GetNAFileInfo(it->first);
376  if ( file && file->ContainsAnnotsFor(id) ) {
377  TBlobId blob_id(new CVDBGraphBlobId(file->m_VDBFile, id));
378  locks.insert(GetBlobById(ds, blob_id));
379  }
380  }
381  }
382  return locks;
383 }
384 
385 
388 {
389  if ( GetDebugLevel() >= 5 ) {
390  LOG_POST_X(4, "CVDBGraphDataLoader: "
391  "loading full entry for "<<blob_id.m_SeqId);
392  }
393  CRef<SVDBFileInfo> info_ref = x_GetFileInfo(blob_id.m_VDBFile);
394  SVDBFileInfo& info = *info_ref;
395  CVDBGraphSeqIterator it(info.m_VDB, blob_id.m_SeqId);
396  if ( !it ) {
397  return null;
398  }
399  CRef<CSeq_entry> entry(new CSeq_entry);
400  entry->SetSet().SetSeq_set();
402  CBioseq_set::TAnnot& dst = entry->SetSet().SetAnnot();
406  if ( GetUseTable() == 2 ||
407  (GetUseTable() == 1 && it.SeqTableIsSmaller(range)) ) {
408  main_flags |= it.fGraphMainAsTable;
409  }
410  if ( GetEnabledOverview() ) {
411  dst.push_back(it.GetAnnot(range,
412  info.GetMainAnnotName(),
413  overview_flags));
414  }
415  if ( GetEnabledMidZoom() && info.m_VDB->HasMidZoomGraphs() ) {
416  dst.push_back(it.GetAnnot(range,
417  info.GetMainAnnotName(),
418  mid_zoom_flags));
419  }
420  dst.push_back(it.GetAnnot(range,
421  info.GetMainAnnotName(),
422  main_flags));
423  return entry;
424 }
425 
426 
428  const CVDBGraphBlobId& blob_id)
429 {
430  if ( GetDebugLevel() >= 5 ) {
431  LOG_POST_X(5, "CVDBGraphDataLoader: "
432  "loading split entry for "<<blob_id.m_SeqId);
433  }
434  CRef<SVDBFileInfo> info_ref = x_GetFileInfo(blob_id.m_VDBFile);
435  const_cast<CVDBGraphBlobId&>(blob_id).m_FileInfo = info_ref;
436  SVDBFileInfo& info = *info_ref;
437  CVDBGraphSeqIterator it(info.m_VDB, blob_id.m_SeqId);
438  if ( !it ) {
439  return;
440  }
441  CRef<CSeq_entry> entry(new CSeq_entry);
442  entry->SetSet().SetSeq_set();
443  entry->SetSet().SetId().SetId(kTSEId);
444  tse.SetSeq_entry(*entry);
445  TSeqPos length = it.GetSeqLength();
446  size_t kIdAdd[3] = {
449  kMainGraphChunkIdAdd
450  };
451  if ( GetUseTable() == 2 ||
452  (GetUseTable() == 1 &&
454  kIdAdd[2] = kMainTableChunkIdAdd;
455  }
456  static const TSeqPos kSize[3] = {
459  kMainChunkSize
460  };
461  CAnnotName kName[3] = {
462  info.GetOverviewAnnotName(),
463  info.GetMidZoomAnnotName(),
464  info.GetMainAnnotName()
465  };
466  CTSE_Split_Info& split_info = tse.GetSplitInfo();
467  CTSE_Chunk_Info::TPlace place(CSeq_id_Handle(), kTSEId);
468  for ( int k = 0; k < 3; ++k ) {
469  if ( kIdAdd[k] == kOverviewChunkIdAdd &&
470  !GetEnabledOverview() ) {
471  continue;
472  }
473  if ( kIdAdd[k] == kMidZoomChunkIdAdd &&
474  !(GetEnabledMidZoom() && info.m_VDB->HasMidZoomGraphs()) ) {
475  continue;
476  }
477  for ( int i = 0; i*kSize[k] < length; ++i ) {
478  TSeqPos from = i*kSize[k], to_open = min(length, from+kSize[k]);
479  COpenRange<TSeqPos> range(from, to_open);
480  size_t id_add = kIdAdd[k];
482  if ( id_add == kMainTableChunkIdAdd ) {
484  }
485  int chunk_id = int(i*kChunkIdMul+id_add);
486  CRef<CTSE_Chunk_Info> chunk(new CTSE_Chunk_Info(chunk_id));
487  chunk->x_AddAnnotType(kName[k], type, it.GetSeq_id_Handle(), range);
488  chunk->x_AddAnnotPlace(place);
489  split_info.AddChunk(*chunk);
490  }
491  }
492 }
493 
494 
496 {
497  const CVDBGraphBlobId& blob_id =
498  dynamic_cast<const CVDBGraphBlobId&>(*chunk.GetBlobId());
499  CRef<SVDBFileInfo> info_ref = blob_id.m_FileInfo;
500  if ( !info_ref ) {
501  info_ref = x_GetFileInfo(blob_id.m_VDBFile);
502  }
503  SVDBFileInfo& info = *info_ref;
504  CVDBGraphSeqIterator it(info.m_VDB, blob_id.m_SeqId);
505  if ( !it ) {
506  return;
507  }
508  TSeqPos length = it.GetSeqLength();
509 
510  static const TSeqPos kSize[kChunkIdMul] = {
514  kMainChunkSize
515  };
520  CVDBGraphSeqIterator::fGraphMain|CVDBGraphSeqIterator::fGraphMainAsTable
521  };
522  static const char* const kTypeName[kChunkIdMul] = {
523  "overview",
524  "mid-zoom",
525  "main graph",
526  "main table"
527  };
528  string name = info.GetMainAnnotName();
529  int k = chunk.GetChunkId()%kChunkIdMul;
530  int i = chunk.GetChunkId()/kChunkIdMul;
531  TSeqPos from = i*kSize[k], to_open = min(length, from+kSize[k]);
532  if ( GetDebugLevel() >= 6 ) {
533  LOG_POST_X(6, "CVDBGraphDataLoader: "
534  "loading "<<kTypeName[k]<<" chunk "<<blob_id.m_SeqId<<
535  " @ "<<from<<"-"<<(to_open-1));
536  }
537  CVDBGraphSeqIterator::TContentFlags flags = kFlags[k];
538  CRef<CSeq_annot> annot =
539  it.GetAnnot(COpenRange<TSeqPos>(from, to_open), name, flags);
540  if ( GetDebugLevel() >= 6 ) {
541  LOG_POST_X(7, "CVDBGraphDataLoader: "
542  "loaded "<<kTypeName[k]<<" chunk "<<blob_id.m_SeqId<<
543  " @ "<<from<<"-"<<(to_open-1)<<": "<<MSerial_AsnText<<*annot);
544  }
545  CTSE_Chunk_Info::TPlace place(CSeq_id_Handle(), kTSEId);
546  chunk.x_LoadAnnot(place, *annot);
547  chunk.SetLoaded();
548 }
549 
550 
551 static bool sx_IsNA(const string& s)
552 {
553  // NA%09d.%d
554  if ( s.size() < 13 ) {
555  return false;
556  }
557  if ( s[0] != 'N' || s[1] != 'A' || s[11] != '.' ) {
558  return false;
559  }
560  for ( int i = 0; i < 9; ++i ) {
561  if ( !isdigit(s[i+2]&0xff) ) {
562  return false;
563  }
564  }
565  return NStr::StringToNonNegativeInt(s.substr(12)) > 0;
566 }
567 
568 
571 {
572  if ( !m_FixedFileMap.empty() ) {
573  return null;
574  }
575  if ( !sx_IsNA(na_acc) ) {
576  return null;
577  }
578  CMutexGuard guard(m_Mutex);
579  TMissingFileSet::iterator it2 = m_MissingFileSet.find(na_acc);
580  if ( it2 != m_MissingFileSet.end() ) {
581  return null;
582  }
583  TAutoFileMap::iterator it = m_AutoFileMap.find(na_acc);
584  if ( it != m_AutoFileMap.end() ) {
585  return it->second;
586  }
588  info->m_VDBFile = na_acc;
589  info->m_BaseAnnotName = na_acc;
590  try {
591  if ( GetDebugLevel() >= 2 ) {
592  LOG_POST_X(2, "CVDBGraphDataLoader: auto-opening file "<<na_acc);
593  }
594  info->m_VDB = CVDBGraphDb(m_Mgr, na_acc);
595  }
596  catch ( CSraException& exc ) {
597  if ( exc.GetErrCode() != exc.eNotFoundTable ) {
598  throw;
599  }
600  if ( GetDebugLevel() >= 2 ) {
601  LOG_POST_X(3, "CVDBGraphDataLoader: accession not found: "<<na_acc);
602  }
603  m_MissingFileSet[na_acc] = true;
604  return null;
605  }
606  m_AutoFileMap[na_acc] = info;
607  return info;
608 }
609 
610 
613 {
615  if ( it != m_FixedFileMap.end() ) {
616  return it->second;
617  }
618  return x_GetNAFileInfo(name);
619 }
620 
621 
void AddChunk(CTSE_Chunk_Info &chunk_info)
static struct @704 kFlags[]
static const TSeqPos kMainChunkSize
bool SeqTableIsSmaller(COpenRange< TSeqPos > range) const
Definition: graphread.cpp:494
size_type size() const
Definition: map.hpp:148
CSafeStatic<>::
CVDBGraphBlobId(const string &file, const CSeq_id_Handle &id)
Helper classes and templates to implement plugins.
static const size_t kMainTableChunkIdAdd
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
#define MSerial_AsnText
I/O stream manipulators –.
Definition: serialbase.hpp:626
NCBI_DEFINE_ERR_SUBCODE_X(8)
TAnnotNames GetPossibleAnnotNames(void) const
static size_t GetMissingGCSize(void)
const TNamedAnnotAccessions & GetNamedAnnotAccessions(void) const
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:73
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:932
EChoice
main blob is blob with sequence all other blobs are external and contain external annotations ...
std::ofstream out("events_result.xml")
main entry point for tests
void LoadSplitEntry(CTSE_Info &tse, const CVDBGraphBlobId &blob_id)
static const size_t kMidZoomChunkIdAdd
void SetSeq_entry(CSeq_entry &entry, CTSE_SetObjectInfo *set_info=0)
Definition: tse_info.cpp:340
static TThisType GetWhole(void)
Definition: range.hpp:272
pair< TBioseqId, TBioseq_setId > TPlace
static const size_t kOverviewChunkIdAdd
CRef< CSeq_annot > GetAnnot(COpenRange< TSeqPos > range, const string &annot_name=kEmptyStr, TContentFlags content=fDefaultContent) const
Definition: graphread.cpp:511
TChunkId GetChunkId(void) const
bool IsLoaded(void) const
CDirEntry –.
Definition: ncbifile.hpp:241
static const TSeqPos kOverviewChunkSize
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
bool IsIncludedAnyNamedAnnotAccession(void) const
check if any named annot accession is included in the search
bool operator<(const CBlobId &id) const
static size_t GetGCSize(void)
void SetLoaded(CObject *obj=0)
static int GetUseTable(void)
void set_size_limit(size_t size_limit)
string ToString(void) const
Get string representation of blob id.
SAnnotSelector –.
const_iterator end() const
Definition: map.hpp:292
iterator end(void)
virtual TErrCode GetErrCode(void) const
Definition: sraread.cpp:162
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:872
int i
FILE * file
NCBI_PARAM_DECL(int, VDBGRAPH_LOADER, DEBUG)
CRef< CVDBGraphDataLoader_Impl::SVDBFileInfo > m_FileInfo
const CSeq_id_Handle & GetSeq_id_Handle(void) const
Definition: graphread.hpp:203
TBlobId GetBlobId(const CSeq_id_Handle &idh)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
iterator insert(const value_type &val)
Definition: map.hpp:305
TSet & SetSet(void)
Select the variant.
Definition: Seq_entry_.cpp:130
const_iterator end() const
Definition: map.hpp:152
CSeq_id_Handle m_SeqId
bool IsIncludedNamedAnnotAccession(const string &acc) const
check if named annot accession is included in the search
#define DEBUG
Definition: config.h:28
const_iterator find(const key_type &key) const
Definition: map.hpp:153
NCBI_PARAM_DEF_EX(int, VDBGRAPH_LOADER, DEBUG, 0, eParam_NoThread, VDBGRAPH_LOADER_DEBUG)
static bool GetEnabledOverview(void)
void x_AddAnnotType(const CAnnotName &annot_name, const SAnnotTypeSelector &annot_type, const TLocationId &location_id)
TTSE_LockSet GetRecords(CDataSource *ds, const CSeq_id_Handle &idh, CDataLoader::EChoice choice)
string GetName(void) const
Get the base entry name with extension (if any).
Definition: ncbifile.hpp:3682
list< CRef< CSeq_annot > > TAnnot
#define LOG_POST_X(err_subcode, message)
Definition: ncbidiag.hpp:541
bool empty() const
Definition: map.hpp:149
CVDBGraphDataLoader_Impl(const TVDBFiles &vdb_files)
TTSE_Lock GetBlobById(CDataSource *ds, const TBlobId &blob_id)
TTSE_LockSet GetOrphanAnnotRecords(CDataSource *ds, const CSeq_id_Handle &idh, const SAnnotSelector *sel)
int isdigit(Uchar c)
Definition: ncbictype.hpp:61
void x_LoadAnnot(const TPlace &place, const CSeq_annot &annot)
const_iterator lower_bound(const key_type &key) const
Definition: map.hpp:294
void SetLoaded(void)
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
void SetId(TId &value)
Assign a value to Id data member.
Definition: Bioseq_set_.cpp:93
CBlobIdKey TBlobId
vector< CAnnotName > TAnnotNames
static int GetDebugLevel(void)
#define OVERVIEW_NAME_SUFFIX
void GetChunk(CTSE_Chunk_Info &chunk)
T min(T x_, T y_)
CRef< SVDBFileInfo > x_GetFileInfo(const string &name)
Definition: Seq_entry.hpp:55
bool operator==(const CBlobId &id) const
CObject –.
Definition: ncbiobj.hpp:180
E_Choice
Choice variants.
Definition: Seq_annot_.hpp:131
TSeqPos GetSeqLength(void) const
Definition: graphread.hpp:207
CRef< SVDBFileInfo > x_GetNAFileInfo(const string &na_acc)
iterator find(const key_type &key)
static bool GetDisabledZoom(void)
Do not use per-thread values.
Definition: ncbi_param.hpp:465
NCBI_NS_STD::string::size_type SIZE_TYPE
Define size type.
Definition: ncbistr.hpp:130
size_t get_size_limit(void) const
IO_PREFIX::ostrstream CNcbiOstrstream
Portable alias for ostrstream.
Definition: ncbistre.hpp:163
static int StringToNonNegativeInt(const string &str)
Convert string to non-negative integer value.
Definition: ncbistr.cpp:326
void x_AddAnnotPlace(const TBioseqId &id)
CTSE_Split_Info & GetSplitInfo(void)
Definition: tse_info.cpp:1355
TBlobId GetBlobId(void) const
static const size_t kChunkIdMul
all blobs (main and external)
bool ContainsAnnotsFor(const CSeq_id_Handle &id) const
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:70
all external annotations if no Bioseq exists
static const TSeqPos kMidZoomChunkSize
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
CTSE_LoadLock GetTSE_LoadLock(const TBlobId &blob_id)
static bool GetEnabledMidZoom(void)
DB table not found.
Definition: exception.hpp:91
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
CRef< CSeq_entry > LoadFullEntry(const CVDBGraphBlobId &blob_id)
TBlobId GetBlobIdFromString(const string &str) const
unsigned int
Definition: types.hpp:1068
T & Get(void)
Create the variable if not created yet, return the reference.
CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TBlobId &blob_id)
static bool sx_IsNA(const string &s)
static const bool kName
#define MID_ZOOM_NAME_SUFFIX
Modified on Thu Aug 27 15:30:53 2015 by modify_doxy.py rev. 426318