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

Go to the SVN repository for this file.

1 /* $Id: tse_chunk_info.cpp 96264 2022-03-04 17:44:38Z 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: Eugene Vasilchenko
27 *
28 * File Description:
29 * Split TSE chunk info
30 *
31 */
32 
33 
34 #include <ncbi_pch.hpp>
38 #include <objmgr/impl/tse_info.hpp>
47 #include <objmgr/seq_map.hpp>
48 #include <algorithm>
49 #include <objmgr/error_codes.hpp>
50 
51 #define NCBI_USE_ERRCODE_X ObjMgr_ObjSplitInfo
52 
54 
56 
58 
59 class CTSE_Chunk_Info;
60 
61 /////////////////////////////////////////////////////////////////////////////
62 // CTSE_Chunk_Info
63 /////////////////////////////////////////////////////////////////////////////
64 
65 
67  : m_SplitInfo(0),
68  m_ChunkId(id),
69  m_LoadBytes(0),
70  m_LoadSeconds(0),
72 {
73 }
74 
75 
77 {
78 }
79 
80 
82 {
83  return m_SplitInfo != 0;
84 }
85 
86 
87 /////////////////////////////////////////////////////////////////////////////
88 // chunk identification getters
90 {
92  return m_SplitInfo->GetBlobId();
93 }
94 
95 
97 {
99  return m_SplitInfo->GetBlobVersion();
100 }
101 
102 
103 /////////////////////////////////////////////////////////////////////////////
104 // attach chunk to CTSE_Split_Info
106 {
107  _ASSERT(!x_Attached());
108  _ASSERT(!IsLoaded());
109  m_SplitInfo = &split_info;
110 
111  TChunkId chunk_id = GetChunkId();
112 
113  // register descrs places
114  ITERATE ( TDescInfos, it, m_DescInfos ) {
115  split_info.x_AddDescInfo(*it, chunk_id);
116  }
117 
118  // register assembly places
120  split_info.x_AddAssemblyInfo(*it, chunk_id);
121  }
122 
123  // register annots places
124  ITERATE ( TPlaces, it, m_AnnotPlaces ) {
125  split_info.x_AddAnnotPlace(*it, chunk_id);
126  }
127 
128  // register bioseq ids
129  {{
130  TBioseqIds(m_BioseqIds).swap(m_BioseqIds); // memory compaction
131  sort(m_BioseqIds.begin(), m_BioseqIds.end()); // sort for future lookups
132  set<CSeq_id_Handle> annot_ids;
133  ITERATE ( TAnnotContents, it, m_AnnotContents ) { // collect annot ids
134  ITERATE ( TAnnotTypes, tit, it->second ) {
135  ITERATE ( TLocationSet, lit, tit->second ) {
136  if ( !ContainsBioseq(lit->first) ) {
137  annot_ids.insert(lit->first);
138  }
139  }
140  }
141  }
142  split_info.x_SetContainedSeqIds(m_BioseqIds, annot_ids, chunk_id);
143  }}
144 
145  // register bioseqs places
147  split_info.x_AddBioseqPlace(*it, chunk_id);
148  }
149 
150  // register seq-data
151  split_info.x_AddSeq_data(m_Seq_data, *this);
152 
153  // index annots
154  split_info.x_UpdateAnnotIndex(*this);
155 }
156 
157 
158 // attach chunk to CTSE_Info
159 /*
160 void CTSE_Chunk_Info::x_TSEAttach(CTSE_Info& tse_info)
161 {
162  _ASSERT(x_Attached());
163 
164  TChunkId chunk_id = GetChunkId();
165 
166  // register descrs places
167  ITERATE ( TDescInfos, it, m_DescInfos ) {
168  m_SplitInfo->x_AddDescInfo(tse_info, *it, chunk_id);
169  }
170 
171  // register assembly places
172  ITERATE ( TAssemblyInfos, it, m_AssemblyInfos ) {
173  m_SplitInfo->x_AddAssemblyInfo(tse_info, *it, chunk_id);
174  }
175 
176  // register annots places
177  ITERATE ( TPlaces, it, m_AnnotPlaces ) {
178  m_SplitInfo->x_AddAnnotPlace(tse_info, *it, chunk_id);
179  }
180 
181  // register bioseqs places
182  ITERATE ( TBioseqPlaces, it, m_BioseqPlaces ) {
183  m_SplitInfo->x_AddBioseqPlace(tse_info, *it, chunk_id);
184  }
185 
186  // register seq-data
187  m_SplitInfo->x_AddSeq_data(tse_info, m_Seq_data, *this);
188 
189  if ( m_AnnotIndexEnabled ) {
190  x_UpdateAnnotIndex(tse_info);
191  }
192 }
193 */
194 
196 {
197  _ASSERT(x_Attached());
198 
199  if ( NotLoaded() ) {
200  TChunkId chunk_id = GetChunkId();
201 
202  // register descrs places
203  ITERATE ( TDescInfos, it, m_DescInfos ) {
204  lsnr.AddDescInfo(tse, *it, chunk_id);
205  }
206 
207  // register assembly places
209  lsnr.AddAssemblyInfo(tse, *it, chunk_id);
210  }
211 
212  // register annots places
213  ITERATE ( TPlaces, it, m_AnnotPlaces ) {
214  lsnr.AddAnnotPlace(tse, *it, chunk_id);
215  }
216 
217  // register bioseqs places
219  lsnr.AddBioseqPlace(tse, *it, chunk_id);
220  }
221 
222  // register seq-data
223  lsnr.AddSeq_data(tse, m_Seq_data, *this);
224  }
225 
226  x_UpdateAnnotIndex(tse);
227 }
228 
229 
230 
231 /////////////////////////////////////////////////////////////////////////////
232 // loading methods
233 
235 {
236  ids.insert(ids.end(), m_BioseqIds.begin(), m_BioseqIds.end());
237 }
238 
239 
241 {
242  return binary_search(m_BioseqIds.begin(), m_BioseqIds.end(), id);
243 }
244 
245 
246 bool CTSE_Chunk_Info::x_GetRecords(const CSeq_id_Handle& id, bool bioseq) const
247 {
248  if ( IsLoaded() ) {
249  return true;
250  }
251  if ( ContainsBioseq(id) ) {
252  // contains Bioseq -> always load
253  Load();
254  return true;
255  }
256  return false;
257 }
258 
259 
261 {
262  if ( IsLoaded() ) {
263  return 0;
264  }
266 }
267 
268 
269 void CTSE_Chunk_Info::Load(void) const
270 {
271  CTSE_Chunk_Info* chunk = const_cast<CTSE_Chunk_Info*>(this);
272  _ASSERT(x_Attached());
274  if ( init ) {
276  _ASSERT(IsLoaded());
277  }
278 }
279 
280 
282 {
283  if ( !obj ) {
284  obj = new CObject;
285  }
286  {{
288  if ( m_LoadListener ) {
289  m_LoadListener->Loaded(*this);
290  m_LoadListener = null;
291  }
292  m_LoadLock.Reset(obj);
293  }}
294 }
295 
296 
298 {
300  if ( listener ) {
301  if ( IsLoaded() ) {
302  listener->Loaded(*this);
303  }
304  else {
305  m_LoadListener = listener;
306  }
307  }
308  else {
309  m_LoadListener = null;
310  }
311 }
312 
313 
314 /////////////////////////////////////////////////////////////////////////////
315 // chunk content description
317  const TBioseqId& id)
318 {
319  x_AddDescInfo(TDescInfo(type_mask, TPlace(id, 0)));
320 }
321 
322 
324  TBioseq_setId id)
325 {
326  x_AddDescInfo(TDescInfo(type_mask, TPlace(CSeq_id_Handle(), id)));
327 }
328 
329 
331 {
332  m_DescInfos.push_back(info);
333  if ( m_SplitInfo ) {
335  }
336 }
337 
338 
340 {
341  m_AssemblyInfos.push_back(id);
342  if ( m_SplitInfo ) {
344  }
345 }
346 
347 
349 {
350  x_AddAnnotPlace(TPlace(id, 0));
351 }
352 
353 
355 {
357 }
358 
359 
361 {
362  m_AnnotPlaces.push_back(place);
363  if ( m_SplitInfo ) {
365  }
366 }
367 
368 
370 {
371  m_BioseqPlaces.push_back(id);
372  if ( m_SplitInfo ) {
374  }
375 }
376 
377 
379 {
380  _ASSERT(!x_Attached());
381  m_BioseqIds.push_back(id);
382 }
383 
384 
386 {
387  m_Seq_data.insert(m_Seq_data.end(), location.begin(), location.end());
388  if ( m_SplitInfo ) {
390  }
391 }
392 
393 
395  const SAnnotTypeSelector& annot_type,
396  const TLocationId& location_id,
397  const TLocationRange& location_range)
398 {
399  _ASSERT(!x_Attached());
400  TLocationSet& dst = m_AnnotContents[annot_name][annot_type];
401  dst.push_back(TLocation(location_id, location_range));
402 }
403 
404 
406  const SAnnotTypeSelector& annot_type,
407  const TLocationId& location_id)
408 {
409  _ASSERT(!x_Attached());
410  TLocationSet& dst = m_AnnotContents[annot_name][annot_type];
412  dst.push_back(location);
413 }
414 
415 
417  const SAnnotTypeSelector& annot_type,
418  const TLocationSet& location)
419 {
420  _ASSERT(!x_Attached());
421  TLocationSet& dst = m_AnnotContents[annot_name][annot_type];
422  dst.insert(dst.end(), location.begin(), location.end());
423 }
424 
425 
427 {
428  m_ExplicitFeatIds = true;
429 }
430 
431 
433  const TFeatIdIntList& ids)
434 {
435  m_ExplicitFeatIds = true;
436  TFeatIdIntList& dst = m_FeatIds[type].m_IntList;
437  dst.insert(dst.end(), ids.begin(), ids.end());
438 }
439 
440 
442  const TFeatIdIntList& ids)
443 {
444  m_ExplicitFeatIds = true;
445  TFeatIdIntList& dst = m_XrefIds[type].m_IntList;
446  dst.insert(dst.end(), ids.begin(), ids.end());
447 }
448 
449 
451  const TFeatIdStrList& ids)
452 {
453  m_ExplicitFeatIds = true;
454  TFeatIdStrList& dst = m_FeatIds[type].m_StrList;
455  dst.insert(dst.end(), ids.begin(), ids.end());
456 }
457 
458 
460  const TFeatIdStrList& ids)
461 {
462  m_ExplicitFeatIds = true;
463  TFeatIdStrList& dst = m_XrefIds[type].m_StrList;
464  dst.insert(dst.end(), ids.begin(), ids.end());
465 }
466 
467 
468 /////////////////////////////////////////////////////////////////////////////
469 // annot index maintainance
470 
472 {
474  if ( tse.HasDataSource() ) {
475  guard.Guard(tse.GetDataSource());
476  }
479 }
480 
481 
483 {
484  if ( !m_ObjectIndexList.empty() ) {
485  return;
486  }
487 
489  m_ObjectIndexList.push_back(TObjectIndex(it->first));
490  TObjectIndex& infos = m_ObjectIndexList.back();
491  _ASSERT(infos.GetName() == it->first);
492  ITERATE ( TAnnotTypes, tit, it->second ) {
493  infos.AddInfo(CAnnotObject_Info(*this, tit->first));
494  CAnnotObject_Info& info = infos.GetInfos().back();
495  _ASSERT(info.IsChunkStub() && &info.GetChunk_Info() == this);
496  _ASSERT(info.GetTypeSelector() == tit->first);
498  SAnnotObject_Index index;
499  index.m_AnnotObject_Info = &info;
500  size_t keys_begin = infos.GetKeys().size();
501  ITERATE ( TLocationSet, lit, tit->second ) {
502  key.m_Handle = lit->first;
503  key.m_Range = lit->second;
504  if ( key.m_Range.Empty() ) {
505  string name;
506  if ( it->first.IsNamed() ) {
507  name = " "+it->first.GetName();
508  }
509  ERR_POST_X(11, "Empty region in split-info on "<<
510  key.m_Handle<<name<<" "<<
511  GetSplitInfo().GetBlobId());
512  // do not believe empty range - it must be an error
513  key.m_Range = key.m_Range.GetWhole();
514  }
515  infos.AddMap(key, index);
516  }
517  size_t keys_end = infos.GetKeys().size();
518  if ( keys_begin+1 == keys_end &&
519  infos.GetKey(keys_begin).IsSingle() ) {
520  info.SetKey(infos.GetKey(keys_begin));
521  infos.RemoveLastMap();
522  }
523  else {
524  info.SetKeys(keys_begin, keys_end);
525  }
526  }
527  infos.PackKeys();
528  infos.SetIndexed();
529  }
530 }
531 
532 
533 static
536 {
537  if ( type == CSeqFeatData::e_not_set ) {
538  return !types.empty();
539  }
540  if ( types.find(SAnnotTypeSelector(type)) != types.end() ) {
541  return true;
542  }
545  for ( size_t index = range.first; index < range.second; ++index ) {
546  CSeqFeatData::ESubtype subtype =
548  if ( types.find(SAnnotTypeSelector(subtype)) != types.end() ) {
549  return true;
550  }
551  }
552  return false;
553 }
554 
555 
556 static
558  CSeqFeatData::ESubtype subtype)
559 {
560  if ( subtype == CSeqFeatData::eSubtype_any ) {
561  return !types.empty();
562  }
563  if ( types.find(SAnnotTypeSelector(subtype)) != types.end() ) {
564  return true;
565  }
567  if ( types.find(SAnnotTypeSelector(type)) != types.end() ) {
568  return true;
569  }
570  return false;
571 }
572 
573 
574 static
577 {
578  if ( type == CSeqFeatData::e_not_set ) {
579  return !types.empty();
580  }
581  if ( types.find(SAnnotTypeSelector(type)) != types.end() ) {
582  return true;
583  }
586  for ( size_t index = range.first; index < range.second; ++index ) {
587  CSeqFeatData::ESubtype subtype =
589  if ( types.find(SAnnotTypeSelector(subtype)) != types.end() ) {
590  return true;
591  }
592  }
593  return false;
594 }
595 
596 
597 static
599  CSeqFeatData::ESubtype subtype)
600 {
601  if ( subtype == CSeqFeatData::eSubtype_any ) {
602  return !types.empty();
603  }
604  if ( types.find(SAnnotTypeSelector(subtype)) != types.end() ) {
605  return true;
606  }
608  if ( types.find(SAnnotTypeSelector(type)) != types.end() ) {
609  return true;
610  }
611  return false;
612 }
613 
614 
616 {
618  if ( x_HasFeatType(it->second, type) ) {
619  return true;
620  }
621  }
622  return false;
623 }
624 
625 
627 {
629  if ( x_HasFeatType(it->second, subtype) ) {
630  return true;
631  }
632  }
633  return false;
634 }
635 
636 
638  EFeatIdType id_type) const
639 {
640  if ( !x_ContainsFeatType(type) ) {
641  return false;
642  }
643  if ( !m_ExplicitFeatIds ) {
644  return true;
645  }
646  return x_HasFeatIds(id_type == eFeatId_id? m_FeatIds: m_XrefIds, type);
647 }
648 
649 
651  EFeatIdType id_type) const
652 {
653  if ( !x_ContainsFeatType(subtype) ) {
654  return false;
655  }
656  if ( !m_ExplicitFeatIds ) {
657  return true;
658  }
659  return x_HasFeatIds(id_type == eFeatId_id? m_FeatIds: m_XrefIds, subtype);
660 }
661 
662 
664 {
666 
667  SAnnotObject_Index index;
669  CTSEAnnotObjectMapper mapper(tse, it->GetName());
670  ITERATE ( SAnnotObjectsIndex::TObjectInfos, info, it->GetInfos() ) {
671  index.m_AnnotObject_Info = const_cast<CAnnotObject_Info*>(&*info);
672  if ( info->HasSingleKey() ) {
673  mapper.Map(info->GetKey(), index);
674  }
675  else {
676  for ( size_t i = info->GetKeysBegin();
677  i < info->GetKeysEnd(); ++i ) {
678  mapper.Map(it->GetKey(i), index);
679  }
680  }
681  }
682  }
683 
684  if ( m_ExplicitFeatIds ) {
685  ITERATE ( TFeatIdsMap, it, m_FeatIds ) {
686  ITERATE ( TFeatIdIntList, it2, it->second.m_IntList ) {
687  tse.x_MapChunkByFeatId(*it2, it->first, GetChunkId(), eFeatId_id);
688  }
689  ITERATE ( TFeatIdStrList, it2, it->second.m_StrList ) {
690  tse.x_MapChunkByFeatId(*it2, it->first, GetChunkId(), eFeatId_id);
691  }
692  }
693  ITERATE ( TFeatIdsMap, it, m_XrefIds ) {
694  ITERATE ( TFeatIdIntList, it2, it->second.m_IntList ) {
695  tse.x_MapChunkByFeatId(*it2, it->first, GetChunkId(), eFeatId_xref);
696  }
697  ITERATE ( TFeatIdStrList, it2, it->second.m_StrList ) {
698  tse.x_MapChunkByFeatId(*it2, it->first, GetChunkId(), eFeatId_xref);
699  }
700  }
701  }
702  else {
704  ITERATE ( TAnnotTypes, it2, it->second ) {
705  const SAnnotTypeSelector& type = it2->first;
706  if ( type.GetAnnotType() == CSeq_annot::C_Data::e_Ftable ) {
708  }
709  }
710  }
711  }
712 }
713 
714 
716 {
717  m_ObjectIndexList.clear();
718 }
719 
720 
721 /////////////////////////////////////////////////////////////////////////////
722 // interface load methods
724  const CSeq_descr& descr)
725 {
726  _ASSERT(x_Attached());
727  _ASSERT(!IsLoaded());
728  m_SplitInfo->x_LoadDescr(place, descr);
729 }
730 
731 
733  const CSeq_annot& annot)
734 {
735  _ASSERT(x_Attached());
736  _ASSERT(!IsLoaded());
737  m_SplitInfo->x_LoadAnnot(place, annot, GetChunkId());
738 }
739 
740 
742  const CBioseq& bioseq)
743 {
744  _ASSERT(x_Attached());
745  _ASSERT(!IsLoaded());
746  list< CRef<CBioseq> > bioseqs;
747  bioseqs.push_back(Ref(const_cast<CBioseq*>(&bioseq)));
748  x_LoadBioseqs(place, bioseqs);
749 }
750 
751 
753  const list< CRef<CBioseq> >& bioseqs)
754 {
755  _ASSERT(x_Attached());
756  _ASSERT(!IsLoaded());
757  m_SplitInfo->x_LoadBioseqs(place, bioseqs, GetChunkId());
758 }
759 
760 
762  const TSequence& sequence)
763 {
764  _ASSERT(x_Attached());
765  _ASSERT(!IsLoaded());
766  m_SplitInfo->x_LoadSequence(place, pos, sequence);
767 }
768 
769 
771  const TAssembly& assembly)
772 {
773  _ASSERT(x_Attached());
774  _ASSERT(!IsLoaded());
775  m_SplitInfo->x_LoadAssembly(seq_id, assembly);
776 }
777 
778 
780  CTSE_SetObjectInfo* set_info)
781 {
782  _ASSERT(x_Attached());
783  _ASSERT(!IsLoaded());
784  m_SplitInfo->x_LoadSeq_entry(entry, set_info);
785 }
786 
787 
789 {
790  _ASSERT(x_Attached());
792 }
793 
794 
796 {
797  m_LoadBytes = bytes;
798 }
799 
800 
802 {
803  m_LoadSeconds = float(seconds);
804 }
805 
806 
807 pair<Uint4, double> CTSE_Chunk_Info::GetLoadCost() const
808 {
809  pair<Uint4, double> ret(GetLoadBytes(), GetLoadSeconds());
810  if ( !ret.first ) {
811  ret.first = m_SplitInfo->GetDataLoader().EstimateLoadBytes(*this);
812  }
813  if ( !ret.second ) {
814  ret.second = m_SplitInfo->GetDataLoader().EstimateLoadSeconds(*this, ret.first);
815  }
816  return ret;
817 }
818 
819 
User-defined methods of the data storage class.
@ eFeatId_id
@ eFeatId_xref
static CSeqFeatData::ESubtype GetSubtypeForIndex(size_t index)
pair< size_t, size_t > TIndexRange
static TIndexRange GetFeatTypeRange(CSeqFeatData::E_Choice type)
void Guard(CDataSource &ds)
void Reset()
Definition: mutex_pool.hpp:153
CObject –.
Definition: ncbiobj.hpp:180
static E_Choice GetTypeFromSubtype(ESubtype subtype)
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
Definition: Seq_entry.hpp:56
bool Map(const SAnnotObject_Key &key, const SAnnotObject_Index &index) const
Definition: tse_info.hpp:965
virtual void Loaded(CTSE_Chunk_Info &chunk)=0
bool x_GetRecords(const CSeq_id_Handle &id, bool bioseq) const
void x_InitObjectIndexList(void)
virtual ~CTSE_Chunk_Info(void)
TFeatIdsMap m_XrefIds
void x_UpdateAnnotIndex(CTSE_Info &tse)
void x_SplitAttach(CTSE_Split_Info &split_info)
CTSE_Chunk_Info(TChunkId id)
void x_AddXref_ids(const SAnnotTypeSelector &type, const TFeatIdIntList &ids)
vector< TDescInfo > TDescInfos
void x_TSEAttach(CTSE_Info &tse, ITSE_Assigner &tse_info)
pair< TBioseqId, TBioseq_setId > TPlace
void x_AddAnnotPlace(const TBioseqId &id)
void x_LoadBioseq(const TPlace &place, const CBioseq &bioseq)
TBlobId GetBlobId(void) const
void x_LoadAnnot(const TPlace &place, const CSeq_annot &annot)
vector< TAssemblyInfo > TAssemblyInfos
TFeatIdsMap m_FeatIds
void Load(void) const
CRef< CTSEChunkLoadListener > m_LoadListener
TObjectIndexList m_ObjectIndexList
void x_LoadBioseqs(const TPlace &place, const list< CRef< CBioseq > > &bioseqs)
void x_LoadAssembly(const TBioseqId &seq_id, const TAssembly &assembly)
list< TFeatIdStr > TFeatIdStrList
void x_AddDescInfo(TDescTypeMask type_mask, const TBioseqId &id)
Uint4 GetLoadBytes() const
list< CRef< CSeq_align > > TAssembly
CInitMutex< CObject > m_LoadLock
unsigned TDescTypeMask
CTSE_Split_Info * m_SplitInfo
pair< TDescTypeMask, TPlace > TDescInfo
void x_SetLoadSeconds(double seconds)
void x_AddUsedMemory(size_t size)
vector< TBioseqId > TBioseqIds
TDescInfos m_DescInfos
void x_UpdateAnnotIndexContents(CTSE_Info &tse)
void x_LoadSequence(const TPlace &place, TSeqPos pos, const TSequence &seq)
void SetLoaded(CObject *obj=0)
TBioseqPlaces m_BioseqPlaces
vector< TLocation > TLocationSet
TBioseqIds m_BioseqIds
void x_DropAnnotObjects(void)
list< TObjectIndex > TObjectIndexList
void x_AddBioseqPlace(TBioseq_setId id)
void x_LoadDescr(const TPlace &place, const CSeq_descr &descr)
void x_LoadSeq_entry(CSeq_entry &entry, CTSE_SetObjectInfo *set_info=0)
TAnnotContents m_AnnotContents
TLocationSet m_Seq_data
void x_AddAssemblyInfo(const TBioseqId &id)
TChunkId GetChunkId(void) const
double GetLoadSeconds() const
vector< TPlace > TPlaces
TAssemblyInfos m_AssemblyInfos
void SetLoadListener(CRef< CTSEChunkLoadListener > listener)
vector< TFeatIdInt > TFeatIdIntList
void x_AddAnnotType(const CAnnotName &annot_name, const SAnnotTypeSelector &annot_type, const TLocationId &location_id)
void GetBioseqsIds(TBioseqIds &ids) const
list< CRef< CSeq_literal > > TSequence
void x_SetLoadBytes(Uint4 bytes)
CInitGuard * GetLoadInitGuard(void)
void x_AddFeat_ids(void)
bool x_Attached(void) const
TBlobVersion GetBlobVersion(void) const
void x_AddSeq_data(const TLocationSet &location)
const CTSE_Split_Info & GetSplitInfo(void) const
pair< Uint4, double > GetLoadCost() const
pair< TLocationId, TLocationRange > TLocation
vector< TBioseq_setId > TBioseqPlaces
bool NotLoaded(void) const
SAnnotObjectsIndex TObjectIndex
bool ContainsBioseq(const CSeq_id_Handle &id) const
void x_AddBioseqId(const TBioseqId &id)
bool IsLoaded(void) const
bool x_ContainsFeatIds(CSeqFeatData::E_Choice type, EFeatIdType id_type) const
bool x_ContainsFeatType(CSeqFeatData::E_Choice type) const
void x_MapChunkByFeatType(CSeqFeatData::ESubtype subtype, TChunkId chunk_id)
Definition: tse_info.cpp:1816
CDataSource & GetDataSource(void) const
Definition: tse_info.hpp:805
void x_MapChunkByFeatId(TFeatIdInt id, CSeqFeatData::ESubtype subtype, TChunkId chunk_id, EFeatIdType type)
Definition: tse_info.cpp:1694
TAnnotLock & GetAnnotLock(void) const
Definition: tse_info.hpp:914
bool HasDataSource(void) const
Definition: tse_info.hpp:798
const CAnnotName & GetName(void) const
Definition: tse_info.hpp:893
void x_LoadBioseqs(const TPlace &place, const list< CRef< CBioseq > > &bioseqs, int chunk_id)
TBlobId GetBlobId(void) const
void x_AddAssemblyInfo(const TAssemblyInfo &info, TChunkId chunk_id)
void x_LoadDescr(const TPlace &place, const CSeq_descr &descr)
CInitMutexPool & GetMutexPool(void)
void x_AddSeq_data(const TLocationSet &location, CTSE_Chunk_Info &chunk)
TBlobVersion GetBlobVersion(void) const
void x_AddUsedMemory(size_t size)
void x_UpdateAnnotIndex(void)
void x_AddBioseqPlace(TBioseq_setId place_id, TChunkId chunk_id)
CDataLoader & GetDataLoader(void) const
void x_AddAnnotPlace(const TPlace &place, TChunkId chunk_id)
void x_LoadAssembly(const TBioseqId &seq_id, const TAssembly &assembly)
void x_LoadSequence(const TPlace &place, TSeqPos pos, const TSequence &sequence)
void x_LoadSeq_entry(CSeq_entry &entry, CTSE_SetObjectInfo *set_info=0)
void x_LoadAnnot(const TPlace &place, const CSeq_annot &annot, int chunk_id)
void x_AddDescInfo(const TDescInfo &info, TChunkId chunk_id)
void x_SetContainedSeqIds(const vector< TBioseqId > &seq_ids, const set< TBioseqId > &annot_ids, TChunkId chunk_id)
virtual void AddDescInfo(CTSE_Info &, const TDescInfo &info, TChunkId chunk_id)=0
virtual void AddAnnotPlace(CTSE_Info &, const TPlace &place, TChunkId chunk_id)=0
virtual void AddAssemblyInfo(CTSE_Info &, const TAssemblyInfo &info, TChunkId chunk_id)=0
virtual void AddSeq_data(CTSE_Info &, const TLocationSet &location, CTSE_Chunk_Info &chunk)=0
virtual void AddBioseqPlace(CTSE_Info &, TBioseq_setId place_id, TChunkId chunk_id)=0
iterator_bool insert(const value_type &val)
Definition: map.hpp:165
Definition: set.hpp:45
iterator_bool insert(const value_type &val)
Definition: set.hpp:149
#define false
Definition: bool.h:36
static void DLIST_NAME() init(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:40
static int type
Definition: getdata.c:31
static const struct type types[]
Definition: type.c:22
static const char location[]
Definition: config.c:97
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 ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
Definition: ncbidiag.hpp:550
virtual double EstimateLoadSeconds(const CTSE_Chunk_Info &chunk, Uint4 bytes) const
virtual Uint4 EstimateLoadBytes(const CTSE_Chunk_Info &chunk) const
virtual void GetChunk(TChunk chunk_info)
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:2015
CObject(void)
Constructor.
Definition: ncbiobj.cpp:738
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
static TThisType GetWhole(void)
Definition: range.hpp:272
#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
E_Choice
Choice variants.
@ e_not_set
No variant selected.
@ eEmptyGuard
Definition: guard.hpp:94
Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).
int i
static MDB_envinfo info
Definition: mdb_load.c:37
range(_Ty, _Ty) -> range< _Ty >
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
CAnnotObject_Info * m_AnnotObject_Info
bool IsSingle(void) const
void AddInfo(const CAnnotObject_Info &info)
TObjectInfos & GetInfos(void)
const SAnnotObject_Key & GetKey(size_t i) const
const CAnnotName & GetName(void) const
deque< CAnnotObject_Info > TObjectInfos
void AddMap(const SAnnotObject_Key &key, const SAnnotObject_Index &index)
const TObjectKeys & GetKeys(void) const
Definition: type.c:6
#define _ASSERT
NCBI_DEFINE_ERR_SUBCODE_X(11)
static bool x_HasFeatType(const CTSE_Chunk_Info::TAnnotTypes &types, CSeqFeatData::E_Choice type)
static bool x_HasFeatIds(const CTSE_Chunk_Info::TFeatIdsMap &types, CSeqFeatData::E_Choice type)
Modified on Wed Apr 17 13:10:17 2024 by modify_doxy.py rev. 669887