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

Go to the SVN repository for this file.

1 /* $Id: gbnative.cpp 101259 2023-11-21 17:57:47Z vasilche $
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: Michael Kimelman, Eugene Vasilchenko
27 *
28 * File Description: GenBank Data loader
29 *
30 */
31 
32 #include <ncbi_pch.hpp>
33 #include <corelib/ncbi_param.hpp>
39 
42 
43 // TODO: remove the following includes
44 #define REGISTER_READER_ENTRY_POINTS 1
45 #ifdef REGISTER_READER_ENTRY_POINTS
47 #endif
48 
50 #include <objtools/error_codes.hpp>
51 
53 
54 #include <objmgr/impl/tse_info.hpp>
60 
62 
63 #include <corelib/ncbithr.hpp>
64 #include <corelib/ncbiapp.hpp>
65 
68 
69 #include <algorithm>
70 
71 
72 #define NCBI_USE_ERRCODE_X Objtools_GBLoader
73 
76 
77 //=======================================================================
78 // GBLoader sub classes
79 //
80 
81 //=======================================================================
82 // GBLoader Public interface
83 //
84 
85 
86 NCBI_PARAM_DECL(string, GENBANK, READER_NAME);
87 NCBI_PARAM_DEF_EX(string, GENBANK, READER_NAME, "",
88  eParam_NoThread, GENBANK_READER_NAME);
89 typedef NCBI_PARAM_TYPE(GENBANK, READER_NAME) TGenbankReaderName;
90 
91 NCBI_PARAM_DECL(string, GENBANK, WRITER_NAME);
92 NCBI_PARAM_DEF_EX(string, GENBANK, WRITER_NAME, "",
93  eParam_NoThread, GENBANK_WRITER_NAME);
94 typedef NCBI_PARAM_TYPE(GENBANK, WRITER_NAME) TGenbankWriterName;
95 
96 #if defined(HAVE_PUBSEQ_OS)
97 static const char* const DEFAULT_DRV_ORDER = "id2:pubseqos";
98 #else
99 static const char* const DEFAULT_DRV_ORDER = "id2";
100 #endif
101 static const char* const DEFAULT_HUP_DRV_ORDER = "pubseqos2:pubseqos";
102 
103 #define GBLOADER_NAME "GBLOADER"
104 #define GBLOADER_HUP_NAME "GBLOADER-HUP"
105 
106 #define DEFAULT_ID_GC_SIZE 10000
107 #define DEFAULT_ID_EXPIRATION_TIMEOUT 2*3600 // 2 hours
108 
110 {
112 public:
114  const CSeq_id_Handle& requested_id);
116 
118  {
119  return *m_Loader;
120  }
121  virtual CGBDataLoader_Native* GetLoaderPtr(void) override;
122 
123  //virtual TConn GetConn(void);
124  //virtual void ReleaseConn(void);
125  virtual CTSE_LoadLock GetTSE_LoadLock(const TKeyBlob& blob_id) override;
126  virtual CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TKeyBlob& blob_id) override;
127  virtual void GetLoadedBlob_ids(const CSeq_id_Handle& idh,
128  TLoadedBlob_ids& blob_ids) const override;
129 
130  virtual operator CInitMutexPool&(void) override { return GetMutexPool(); }
131 
133 
135 
136  virtual bool GetAddWGSMasterDescr(void) const override;
137 
138  virtual EGBErrorAction GetPTISErrorAction(void) const override;
139 
140  friend class CGBDataLoader_Native;
141 
142 private:
144 };
145 
146 
149  const CGBLoaderParams& params,
150  CObjectManager::EIsDefault is_default,
151  CObjectManager::TPriority priority)
152 {
154  CDataLoader::RegisterInObjectManager(om, maker, is_default, priority);
155  return maker.GetRegisterInfo();
156 }
157 
158 
160  const CGBLoaderParams& params)
161  : CGBDataLoader(loader_name, params)
162 {
163  GBLOG_POST_X(1, "CGBDataLoader_Native");
164  x_CreateDriver(params);
165 }
166 
167 
169 {
170  GBLOG_POST_X(2, "~CGBDataLoader_Native");
171  CloseCache();
172 }
173 
174 
177 {
178  return dynamic_cast<const CBlob_id&>(*blob_id);
179 }
180 
181 
183 {
184  unique_ptr<TParamTree> app_params;
185  const TParamTree* gb_params = 0;
186  if ( params.GetParamTree() ) {
187  gb_params = GetLoaderParams(params.GetParamTree());
188  }
189  else {
191  if ( app ) {
192  app_params.reset(CConfig::ConvertRegToTree(app->GetConfig()));
193  gb_params = GetLoaderParams(app_params.get());
194  }
195  }
196 
197  size_t queue_size = DEFAULT_ID_GC_SIZE;
198  if ( gb_params ) {
199  try {
200  string param = GetParam(gb_params, NCBI_GBLOADER_PARAM_ID_GC_SIZE);
201  if ( !param.empty() ) {
202  queue_size = NStr::StringToUInt(param);
203  }
204  }
205  catch ( CException& /*ignored*/ ) {
206  }
207  }
208 
210  if ( gb_params ) {
211  string param =
213  if ( !param.empty() ) {
214  try {
215  Uint4 timeout = NStr::StringToNumeric<Uint4>(param);
216  if ( timeout > 0 ) {
217  m_IdExpirationTimeout = timeout;
218  }
219  }
220  catch ( CException& exc ) {
221  NCBI_RETHROW_FMT(exc, CLoaderException, eBadConfig,
222  "Bad value of parameter "
224  ": \""<<param<<"\"");
225  }
226  }
227  }
228  m_AlwaysLoadExternal = false;
229  if ( gb_params ) {
230  string param =
232  if ( !param.empty() ) {
233  try {
235  }
236  catch ( CException& exc ) {
237  NCBI_RETHROW_FMT(exc, CLoaderException, eBadConfig,
238  "Bad value of parameter "
240  ": \""<<param<<"\"");
241  }
242  }
243  }
244  m_AlwaysLoadNamedAcc = true;
245  if ( gb_params ) {
246  string param =
248  if ( !param.empty() ) {
249  try {
251  }
252  catch ( CException& exc ) {
253  NCBI_RETHROW_FMT(exc, CLoaderException, eBadConfig,
254  "Bad value of parameter "
256  ": \""<<param<<"\"");
257  }
258  }
259  }
260  m_AddWGSMasterDescr = true;
261  if ( gb_params ) {
262  string param =
264  if ( !param.empty() ) {
265  try {
267  }
268  catch ( CException& exc ) {
269  NCBI_RETHROW_FMT(exc, CLoaderException, eBadConfig,
270  "Bad value of parameter "
272  ": \""<<param<<"\"");
273  }
274  }
275  }
277  if ( gb_params ) {
278  string param =
280  if ( !param.empty() ) {
283  }
286  }
289  }
290  else {
291  NCBI_THROW_FMT(CLoaderException, eBadConfig,
292  "Bad value of parameter "
294  ": \""<<param<<"\"");
295  }
296  }
297  }
298 
300  m_InfoManager = new CGBInfoManager(queue_size);
301 
302  // now we create readers & writers
303  if ( params.GetReaderPtr() ) {
304  // explicit reader specified
305  CRef<CReader> reader(params.GetReaderPtr());
306  reader->OpenInitialConnection(false);
307  m_Dispatcher->InsertReader(1, reader);
308  return;
309  }
310 
312  params.GetPreopenConnection();
313  if ( preopen == CGBLoaderParams::ePreopenByConfig && gb_params ) {
314  try {
315  string param = GetParam(gb_params, NCBI_GBLOADER_PARAM_PREOPEN);
316  if ( !param.empty() ) {
317  if ( NStr::StringToBool(param) )
319  else
321  }
322  }
323  catch ( CException& /*ignored*/ ) {
324  }
325  }
326 
327  if ( !gb_params ) {
328  app_params.reset(new TParamTree);
329  gb_params = GetLoaderParams(app_params.get());
330  }
331 
332  if ( !params.GetReaderName().empty() ) {
333  string reader_name = params.GetReaderName();
334  NStr::ToLower(reader_name);
335  if ( NStr::StartsWith(reader_name, "pubseqos") )
336  m_WebCookie = params.GetWebCookie();
337 
338  if ( x_CreateReaders(reader_name, gb_params, params, preopen) ) {
339  if ( reader_name == "cache" ||
340  NStr::StartsWith(reader_name, "cache;") ) {
341  x_CreateWriters("cache", gb_params);
342  }
343  }
344  }
345  else {
346  pair<string, string> rw_name = GetReaderWriterName(gb_params, params);
347  if ( x_CreateReaders(rw_name.first, gb_params, params, preopen) ) {
348  x_CreateWriters(rw_name.second, gb_params);
349  }
350  }
351 }
352 
353 
354 pair<string, string>
355 CGBDataLoader_Native::GetReaderWriterName(const TParamTree* params, const CGBLoaderParams& loader_params) const
356 {
357  pair<string, string> ret;
358  if ( HasHUPIncluded() ) {
359  // use default HUP readers
360  ret.first = DEFAULT_HUP_DRV_ORDER;
361  return ret;
362  }
363  ret.first = GetParam(params, NCBI_GBLOADER_PARAM_READER_NAME);
364  if ( ret.first.empty() ) {
365  ret.first = TGenbankReaderName::GetDefault();
366  }
367  ret.second = loader_params.GetWriterName();
368  if (ret.second.empty()) {
369  ret.second = GetParam(params, NCBI_GBLOADER_PARAM_WRITER_NAME);
370  }
371  if ( ret.second.empty() ) {
372  ret.second = TGenbankWriterName::GetDefault();
373  }
374  if ( ret.first.empty() || ret.second.empty() ) {
375  string method = loader_params.GetLoaderMethod();
376  if ( method.empty() ) {
377  method = x_GetLoaderMethod(params);
378  }
379  if ( method.empty() ) {
380  // fall back default reader list
381  method = DEFAULT_DRV_ORDER;
382  }
383  NStr::ToLower(method);
384  if ( ret.first.empty() ) {
385  ret.first = method;
386  }
387  if ( ret.second.empty() && NStr::StartsWith(method, "cache;") ) {
388  ret.second = "cache";
389  }
390  }
391  NStr::ToLower(ret.first);
392  NStr::ToLower(ret.second);
393  return ret;
394 }
395 
396 
398  const TParamTree* params,
399  const CGBLoaderParams& gb_params,
401 {
402  vector<string> str_list;
403  NStr::Split(str, ";", str_list);
404  size_t reader_count = 0;
405  for ( size_t i = 0; i < str_list.size(); ++i ) {
406  CRef<CReader> reader(x_CreateReader(str_list[i], gb_params, params));
407  if( reader ) {
408  if ( HasHUPIncluded() ) {
409  reader->SetIncludeHUP(true, m_WebCookie);
410  }
411  if ( preopen != CGBLoaderParams::ePreopenNever ) {
413  }
414  m_Dispatcher->InsertReader(i, reader);
415  ++reader_count;
416  }
417  }
418  if ( !reader_count ) {
419  NCBI_THROW(CLoaderException, eLoaderFailed,
420  "no reader available from "+str);
421  }
422  return reader_count > 1 || str_list.size() > 1;
423 }
424 
425 
427  const TParamTree* params)
428 {
429  vector<string> str_list;
430  NStr::Split(str, ";", str_list);
431  for ( size_t i = 0; i < str_list.size(); ++i ) {
433  NCBI_THROW(CObjMgrException, eRegisterError,
434  "HUP GBLoader cannot have cache");
435  }
436  CRef<CWriter> writer(x_CreateWriter(str_list[i], params));
437  if( writer ) {
438  m_Dispatcher->InsertWriter(i, writer);
439  }
440  }
441 }
442 
443 
444 #ifdef REGISTER_READER_ENTRY_POINTS
445 NCBI_PARAM_DECL(bool, GENBANK, REGISTER_READERS);
446 NCBI_PARAM_DEF_EX(bool, GENBANK, REGISTER_READERS, true,
447  eParam_NoThread, GENBANK_REGISTER_READERS);
448 #endif
449 
451 {
453  _ASSERT(manager);
454 
455 #ifdef REGISTER_READER_ENTRY_POINTS
456  if ( NCBI_PARAM_TYPE(GENBANK, REGISTER_READERS)::GetDefault() ) {
460 # ifdef HAVE_PUBSEQ_OS
461  //GenBankReaders_Register_Pubseq();
462 # endif
463  }
464 #endif
465 
466  return manager;
467 }
468 
469 
471 {
473  _ASSERT(manager);
474 
475 #ifdef REGISTER_READER_ENTRY_POINTS
476  if ( NCBI_PARAM_TYPE(GENBANK, REGISTER_READERS)::GetDefault() ) {
478  }
479 #endif
480 
481  return manager;
482 }
483 
484 
485 static bool s_ForceDriver(const string& name)
486 {
487  return !name.empty() && name[name.size()-1] != ':';
488 }
489 
490 
492  const CGBLoaderParams& gb_params,
493  const TParamTree* params)
494 {
496  CReader* ret = manager->CreateInstanceFromList(params, name);
497  if ( !ret ) {
498  if ( s_ForceDriver(name) ) {
499  // reader is required at this slot
500  NCBI_THROW(CLoaderException, eLoaderFailed,
501  "no reader available from "+name);
502  }
503  }
504  else {
505  CReaderParams reader_params;
506  reader_params.SetEnableWGS(gb_params.m_EnableWGS);
507  reader_params.SetEnableSNP(gb_params.m_EnableSNP);
508  reader_params.SetEnableCDD(gb_params.m_EnableCDD);
509  ret->SetParams(reader_params);
510  ret->InitializeCache(m_CacheManager, params);
511  }
512  return ret;
513 }
514 
515 
517  const TParamTree* params)
518 {
520  CWriter* ret = manager->CreateInstanceFromList(params, name);
521  if ( !ret ) {
522  if ( s_ForceDriver(name) ) {
523  // writer is required at this slot
524  NCBI_THROW(CLoaderException, eLoaderFailed,
525  "no writer available from "+name);
526  }
527  }
528  else {
529  ret->InitializeCache(m_CacheManager, params);
530  }
531  return ret;
532 }
533 
534 
536 {
537  if ( CReadDispatcher::CannotProcess(sih) ) {
538  return TBlobId();
539  }
540  CGBReaderRequestResult result(this, sih);
541  CLoadLockBlobIds blobs(result, sih, 0);
543  CFixedBlob_ids blob_ids = blobs.GetBlob_ids();
544  ITERATE ( CFixedBlob_ids, it, blob_ids ) {
545  if ( it->Matches(fBlobHasCore, 0) ) {
546  return TBlobId(it->GetBlob_id().GetPointer());
547  }
548  }
549  return TBlobId();
550 }
551 
553 {
555 }
556 
557 
559 {
560  if ( CReadDispatcher::CannotProcess(idh) ) {
561  return;
562  }
563  CGBReaderRequestResult result(this, idh);
564  CLoadLockSeqIds lock(result, idh);
565  if ( !lock.IsLoaded() ) {
567  }
568  ids = lock.GetSeq_ids();
569 }
570 
571 
574 {
575  SAccVerFound ret;
576  if ( CReadDispatcher::CannotProcess(idh) ) {
577  // no such sequence
578  return ret;
579  }
580  CGBReaderRequestResult result(this, idh);
581  CLoadLockAcc lock(result, idh);
582  if ( !lock.IsLoadedAccVer() ) {
584  }
585  if ( lock.IsLoadedAccVer() ) {
586  ret = lock.GetAccVer();
587  }
588  return ret;
589 }
590 
591 
594 {
595  SGiFound ret;
596  if ( CReadDispatcher::CannotProcess(idh) ) {
597  return ret;
598  }
599  CGBReaderRequestResult result(this, idh);
600  CLoadLockGi lock(result, idh);
601  if ( !lock.IsLoadedGi() ) {
603  }
604  if ( lock.IsLoadedGi() ) {
605  ret = lock.GetGi();
606  }
607  return ret;
608 }
609 
610 
612 {
613  if ( CReadDispatcher::CannotProcess(idh) ) {
614  return string();
615  }
616  CGBReaderRequestResult result(this, idh);
617  CLoadLockLabel lock(result, idh);
618  if ( !lock.IsLoadedLabel() ) {
620  }
621  return lock.GetLabel();
622 }
623 
624 
626 {
627  if ( CReadDispatcher::CannotProcess(idh) ) {
628  return INVALID_TAX_ID;
629  }
630  CGBReaderRequestResult result(this, idh);
631  CLoadLockTaxId lock(result, idh);
632  if ( !lock.IsLoadedTaxId() ) {
634  }
635  TTaxId taxid = lock.IsLoadedTaxId()? lock.GetTaxId(): INVALID_TAX_ID;
636  if ( taxid == INVALID_TAX_ID ) {
637  return CDataLoader::GetTaxId(idh);
638  }
639  return taxid;
640 }
641 
642 
644 {
645  const int kNotFound = (CBioseq_Handle::fState_not_found |
647 
648  if ( CReadDispatcher::CannotProcess(sih) ) {
649  return kNotFound;
650  }
651  TIds ids(1, sih);
652  TLoaded loaded(1);
653  TSequenceStates states(1);
654  GetSequenceStates(ids, loaded, states);
655  return loaded[0]? states[0]: kNotFound;
656 }
657 
658 
659 void CGBDataLoader_Native::GetAccVers(const TIds& ids, TLoaded& loaded, TIds& ret)
660 {
661  for ( size_t i = 0; i < ids.size(); ++i ) {
662  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
663  continue;
664  }
665  CGBReaderRequestResult result(this, ids[i]);
666  m_Dispatcher->LoadAccVers(result, ids, loaded, ret);
667  return;
668  }
669 }
670 
671 
672 void CGBDataLoader_Native::GetGis(const TIds& ids, TLoaded& loaded, TGis& ret)
673 {
674  for ( size_t i = 0; i < ids.size(); ++i ) {
675  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
676  continue;
677  }
678  CGBReaderRequestResult result(this, ids[i]);
679  m_Dispatcher->LoadGis(result, ids, loaded, ret);
680  return;
681  }
682 }
683 
684 
685 void CGBDataLoader_Native::GetLabels(const TIds& ids, TLoaded& loaded, TLabels& ret)
686 {
687  for ( size_t i = 0; i < ids.size(); ++i ) {
688  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
689  continue;
690  }
691  CGBReaderRequestResult result(this, ids[i]);
692  m_Dispatcher->LoadLabels(result, ids, loaded, ret);
693  return;
694  }
695 }
696 
697 
698 void CGBDataLoader_Native::GetTaxIds(const TIds& ids, TLoaded& loaded, TTaxIds& ret)
699 {
700  for ( size_t i = 0; i < ids.size(); ++i ) {
701  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
702  continue;
703  }
704  CGBReaderRequestResult result(this, ids[i]);
705  m_Dispatcher->LoadTaxIds(result, ids, loaded, ret);
706 
707  // the ID2 may accidentally return no taxid for newly loaded sequences
708  // we have to fall back to full sequence retrieval in such cases
709  bool retry = false;
710  for ( size_t i = 0; i < ids.size(); ++i ) {
711  if ( loaded[i] && ret[i] == INVALID_TAX_ID ) {
712  loaded[i] = false;
713  retry = true;
714  }
715  }
716  if ( retry ) {
717  // full sequence retrieval is implemented in base CDataLoader class
718  CDataLoader::GetTaxIds(ids, loaded, ret);
719  }
720 
721  return;
722  }
723 }
724 
725 
726 static const bool s_LoadBulkBlobs = true;
727 
728 
730 {
731  if ( CReadDispatcher::CannotProcess(sih) ) {
732  return kInvalidSeqPos;
733  }
734  CGBReaderRequestResult result(this, sih);
735  CLoadLockLength lock(result, sih);
736  if ( !lock.IsLoadedLength() ) {
738  }
739  return lock.IsLoaded()? lock.GetLength(): 0;
740 }
741 
742 
744  TSequenceLengths& ret)
745 {
746  for ( size_t i = 0; i < ids.size(); ++i ) {
747  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
748  continue;
749  }
750  CGBReaderRequestResult result(this, ids[i]);
751  m_Dispatcher->LoadLengths(result, ids, loaded, ret);
752  return;
753  }
754 }
755 
756 
759 {
760  STypeFound ret;
761  if ( CReadDispatcher::CannotProcess(sih) ) {
762  return ret;
763  }
764  CGBReaderRequestResult result(this, sih);
765  CLoadLockType lock(result, sih);
766  if ( !lock.IsLoadedType() ) {
768  }
769  if ( lock.IsLoadedType() ) {
770  ret = lock.GetType();
771  }
772  return ret;
773 }
774 
775 
777  TSequenceTypes& ret)
778 {
779  for ( size_t i = 0; i < ids.size(); ++i ) {
780  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
781  continue;
782  }
783  CGBReaderRequestResult result(this, ids[i]);
784  m_Dispatcher->LoadTypes(result, ids, loaded, ret);
785  return;
786  }
787 }
788 
789 
791  TSequenceStates& ret)
792 {
793  if ( !s_LoadBulkBlobs ) {
794  CDataLoader::GetSequenceStates(ids, loaded, ret);
795  return;
796  }
797  for ( size_t i = 0; i < ids.size(); ++i ) {
798  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
799  continue;
800  }
801  CGBReaderRequestResult result(this, ids[i]);
802  m_Dispatcher->LoadStates(result, ids, loaded, ret);
803  return;
804  }
805  /*
806  set<CSeq_id_Handle> load_set;
807  size_t count = ids.size();
808  _ASSERT(ids.size() == loaded.size());
809  _ASSERT(ids.size() == ret.size());
810  CGBReaderRequestResult result(this, ids[0]);
811  for ( size_t i = 0; i < count; ++i ) {
812  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
813  continue;
814  }
815  CLoadLockBlobIds blobs(result, ids[i], 0);
816  if ( blobs.IsLoaded() ) {
817  continue;
818  }
819  // add into loading set
820  load_set.insert(ids[i]);
821  }
822  if ( !load_set.empty() ) {
823  result.SetRequestedId(*load_set.begin());
824  m_Dispatcher->LoadSeq_idsBlob_ids(result, load_set);
825  }
826  // update sequence states
827  for ( size_t i = 0; i < count; ++i ) {
828  CReadDispatcher::SetBlobState(i, result, ids, loaded, ret);
829  }
830  */
831 }
832 
833 
836 {
837  SHashFound ret;
838  if ( CReadDispatcher::CannotProcess(sih) ) {
839  return ret;
840  }
841  CGBReaderRequestResult result(this, sih);
842  CLoadLockHash lock(result, sih);
843  if ( !lock.IsLoadedHash() ) {
845  }
846  if ( lock.IsLoadedHash() ) {
847  ret = lock.GetHash();
848  }
849  return ret;
850 }
851 
852 
854  TSequenceHashes& ret, THashKnown& known)
855 {
856  for ( size_t i = 0; i < ids.size(); ++i ) {
857  if ( loaded[i] || CReadDispatcher::CannotProcess(ids[i]) ) {
858  continue;
859  }
860  CGBReaderRequestResult result(this, ids[i]);
861  m_Dispatcher->LoadHashes(result, ids, loaded, ret, known);
862  return;
863  }
864 }
865 
866 
868 {
869  TRealBlobId blob_id = GetRealBlobId(id);
871  CLoadLockBlobVersion lock(result, blob_id);
872  if ( !lock.IsLoadedBlobVersion() ) {
874  }
875  return lock.GetBlobVersion();
876 }
877 
878 
881  const TTSE_LockSet& tse_set)
882 {
883  TTSE_Lock best;
884  bool conflict=false;
885 
886  CGBReaderRequestResult result(this, handle);
887 
888  ITERATE(TTSE_LockSet, sit, tse_set) {
889  const CTSE_Info& tse = **sit;
890  TRealBlobId rbid = GetRealBlobId(tse);
891  CLoadLockBlob blob(result, GetRealBlobId(tse));
892  _ASSERT(blob);
893 
894  /*
895  if ( tse.m_SeqIds.find(handle) == tse->m_SeqIds.end() ) {
896  continue;
897  }
898  */
899 
900  // listed for given TSE
901  if ( !best ) {
902  best = *sit; conflict=false;
903  }
904  else if( !tse.IsDead() && best->IsDead() ) {
905  best = *sit; conflict=false;
906  }
907  else if( tse.IsDead() && best->IsDead() ) {
908  conflict=true;
909  }
910  else if( tse.IsDead() && !best->IsDead() ) {
911  }
912  else {
913  conflict=true;
914  //_ASSERT(tse.IsDead() || best->IsDead());
915  }
916  }
917 
918 /*
919  if ( !best || conflict ) {
920  // try harder
921  best.Reset();
922  conflict=false;
923 
924  CReaderRequestResultBlob_ids blobs = result.GetResultBlob_ids(handle);
925  _ASSERT(blobs);
926 
927  ITERATE ( CLoadInfoBlob_ids, it, *blobs ) {
928  TBlob_InfoMap::iterator tsep =
929  m_Blob_InfoMap.find((*srp)->GetKeyByTSE());
930  if (tsep == m_Blob_InfoMap.end()) continue;
931  ITERATE(TTSE_LockSet, sit, tse_set) {
932  CConstRef<CTSE_Info> ti = *sit;
933  //TTse2TSEinfo::iterator it =
934  // m_Tse2TseInfo.find(&ti->GetSeq_entry());
935  //if(it==m_Tse2TseInfo.end()) continue;
936  CRef<STSEinfo> tinfo = GetTSEinfo(*ti);
937  if ( !tinfo )
938  continue;
939 
940  if(tinfo==tsep->second) {
941  if ( !best )
942  best=ti;
943  else if (ti != best)
944  conflict=true;
945  }
946  }
947  }
948  if(conflict)
949  best.Reset();
950  }
951 */
952  if ( !best || conflict ) {
953  _TRACE("CGBDataLoader::ResolveConflict("<<handle.AsString()<<"): "
954  "conflict");
955  }
956  return best;
957 }
958 
959 
961 {
963  if ((it->m_Type & cache_type) != 0) {
964  return true;
965  }
966  }
967  return false;
968 }
969 
970 
972  time_t access_timeout)
973 {
975  if ((it->m_Type & cache_type) != 0) {
976  it->m_Cache->Purge(access_timeout);
977  }
978  }
979 }
980 
981 
983 {
984  // Reset cache for each reader/writer
986  m_CacheManager.GetCaches().clear();
987 }
988 
989 
990 //=======================================================================
991 // GBLoader private interface
992 //
994 {
995 }
996 
997 
999 {
1000  switch(choice) {
1003  // whole bioseq
1004  return fBlobHasAllLocal;
1007  // everything except bioseqs & annotations
1008  return fBlobHasCore;
1010  // seq data
1013  // SeqFeatures
1014  return fBlobHasIntFeat;
1016  // SeqGraph
1017  return fBlobHasIntGraph;
1019  // SeqGraph
1020  return fBlobHasIntAlign;
1022  // all internal annotations
1023  return fBlobHasIntAnnot;
1031  // external annotations
1034  // orphan annotations
1035  return fBlobHasOrphanAnnot;
1037  // everything
1038  return fBlobHasAll;
1039  default:
1040  return 0;
1041  }
1042 }
1043 
1044 
1047 {
1048  TBlobContentsMask mask = 0;
1049  if ( details.m_NeedSeqMap.NotEmpty() ) {
1050  mask |= fBlobHasSeqMap;
1051  }
1052  if ( details.m_NeedSeqData.NotEmpty() ) {
1053  mask |= fBlobHasSeqData;
1054  }
1056  TBlobContentsMask annots = 0;
1057  switch ( DetailsToChoice(details.m_NeedAnnots) ) {
1058  case eFeatures:
1059  annots |= fBlobHasIntFeat;
1060  break;
1061  case eAlign:
1062  annots |= fBlobHasIntAlign;
1063  break;
1064  case eGraph:
1065  annots |= fBlobHasIntGraph;
1066  break;
1067  case eAnnot:
1068  annots |= fBlobHasIntAnnot;
1069  break;
1070  default:
1071  break;
1072  }
1074  mask |= annots;
1075  }
1077  mask |= (annots << 1);
1078  }
1080  mask |= (annots << 2);
1081  }
1082  }
1083  return mask;
1084 }
1085 
1086 
1089 {
1090  return x_GetRecords(sih, x_MakeContentMask(choice), 0);
1091 }
1092 
1093 
1096  const SRequestDetails& details)
1097 {
1098  return x_GetRecords(sih, x_MakeContentMask(details), 0);
1099 }
1100 
1101 
1103 {
1104  return true;
1105 }
1106 
1107 
1110 {
1111  TRealBlobId blob_id = GetRealBlobId(id);
1112 
1114  CLoadLockBlob blob(result, blob_id);
1115  if ( !blob.IsLoadedBlob() ) {
1116  m_Dispatcher->LoadBlob(result, blob_id);
1117  }
1118  _ASSERT(blob.IsLoadedBlob());
1119  return blob.GetTSE_LoadLock();
1120 }
1121 
1122 
1123 namespace {
1124  struct SBetterId
1125  {
1126  int GetScore(const CSeq_id_Handle& id1) const
1127  {
1128  if ( id1.IsGi() ) {
1129  return 100;
1130  }
1131  if ( !id1 ) {
1132  return -1;
1133  }
1134  CConstRef<CSeq_id> seq_id = id1.GetSeqId();
1135  const CTextseq_id* text_id = seq_id->GetTextseq_Id();
1136  if ( text_id ) {
1137  int score;
1138  if ( text_id->IsSetAccession() ) {
1139  if ( text_id->IsSetVersion() ) {
1140  score = 99;
1141  }
1142  else {
1143  score = 50;
1144  }
1145  }
1146  else {
1147  score = 0;
1148  }
1149  return score;
1150  }
1151  if ( seq_id->IsGeneral() ) {
1152  return 10;
1153  }
1154  if ( seq_id->IsLocal() ) {
1155  return 0;
1156  }
1157  return 1;
1158  }
1159  bool operator()(const CSeq_id_Handle& id1,
1160  const CSeq_id_Handle& id2) const
1161  {
1162  int score1 = GetScore(id1);
1163  int score2 = GetScore(id2);
1164  if ( score1 != score2 ) {
1165  return score1 > score2;
1166  }
1167  return id1 < id2;
1168  }
1169  };
1170 }
1171 
1172 
1175 {
1176  TTSE_LockSet ret;
1177  TIds ids = bioseq.GetId();
1178  sort(ids.begin(), ids.end(), SBetterId());
1179  ITERATE ( TIds, it, ids ) {
1180  if ( GetBlobId(*it) ) {
1181  // correct id is found
1182  TTSE_LockSet ret2 = GetRecords(*it, eExtAnnot);
1183  ret.swap(ret2);
1184  break;
1185  }
1186  else if ( it->Which() == CSeq_id::e_Gi ) {
1187  // gi is not found, do not try any other Seq-id
1188  break;
1189  }
1190  }
1191  return ret;
1192 }
1193 
1194 
1197  const SAnnotSelector* sel,
1198  TProcessedNAs* processed_nas)
1199 {
1200  return x_GetRecords(idh, fBlobHasExtAnnot|fBlobHasNamedAnnot, sel, processed_nas);
1201 }
1202 
1203 
1206  const SAnnotSelector* sel,
1207  TProcessedNAs* processed_nas)
1208 {
1209  TTSE_LockSet ret;
1210  TIds ids = bioseq.GetId();
1211  sort(ids.begin(), ids.end(), SBetterId());
1212  ITERATE ( TIds, it, ids ) {
1213  if ( GetBlobId(*it) ) {
1214  // correct id is found
1215  TTSE_LockSet ret2 = GetExternalAnnotRecordsNA(*it, sel, processed_nas);
1216  ret.swap(ret2);
1217  break;
1218  }
1219  else if ( it->Which() == CSeq_id::e_Gi ) {
1220  // gi is not found, do not try any other Seq-id
1221  break;
1222  }
1223  }
1224  return ret;
1225 }
1226 
1227 
1230  const SAnnotSelector* sel,
1231  TProcessedNAs* processed_nas)
1232 {
1233  bool load_external = m_AlwaysLoadExternal;
1234  bool load_namedacc =
1236  if ( load_external || load_namedacc ) {
1237  TBlobContentsMask mask = 0;
1238  if ( load_external ) {
1240  }
1241  if ( load_namedacc ) {
1243  }
1244  return x_GetRecords(idh, mask, sel, processed_nas);
1245  }
1246  else {
1247  return CDataLoader::GetOrphanAnnotRecordsNA(idh, sel, processed_nas);
1248  }
1249 }
1250 
1251 
1255  const SAnnotSelector* sel,
1256  TProcessedNAs* processed_nas)
1257 {
1258  TTSE_LockSet locks;
1259 
1260  if ( mask == 0 || CReadDispatcher::CannotProcess(sih) ) {
1261  return locks;
1262  }
1263 
1264  if ( (mask & ~fBlobHasOrphanAnnot) == 0 ) {
1265  // no orphan annotations in GenBank
1266  return locks;
1267  }
1268 
1269  CGBReaderRequestResult result(this, sih);
1270  m_Dispatcher->LoadBlobs(result, sih, mask, sel);
1271  CLoadLockBlobIds blobs(result, sih, sel);
1272  if ( !blobs.IsLoaded() ) {
1273  return locks;
1274  }
1275  _ASSERT(blobs.IsLoaded());
1276 
1277  CFixedBlob_ids blob_ids = blobs.GetBlob_ids();
1278  if ( (blob_ids.GetState() & CBioseq_Handle::fState_no_data) != 0 ) {
1279  if ( (mask & fBlobHasAllLocal) == 0 ||
1280  blob_ids.GetState() == CBioseq_Handle::fState_no_data ) {
1281  // only external annotatsions are requested,
1282  // or default state - return empty lock set
1283  return locks;
1284  }
1285  NCBI_THROW2(CBlobStateException, eBlobStateError,
1286  "blob state error for "+sih.AsString(),
1287  blob_ids.GetState());
1288  }
1289 
1290  ITERATE ( CFixedBlob_ids, it, blob_ids ) {
1291  const CBlob_Info& info = *it;
1292  const CBlob_id& blob_id = *info.GetBlob_id();
1293  if ( info.Matches(mask, sel) ) {
1294  CLoadLockBlob blob(result, blob_id);
1295  if ( !blob.IsLoadedBlob() ) {
1296  continue;
1297  }
1298  CTSE_LoadLock& lock = blob.GetTSE_LoadLock();
1299  _ASSERT(lock);
1300  if ( lock->GetBlobState() & CBioseq_Handle::fState_no_data ) {
1301  NCBI_THROW2(CBlobStateException, eBlobStateError,
1302  "blob state error for "+blob_id.ToString(),
1303  lock->GetBlobState());
1304  }
1305  if ( processed_nas ) {
1306  if ( auto annot_info = info.GetAnnotInfo() ) {
1307  for ( auto& acc : annot_info->GetNamedAnnotNames() ) {
1308  CDataLoader::SetProcessedNA(acc, processed_nas);
1309  }
1310  }
1311  }
1312  locks.insert(lock);
1313  }
1314  }
1315  result.SaveLocksTo(locks);
1316  return locks;
1317 }
1318 
1319 
1322 {
1324 
1325  CGBReaderRequestResult result(this, sih);
1326  SAnnotSelector sel;
1327  sel.IncludeNamedAnnotAccession("NA*");
1328  CLoadLockBlobIds blobs(result, sih, &sel);
1329  m_Dispatcher->LoadSeq_idBlob_ids(result, sih, &sel);
1330  _ASSERT(blobs.IsLoaded());
1331 
1332  CFixedBlob_ids blob_ids = blobs.GetBlob_ids();
1333  if ( (blob_ids.GetState() & CBioseq_Handle::fState_no_data) != 0) {
1334  if ( blob_ids.GetState() == CBioseq_Handle::fState_no_data ) {
1335  // default state - return empty name set
1336  return names;
1337  }
1338  NCBI_THROW2(CBlobStateException, eBlobStateError,
1339  "blob state error for "+sih.AsString(),
1340  blob_ids.GetState());
1341  }
1342 
1343  ITERATE ( CFixedBlob_ids, it, blob_ids ) {
1344  const CBlob_Info& info = *it;
1345  if ( !info.IsSetAnnotInfo() ) {
1346  continue;
1347  }
1348  CConstRef<CBlob_Annot_Info> annot_info = info.GetAnnotInfo();
1350  annot_info->GetNamedAnnotNames()) {
1351  names.insert(*jt);
1352  }
1353  }
1354  return names;
1355 }
1356 
1357 
1360  const string& named_acc)
1361 {
1363 
1364  CGBReaderRequestResult result(this, sih);
1365  SAnnotSelector sel;
1366  if ( !ExtractZoomLevel(named_acc, 0, 0) ) {
1368  }
1369  else {
1370  sel.IncludeNamedAnnotAccession(named_acc);
1371  }
1372  CLoadLockBlobIds blobs(result, sih, &sel);
1373  m_Dispatcher->LoadSeq_idBlob_ids(result, sih, &sel);
1374  _ASSERT(blobs.IsLoaded());
1375 
1376  CFixedBlob_ids blob_ids = blobs.GetBlob_ids();
1377  if ( (blob_ids.GetState() & CBioseq_Handle::fState_no_data) != 0 ) {
1378  if ( blob_ids.GetState() == CBioseq_Handle::fState_no_data ) {
1379  // default state - return empty name set
1380  return names;
1381  }
1382  NCBI_THROW2(CBlobStateException, eBlobStateError,
1383  "blob state error for "+sih.AsString(),
1384  blob_ids.GetState());
1385  }
1386 
1387  ITERATE ( CFixedBlob_ids, it, blob_ids ) {
1388  const CBlob_Info& info = *it;
1389  if ( !info.IsSetAnnotInfo() ) {
1390  continue;
1391  }
1392  CConstRef<CBlob_Annot_Info> annot_info = info.GetAnnotInfo();
1394  annot_info->GetNamedAnnotNames() ) {
1395  names.insert(*jt);
1396  }
1397  }
1398  return names;
1399 }
1400 
1401 
1403 {
1404  CReader::TChunkId id = chunk->GetChunkId();
1405  if ( id == kMasterWGS_ChunkId ) {
1406  CWGSMasterSupport::LoadWGSMaster(this, chunk);
1407  }
1408  else {
1411  GetRealBlobId(chunk->GetBlobId()),
1412  id);
1413  }
1414 }
1415 
1416 
1418 {
1419  typedef map<TBlobId, CReader::TChunkIds> TChunkIdMap;
1420  TChunkIdMap chunk_ids;
1421  ITERATE(TChunkSet, it, chunks) {
1422  CReader::TChunkId id = (*it)->GetChunkId();
1423  if ( id == kMasterWGS_ChunkId ) {
1425  }
1426  else {
1427  chunk_ids[(*it)->GetBlobId()].push_back(id);
1428  }
1429  }
1430  ITERATE(TChunkIdMap, it, chunk_ids) {
1433  GetRealBlobId(it->first),
1434  it->second);
1435  }
1436 }
1437 
1438 
1440 {
1444  ITERATE(TTSE_LockSets, tse_set, tse_sets) {
1445  const CSeq_id_Handle& id = tse_set->first;
1446  if ( CReadDispatcher::CannotProcess(id) ) {
1447  continue;
1448  }
1449  ids.push_back(id);
1450  }
1452 
1453  NON_CONST_ITERATE(TTSE_LockSets, tse_set, tse_sets) {
1454  const CSeq_id_Handle& id = tse_set->first;
1455  if ( CReadDispatcher::CannotProcess(id) ) {
1456  continue;
1457  }
1458  CLoadLockBlobIds blob_ids_lock(result, id, 0);
1459  CFixedBlob_ids blob_ids = blob_ids_lock.GetBlob_ids();
1460  ITERATE ( CFixedBlob_ids, it, blob_ids ) {
1461  const CBlob_Info& info = *it;
1462  const CBlob_id& blob_id = *info.GetBlob_id();
1463  if ( info.Matches(mask, 0) ) {
1464  CLoadLockBlob blob(result, blob_id);
1465  _ASSERT(blob.IsLoadedBlob());
1466  /*
1467  if ((blob.GetBlobState() & CBioseq_Handle::fState_no_data) != 0) {
1468  // Ignore bad blobs
1469  continue;
1470  }
1471  */
1472  tse_set->second.insert(blob.GetTSE_LoadLock());
1473  }
1474  }
1475  }
1476 }
1477 
1478 #if 0
1479 class CTimerGuard
1480 {
1481  CTimer *t;
1482  bool calibrating;
1483 public:
1484  CTimerGuard(CTimer& x)
1485  : t(&x), calibrating(x.NeedCalibration())
1486  {
1487  if ( calibrating ) {
1488  t->Start();
1489  }
1490  }
1491  ~CTimerGuard(void)
1492  {
1493  if ( calibrating ) {
1494  t->Stop();
1495  }
1496  }
1497 };
1498 #endif
1499 
1500 
1502 {
1503  //TWriteLockGuard guard(m_LoadMap_Lock);
1504  //m_LoadMapBlob.erase(GetBlob_id(*tse_info));
1505 }
1506 
1507 
1510  const CSeq_id_Handle& requested_id)
1511  : CReaderRequestResult(requested_id,
1512  loader->GetDispatcher(),
1513  loader->GetInfoManager()),
1514  m_Loader(loader)
1515 {
1516 }
1517 
1518 
1520 {
1521 }
1522 
1523 
1525 {
1526  return m_Loader;
1527 }
1528 
1529 
1531 {
1532  CGBDataLoader::TBlobId id(new TKeyBlob(blob_id));
1533  return GetLoader().GetDataSource()->GetTSE_LoadLock(id);
1534 }
1535 
1536 
1538 {
1539  CGBDataLoader::TBlobId id(new TKeyBlob(blob_id));
1541 }
1542 
1543 
1545  TLoadedBlob_ids& blob_ids) const
1546 {
1547  CDataSource::TLoadedBlob_ids blob_ids2;
1550  blob_ids2);
1551  ITERATE(CDataSource::TLoadedBlob_ids, id, blob_ids2) {
1552  blob_ids.push_back(m_Loader->GetRealBlobId(*id));
1553  }
1554 }
1555 
1556 
1559 {
1560  if ( type == GBL::eExpire_normal ) {
1561  return m_Loader->GetIdExpirationTimeout();
1562  }
1563  else {
1565  }
1566 }
1567 
1568 
1569 bool
1571 {
1572  return m_Loader->GetAddWGSMasterDescr();
1573 }
1574 
1575 
1577 {
1578  return m_Loader->GetPTISErrorAction();
1579 }
1580 
1581 
1582 /*
1583 bool CGBDataLoader::LessBlobId(const TBlobId& id1, const TBlobId& id2) const
1584 {
1585  const CBlob_id& bid1 = dynamic_cast<const CBlob_id&>(*id1);
1586  const CBlob_id& bid2 = dynamic_cast<const CBlob_id&>(*id2);
1587  return bid1 < bid2;
1588 }
1589 
1590 
1591 string CGBDataLoader::BlobIdToString(const TBlobId& id) const
1592 {
1593  const CBlob_id& bid = dynamic_cast<const CBlob_id&>(*id);
1594  return bid.ToString();
1595 }
1596 */
1597 
1599  ECacheType cache_type)
1600 {
1601  SReaderCacheInfo info(cache, cache_type);
1602  //!!! Make sure the cache is not registered yet!
1603  m_Caches.push_back(info);
1604 }
1605 
1606 
1608  const TCacheParams* params)
1609 {
1611  if ((it->m_Type & cache_type) == 0) {
1612  continue;
1613  }
1614  if ( it->m_Cache->SameCacheParams(params) ) {
1615  return it->m_Cache.get();
1616  }
1617  }
1618  return 0;
1619 }
1620 
1621 
1623 
1624 // ===========================================================================
1625 
1627 
ncbi::TMaskedQueryRegions mask
const TId & GetId(void) const
Blob state exceptions, used by GenBank loader.
const TNamedAnnotNames & GetNamedAnnotNames(void) const
static CBlob_id * CreateFromString(const string &str)
Definition: blob_id.cpp:84
string ToString(void) const
Get string representation of blob id.
Definition: blob_id.cpp:67
CTSE_LoadLock GetTSE_LoadLock(const TBlobId &blob_id)
CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TBlobId &blob_id)
vector< TBlobId > TLoadedBlob_ids
void GetLoadedBlob_ids(const CSeq_id_Handle &idh, TLoadedTypes types, TLoadedBlob_ids &blob_ids) const
TState GetState(void) const
TRegisterInfo GetRegisterInfo(void)
Definition: gbloader.hpp:454
virtual void GetChunk(TChunk chunk) override
Definition: gbnative.cpp:1402
virtual TTSE_LockSet GetRecords(const CSeq_id_Handle &idh, EChoice choice) override
Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call wi...
Definition: gbnative.cpp:1088
virtual void GetTaxIds(const TIds &ids, TLoaded &loader, TTaxIds &ret) override
Definition: gbnative.cpp:698
static CRef< TReaderManager > x_GetReaderManager(void)
Definition: gbnative.cpp:450
TBlobContentsMask x_MakeContentMask(EChoice choice) const
Definition: gbnative.cpp:998
CReader * x_CreateReader(const string &names, const CGBLoaderParams &gb_params, const TParamTree *params=0)
Definition: gbnative.cpp:491
CGBDataLoader_Native(const string &loader_name, const CGBLoaderParams &params)
Definition: gbnative.cpp:159
virtual void GetSequenceTypes(const TIds &ids, TLoaded &loader, TSequenceTypes &ret) override
Definition: gbnative.cpp:776
virtual TBlobVersion GetBlobVersion(const TBlobId &id) override
Definition: gbnative.cpp:867
virtual void GetSequenceHashes(const TIds &ids, TLoaded &loader, TSequenceHashes &ret, THashKnown &known) override
Definition: gbnative.cpp:853
virtual void GetAccVers(const TIds &ids, TLoaded &loader, TIds &ret) override
Definition: gbnative.cpp:659
virtual TTSE_LockSet GetExternalAnnotRecordsNA(const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas) override
Definition: gbnative.cpp:1196
virtual void GC(void) override
Definition: gbnative.cpp:993
virtual TTSE_LockSet GetDetailedRecords(const CSeq_id_Handle &idh, const SRequestDetails &details) override
Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call wi...
Definition: gbnative.cpp:1095
virtual void GetSequenceStates(const TIds &ids, TLoaded &loader, TSequenceStates &ret) override
Definition: gbnative.cpp:790
virtual void GetIds(const CSeq_id_Handle &idh, TIds &ids) override
Definition: gbnative.cpp:558
virtual void DropTSE(CRef< CTSE_Info > tse_info) override
Definition: gbnative.cpp:1501
virtual TTSE_Lock ResolveConflict(const CSeq_id_Handle &handle, const TTSE_LockSet &tse_set) override
Resolve TSE conflict *select the best TSE from the set of dead TSEs.
Definition: gbnative.cpp:880
virtual bool CanGetBlobById(void) const override
Definition: gbnative.cpp:1102
virtual TSeqPos GetSequenceLength(const CSeq_id_Handle &sih) override
Request for a length of a sequence.
Definition: gbnative.cpp:729
virtual void GetChunks(const TChunkSet &chunks) override
Definition: gbnative.cpp:1417
virtual TNamedAnnotNames GetNamedAnnotAccessions(const CSeq_id_Handle &idh) override
Definition: gbnative.cpp:1321
CRef< CGBInfoManager > m_InfoManager
Definition: gbnative.hpp:238
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const CGBLoaderParams &params, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
Definition: gbnative.cpp:147
void x_CreateDriver(const CGBLoaderParams &params)
Definition: gbnative.cpp:182
void PurgeCache(TCacheType cache_type, time_t access_timeout=0) override
Definition: gbnative.cpp:971
CInitMutexPool m_MutexPool
Definition: gbnative.hpp:235
CWriter * x_CreateWriter(const string &names, const TParamTree *params=0)
Definition: gbnative.cpp:516
static CRef< TWriterManager > x_GetWriterManager(void)
Definition: gbnative.cpp:470
virtual void GetGis(const TIds &ids, TLoaded &loader, TGis &ret) override
Definition: gbnative.cpp:672
void x_CreateWriters(const string &str, const TParamTree *params)
Definition: gbnative.cpp:426
virtual TTSE_LockSet GetOrphanAnnotRecordsNA(const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas) override
new Get*AnnotRecords() methods
Definition: gbnative.cpp:1229
virtual int GetSequenceState(const CSeq_id_Handle &idh) override
Request for a state of a sequence.
Definition: gbnative.cpp:643
CGBReaderCacheManager m_CacheManager
Definition: gbnative.hpp:241
TTSE_LockSet x_GetRecords(const CSeq_id_Handle &idh, TBlobContentsMask sr_mask, const SAnnotSelector *sel, TProcessedNAs *processed_nas=0)
Definition: gbnative.cpp:1253
virtual STypeFound GetSequenceTypeFound(const CSeq_id_Handle &sih) override
Definition: gbnative.cpp:758
virtual TTaxId GetTaxId(const CSeq_id_Handle &idh) override
Request for a taxonomy id of a sequence.
Definition: gbnative.cpp:625
CRef< CReadDispatcher > m_Dispatcher
Definition: gbnative.hpp:237
virtual SGiFound GetGiFound(const CSeq_id_Handle &idh) override
Definition: gbnative.cpp:593
virtual TBlobId GetBlobIdFromString(const string &str) const override
Definition: gbnative.cpp:552
void CloseCache(void) override
Definition: gbnative.cpp:982
virtual TTSE_LockSet GetExternalRecords(const CBioseq_Info &bioseq) override
Request from a datasource set of blobs with external annotations.
Definition: gbnative.cpp:1174
virtual ~CGBDataLoader_Native(void)
Definition: gbnative.cpp:168
virtual void GetLabels(const TIds &ids, TLoaded &loader, TLabels &ret) override
Definition: gbnative.cpp:685
virtual string GetLabel(const CSeq_id_Handle &idh) override
Request for a label string of a sequence.
Definition: gbnative.cpp:611
virtual void GetSequenceLengths(const TIds &ids, TLoaded &loader, TSequenceLengths &ret) override
Definition: gbnative.cpp:743
virtual SHashFound GetSequenceHashFound(const CSeq_id_Handle &idh) override
Definition: gbnative.cpp:835
virtual TTSE_Lock GetBlobById(const TBlobId &id) override
Definition: gbnative.cpp:1109
bool x_CreateReaders(const string &str, const TParamTree *params, const CGBLoaderParams &gb_params, CGBLoaderParams::EPreopenConnection preopen)
Definition: gbnative.cpp:397
virtual SAccVerFound GetAccVerFound(const CSeq_id_Handle &idh) override
Definition: gbnative.cpp:573
virtual TBlobId GetBlobId(const CSeq_id_Handle &idh) override
Definition: gbnative.cpp:535
virtual void GetBlobs(TTSE_LockSets &tse_sets) override
Definition: gbnative.cpp:1439
TRealBlobId x_GetRealBlobId(const TBlobId &blob_id) const override
Definition: gbnative.cpp:176
pair< string, string > GetReaderWriterName(const TParamTree *params, const CGBLoaderParams &loader_params) const
Definition: gbnative.cpp:355
bool HaveCache(TCacheType cache_type=fCache_Any) override
Definition: gbnative.cpp:960
Uint4 TExpirationTimeout
Definition: gbloader.hpp:380
bool m_AddWGSMasterDescr
Definition: gbloader.hpp:472
TExpirationTimeout m_IdExpirationTimeout
Definition: gbloader.hpp:468
TRealBlobId GetRealBlobId(const TBlobId &blob_id) const
Definition: gbloader.cpp:717
bool GetAddWGSMasterDescr(void) const
Definition: gbloader.hpp:407
bool m_AlwaysLoadExternal
Definition: gbloader.hpp:470
EGBErrorAction GetPTISErrorAction(void) const
Definition: gbloader.hpp:423
string m_WebCookie
Definition: gbloader.hpp:475
bool HasHUPIncluded(void) const
Definition: gbloader.hpp:417
static string x_GetLoaderMethod(const TParamTree *params)
Definition: gbloader.cpp:208
TExpirationTimeout GetIdExpirationTimeout(void) const
Definition: gbloader.hpp:381
static string GetParam(const TParamTree *params, const string &param_name)
Definition: gbloader.cpp:665
EGBErrorAction m_PTISErrorAction
Definition: gbloader.hpp:474
static TParamTree * GetLoaderParams(TParamTree *params)
Definition: gbloader.cpp:637
bool m_AlwaysLoadNamedAcc
Definition: gbloader.hpp:471
CReaderCacheManager::TCacheType TCacheType
Definition: gbloader.hpp:372
const string & GetLoaderMethod(void) const
Definition: gbloader.hpp:117
CReader * GetReaderPtr(void) const
Definition: gbloader.cpp:142
EPreopenConnection GetPreopenConnection(void) const
Definition: gbloader.hpp:153
const TParamTree * GetParamTree(void) const
Definition: gbloader.hpp:144
CNullable< bool > m_EnableCDD
Definition: gbloader.hpp:228
CNullable< bool > m_EnableSNP
Definition: gbloader.hpp:226
const string & GetWebCookie(void) const
Definition: gbloader.hpp:168
const string & GetWriterName(void) const
Definition: gbloader.hpp:135
CNullable< bool > m_EnableWGS
Definition: gbloader.hpp:227
const string & GetReaderName(void) const
Definition: gbloader.hpp:126
virtual ICache * FindCache(ECacheType cache_type, const TCacheParams *params)
Definition: gbnative.cpp:1607
virtual TCaches & GetCaches(void)
Definition: gbnative.hpp:104
virtual void RegisterCache(ICache &cache, ECacheType cache_type)
Definition: gbnative.cpp:1598
CReaderRequestResult TParent
Definition: gbnative.cpp:111
CInitMutexPool & GetMutexPool(void)
Definition: gbnative.cpp:132
virtual TExpirationTime GetIdExpirationTimeout(GBL::EExpirationType type) const override
Definition: gbnative.cpp:1558
virtual EGBErrorAction GetPTISErrorAction(void) const override
Definition: gbnative.cpp:1576
CGBDataLoader_Native & GetLoader(void)
Definition: gbnative.cpp:117
CRef< CGBDataLoader_Native > m_Loader
Definition: gbnative.cpp:143
virtual bool GetAddWGSMasterDescr(void) const override
Definition: gbnative.cpp:1570
virtual CTSE_LoadLock GetTSE_LoadLock(const TKeyBlob &blob_id) override
Definition: gbnative.cpp:1530
virtual CGBDataLoader_Native * GetLoaderPtr(void) override
Definition: gbnative.cpp:1524
virtual void GetLoadedBlob_ids(const CSeq_id_Handle &idh, TLoadedBlob_ids &blob_ids) const override
Definition: gbnative.cpp:1544
CGBReaderRequestResult(CGBDataLoader_Native *loader, const CSeq_id_Handle &requested_id)
Definition: gbnative.cpp:1509
virtual CTSE_LoadLock GetTSE_LoadLockIfLoaded(const TKeyBlob &blob_id) override
Definition: gbnative.cpp:1537
TData GetAccVer(void) const
bool IsLoadedAccVer(void) const
TData GetBlob_ids(void) const
bool IsLoadedBlobVersion(void) const
TData GetBlobVersion(void) const
bool IsLoadedBlob(void) const
CTSE_LoadLock & GetTSE_LoadLock(void)
bool IsLoadedGi(void) const
static TGi GetGi(const TData &data)
bool IsLoadedHash(void) const
static int GetHash(const TData &data)
bool IsLoadedLabel(void) const
TData GetLabel(void) const
TData GetLength(void) const
bool IsLoadedLength(void) const
TData GetSeq_ids(void) const
bool IsLoadedTaxId(void) const
TData GetTaxId(void) const
static CSeq_inst::TMol GetType(const TData &data)
bool IsLoadedType(void) const
Data loader exceptions, used by GenBank loader.
Base class for all object manager exceptions.
CObjectManager –.
void LoadStates(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TStates &ret)
void ResetCaches(void)
Definition: dispatcher.cpp:250
void LoadBlobSet(CReaderRequestResult &result, const TIds &seq_ids)
void LoadChunks(CReaderRequestResult &result, const TBlobId &blob_id, const TChunkIds &chunk_ids)
void LoadSeq_idLabel(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadGis(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TGis &ret)
void LoadBlobVersion(CReaderRequestResult &result, const TBlobId &blob_id, const CReader *asking_reader=0)
void InsertReader(TLevel level, CRef< CReader > reader)
Definition: dispatcher.cpp:173
void LoadLabels(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLabels &ret)
void LoadSeq_idGi(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void InsertWriter(TLevel level, CRef< CWriter > writer)
Definition: dispatcher.cpp:184
void LoadSequenceType(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadAccVers(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TIds &ret)
void LoadSequenceHash(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadLengths(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TLengths &ret)
void LoadTaxIds(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTaxIds &ret)
void LoadHashes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, THashes &ret, TKnown &known)
bool HasReaderWithHUPIncluded() const
Definition: dispatcher.cpp:239
void LoadTypes(CReaderRequestResult &result, const TIds &ids, TLoaded &loaded, TTypes &ret)
void LoadSeq_idTaxId(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSeq_idSeq_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
vector< CSeq_id_Handle > TIds
Definition: dispatcher.hpp:68
void LoadBlobs(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, TContentsMask mask, const SAnnotSelector *sel)
void LoadSeq_idAccVer(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSequenceLength(CReaderRequestResult &result, const CSeq_id_Handle &seq_id)
void LoadSeq_idBlob_ids(CReaderRequestResult &result, const CSeq_id_Handle &seq_id, const SAnnotSelector *sel)
void LoadChunk(CReaderRequestResult &result, const TBlobId &blob_id, TChunkId chunk_id)
void LoadBlob(CReaderRequestResult &result, const CBlob_id &blob_id)
static bool CannotProcess(const CSeq_id_Handle &sih)
Definition: dispatcher.cpp:261
vector< SReaderCacheInfo > TCaches
void SetEnableCDD(CNullable< bool > enable)
Definition: reader.hpp:68
void SetEnableWGS(CNullable< bool > enable)
Definition: reader.hpp:63
void SetEnableSNP(CNullable< bool > enable)
Definition: reader.hpp:58
virtual TExpirationTime GetIdExpirationTimeout(GBL::EExpirationType type) const
vector< CBlob_id > TLoadedBlob_ids
GBL::CInfo_Base::TExpirationTime TExpirationTime
void OpenInitialConnection(bool force)
Definition: reader.cpp:168
virtual void InitializeCache(CReaderCacheManager &cache_manager, const TPluginManagerParamTree *params)
Definition: reader.cpp:1317
virtual void SetIncludeHUP(bool include_hup=true, const string &web_cookie=NcbiEmptyString)
Definition: reader.cpp:1328
int TChunkId
Definition: reader.hpp:93
virtual void SetParams(const CReaderParams &params)
Definition: reader.cpp:1335
TBlobId GetBlobId(void) const
TChunkId GetChunkId(void) const
TBlobState GetBlobState(void) const
Definition: tse_info.hpp:834
bool IsDead(void) const
Definition: tse_info.hpp:855
definition of a Culling tree
Definition: ncbi_tree.hpp:100
static void LoadWGSMaster(CDataLoader *loader, CRef< CTSE_Chunk_Info > chunk)
Definition: wgsmaster.cpp:553
virtual void InitializeCache(CReaderCacheManager &cache_manager, const TPluginManagerParamTree *params)
Definition: writer.cpp:107
BLOB cache read/write/maintenance interface.
Definition: icache.hpp:64
Definition: map.hpp:338
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
void swap(this_type &m)
Definition: set.hpp:102
static const struct name_t names[]
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION
#define NCBI_GBLOADER_PARAM_ID_GC_SIZE
#define NCBI_GBLOADER_PARAM_ADD_WGS_MASTER
#define NCBI_GBLOADER_PARAM_PREOPEN
#define NCBI_GBLOADER_PARAM_READER_NAME
#define NCBI_GBLOADER_PARAM_ID_EXPIRATION_TIMEOUT
#define NCBI_GBLOADER_PARAM_WRITER_NAME
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION_REPORT
#define NCBI_GBLOADER_PARAM_ALWAYS_LOAD_NAMED_ACC
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION_IGNORE
#define NCBI_GBLOADER_PARAM_ALWAYS_LOAD_EXTERNAL
#define NCBI_GBLOADER_PARAM_PTIS_ERROR_ACTION_THROW
USING_SCOPE(objects)
static bool s_ForceDriver(const string &name)
Definition: gbnative.cpp:485
static const char *const DEFAULT_HUP_DRV_ORDER
Definition: gbnative.cpp:101
static const bool s_LoadBulkBlobs
Definition: gbnative.cpp:726
static const char *const DEFAULT_DRV_ORDER
Definition: gbnative.cpp:99
NCBI_PARAM_DECL(string, GENBANK, READER_NAME)
NCBI_PARAM_DEF_EX(string, GENBANK, READER_NAME, "", eParam_NoThread, GENBANK_READER_NAME)
#define DEFAULT_ID_GC_SIZE
Definition: gbnative.cpp:106
#define DEFAULT_ID_EXPIRATION_TIMEOUT
Definition: gbnative.cpp:107
typedef NCBI_PARAM_TYPE(GENBANK, READER_NAME) TGenbankReaderName
#define GBLOG_POST_X(err_subcode, x)
Definition: gbnative.hpp:86
static CNcbiApplicationGuard InstanceGuard(void)
Singleton method.
Definition: ncbiapp.cpp:133
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define INVALID_TAX_ID
Definition: ncbimisc.hpp:1116
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
SStrictId_Tax::TId TTaxId
Taxon id type.
Definition: ncbimisc.hpp:1048
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
Definition: ncbimisc.hpp:878
string
Definition: cgiapp.hpp:687
#define _TRACE(message)
Definition: ncbidbg.hpp:122
#define NCBI_RETHROW_FMT(prev_exception, exception_class, err_code, message)
The same as NCBI_RETHROW but with message processed as output to ostream.
Definition: ncbiexpt.hpp:745
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
#define NCBI_THROW2(exception_class, err_code, message, extra)
Throw exception with extra parameter.
Definition: ncbiexpt.hpp:1754
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
Definition: ncbiexpt.hpp:719
static TParamTree * ConvertRegToTree(const IRegistry &reg, NStr::ECase use_case=NStr::eNocase)
Reconstruct param tree from the application registry.
CConstRef< CSeq_id > GetSeqId(void) const
bool IsGi(void) const
string AsString(void) const
const CTextseq_id * GetTextseq_Id(void) const
Return embedded CTextseq_id, if any.
Definition: Seq_id.cpp:169
vector< TSeqPos > TSequenceLengths
virtual EChoice DetailsToChoice(const SRequestDetails::TAnnotSet &annots) const
vector< CSeq_id_Handle > TIds
virtual TTSE_LockSet GetOrphanAnnotRecordsNA(const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
new Get*AnnotRecords() methods
CBlobIdKey TBlobId
static void SetProcessedNA(const string &na, TProcessedNAs *processed_nas)
vector< bool > THashKnown
CDataSource * GetDataSource(void) const
Definition: data_loader.cpp:92
vector< TGi > TGis
virtual void GetTaxIds(const TIds &ids, TLoaded &loaded, TTaxIds &ret)
Bulk request for taxonomy ids of a set of sequences.
TRange m_NeedSeqData
Definition: data_loader.hpp:96
EChoice
main blob is blob with sequence all other blobs are external and contain external annotations
static bool IsRequestedAnyNA(const SAnnotSelector *sel)
vector< CSeq_inst::TMol > TSequenceTypes
virtual TTaxId GetTaxId(const CSeq_id_Handle &idh)
Request for a taxonomy id of a sequence.
EIsDefault
Flag defining if the data loader is included in the "default" group.
TAnnotSet m_NeedAnnots
Definition: data_loader.hpp:97
vector< bool > TLoaded
Bulk loading interface for a small pieces of information per id.
vector< string > TLabels
TAnnotBlobType m_AnnotBlobType
Definition: data_loader.hpp:98
static void RegisterInObjectManager(CObjectManager &om, CLoaderMaker_Base &loader_maker, CObjectManager::EIsDefault is_default, CObjectManager::TPriority priority)
Register the loader only if the name is not yet registered in the object manager.
Definition: data_loader.cpp:53
virtual void GetSequenceStates(const TIds &ids, TLoaded &loaded, TSequenceStates &ret)
Bulk request for states of a set of sequences.
vector< TTaxId > TTaxIds
vector< int > TSequenceStates
vector< int > TSequenceHashes
vector< TChunk > TChunkSet
@ eExtFeatures
external features
@ eExtAnnot
all external annotations
@ eExtAlign
external aligns
@ eAll
all blobs (main and external)
@ eSequence
seq data
@ eBlob
whole main
@ eOrphanAnnot
all external annotations if no Bioseq exists
@ eGraph
graph annotations from main blob
@ eCore
?only seq-entry core?
@ eAnnot
all annotations from main blob
@ eBioseq
main blob with complete bioseq
@ eAlign
aligns from main blob
@ eBioseqCore
main blob with bioseq core (no seqdata and annots)
@ eExtGraph
external graph annotations
@ eFeatures
features from main blob
string CombineWithZoomLevel(const string &acc, int zoom_level)
Combine accession string and zoom level into a string with separator.
SAnnotSelector & IncludeNamedAnnotAccession(const string &acc, int zoom_level=0)
bool ExtractZoomLevel(const string &full_name, string *acc_ptr, int *zoom_level_ptr)
Extract optional zoom level suffix from named annotation string.
@ eParam_NoThread
Do not use per-thread values.
Definition: ncbi_param.hpp:418
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
bool NotEmpty(void) const
Definition: range.hpp:152
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
static bool StringToBool(const CTempString str)
Convert string to bool.
Definition: ncbistr.cpp:2819
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
Definition: ncbistr.cpp:3457
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5411
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
Definition: ncbistr.cpp:642
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5352
static string & ToLower(string &str)
Convert string to lower case – string& version.
Definition: ncbistr.cpp:405
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
bool IsGeneral(void) const
Check if variant General is selected.
Definition: Seq_id_.hpp:877
bool IsLocal(void) const
Check if variant Local is selected.
Definition: Seq_id_.hpp:775
bool IsSetVersion(void) const
Check if a value has been assigned to Version data member.
@ e_Gi
GenInfo Integrated Database.
Definition: Seq_id_.hpp:106
Definition of all error codes used in objtools libraries.
EExpirationType
Definition: info_cache.hpp:78
@ eExpire_normal
Definition: info_cache.hpp:79
int i
static MDB_envinfo info
Definition: mdb_load.c:37
constexpr auto sort(_Init &&init)
EIPRangeType t
Definition: ncbi_localip.c:101
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Multi-threading – classes, functions, and features.
int TBlobContentsMask
Definition: blob_id.hpp:188
@ kMasterWGS_ChunkId
Definition: blob_id.hpp:134
EGBErrorAction
Definition: blob_id.hpp:191
@ eGBErrorAction_ignore
Definition: blob_id.hpp:192
@ eGBErrorAction_report
Definition: blob_id.hpp:193
@ eGBErrorAction_throw
Definition: blob_id.hpp:194
@ fBlobHasSeqData
Definition: blob_id.hpp:144
@ fBlobHasNamedFeat
Definition: blob_id.hpp:154
@ fBlobHasNamedAnnot
Definition: blob_id.hpp:164
@ fBlobHasCore
Definition: blob_id.hpp:141
@ fBlobHasExtGraph
Definition: blob_id.hpp:152
@ fBlobHasIntAnnot
Definition: blob_id.hpp:158
@ fBlobHasAll
Definition: blob_id.hpp:186
@ fBlobHasExtFeat
Definition: blob_id.hpp:146
@ fBlobHasOrphanAnnot
Definition: blob_id.hpp:167
@ fBlobHasExtAnnot
Definition: blob_id.hpp:161
@ fBlobHasIntAlign
Definition: blob_id.hpp:148
@ fBlobHasIntFeat
Definition: blob_id.hpp:145
@ fBlobHasAllLocal
Definition: blob_id.hpp:182
@ fBlobHasNamedAlign
Definition: blob_id.hpp:155
@ fBlobHasIntGraph
Definition: blob_id.hpp:151
@ fBlobHasSeqMap
Definition: blob_id.hpp:143
@ fBlobHasExtAlign
Definition: blob_id.hpp:149
@ fBlobHasNamedGraph
Definition: blob_id.hpp:156
Helper classes and templates to implement plugins.
void GenBankReaders_Register_Cache(void)
void GenBankWriters_Register_Cache(void)
void GenBankReaders_Register_Id1(void)
Definition: reader_id1.cpp:792
void GenBankReaders_Register_Id2(void)
Definition: reader_id2.cpp:416
CRef< objects::CObjectManager > om
static const char * str(char *buf, int n)
Definition: stats.c:84
Better replacement of GetAccVer(), this method should be defined in data loaders, GetAccVer() is left...
Better replacement of GetGi(), this method should be defined in data loaders, GetGi() is left for com...
Better replacement of GetSequenceHash(), this method should be defined in data loaders,...
Better replacement of GetSequenceType(), this method should be defined in data loaders,...
SAnnotSelector –.
SRegisterLoaderInfo –.
Definition: type.c:6
#define _ASSERT
else result
Definition: token2.c:20
Modified on Thu Nov 30 04:54:44 2023 by modify_doxy.py rev. 669887