data_source.cpp
来自「ncbi源码」· C++ 代码 · 共 1,528 行 · 第 1/3 页
CPP
1,528 行
if ( sub_info.IsSet() && sub_info.GetSet().GetClass() == CBioseq_set::eClass_parts ) { switch (level) { case CBioseq_CI_Base::eLevel_Mains: // Skip parts continue; case CBioseq_CI_Base::eLevel_Parts: // Allow adding bioseqs from lower levels local_level = CBioseq_CI_Base::eLevel_All; break; default: break; } } x_CollectBioseqs(sub_info, bioseqs, filter, local_level); } }}void CDataSource::Prefetch(CPrefetchToken_Impl& token){#if !defined(NCBI_NO_THREADS) if (!m_PrefetchThread) { CFastMutexGuard guard(m_PrefetchLock); // Check againi if (!m_PrefetchThread) { m_PrefetchThread.Reset(new CPrefetchThread(*this)); m_PrefetchThread->Run(); } } _ASSERT(m_PrefetchThread); m_PrefetchThread->AddRequest(token);#endif}void CDataSource::DebugDump(CDebugDumpContext /*ddc*/, unsigned int /*depth*/) const{}END_SCOPE(objects)END_NCBI_SCOPE/** ---------------------------------------------------------------------------* $Log: data_source.cpp,v $* Revision 1000.4 2004/06/01 19:23:11 gouriano* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.133** Revision 1.133 2004/05/21 21:42:12 gorelenk* Added PCH ncbi_pch.hpp** Revision 1.132 2004/04/16 13:31:47 grichenk* Added data pre-fetching functions.** Revision 1.131 2004/03/31 17:08:07 vasilche* Implemented ConvertSeqToSet and ConvertSetToSeq.** Revision 1.130 2004/03/24 18:30:29 vasilche* Fixed edit API.* Every *_Info object has its own shallow copy of original object.** Revision 1.129 2004/03/16 15:47:27 vasilche* Added CBioseq_set_Handle and set of EditHandles** Revision 1.128 2004/02/25 19:23:46 shomrat* Use of entry_info instead of tse_info to allow collection of bioseqs on non-tse entries** Revision 1.127 2004/02/03 19:02:17 vasilche* Fixed broken 'dirty annot index' state after RemoveEntry().** Revision 1.126 2004/02/02 15:27:20 dicuccio* +<algorithm> for find** Revision 1.125 2004/02/02 14:46:43 vasilche* Several performance fixed - do not iterate whole tse set in CDataSource.** Revision 1.124 2003/12/18 16:38:06 grichenk* Added CScope::RemoveEntry()** Revision 1.123 2003/11/26 17:55:57 vasilche* Implemented ID2 split in ID1 cache.* Fixed loading of splitted annotations.** Revision 1.122 2003/10/27 16:47:12 vasilche* Fixed error:* src/objmgr/data_source.cpp", line 913: Fatal: Assertion failed: (it != tse_map.end() && it->first == id)** Revision 1.121 2003/10/07 13:43:23 vasilche* Added proper handling of named Seq-annots.* Added feature search from named Seq-annots.* Added configurable adaptive annotation search (default: gene, cds, mrna).* Fixed selection of blobs for loading from GenBank.* Added debug checks to CSeq_id_Mapper for easier finding lost CSeq_id_Handles.* Fixed leaked split chunks annotation stubs.* Moved some classes definitions in separate *.cpp files.** Revision 1.120 2003/09/30 16:22:02 vasilche* Updated internal object manager classes to be able to load ID2 data.* SNP blobs are loaded as ID2 split blobs - readers convert them automatically.* Scope caches results of requests for data to data loaders.* Optimized CSeq_id_Handle for gis.* Optimized bioseq lookup in scope.* Reduced object allocations in annotation iterators.* CScope is allowed to be destroyed before other objects using this scope are* deleted (feature iterators, bioseq handles etc).* Optimized lookup for matching Seq-ids in CSeq_id_Mapper.* Added 'adaptive' option to objmgr_demo application.** Revision 1.119 2003/09/05 17:29:40 grichenk* Structurized Object Manager exceptions** Revision 1.118 2003/09/03 20:00:02 grichenk* Added sequence filtering by level (mains/parts/all)** Revision 1.117 2003/08/14 20:05:19 vasilche* Simple SNP features are stored as table internally.* They are recreated when needed using CFeat_CI.** Revision 1.116 2003/08/04 17:04:31 grichenk* Added default data-source priority assignment.* Added support for iterating all annotations from a* seq-entry or seq-annot.** Revision 1.115 2003/07/17 22:51:31 vasilche* Fixed unused variables warnings.** Revision 1.114 2003/07/17 20:07:56 vasilche* Reduced memory usage by feature indexes.* SNP data is loaded separately through PUBSEQ_OS.* String compression for SNP data.** Revision 1.113 2003/07/09 17:54:29 dicuccio* Fixed uninitialized variables in CDataSource and CSeq_annot_Info** Revision 1.112 2003/07/01 18:01:08 vasilche* Added check for null m_SeqMap pointer.** Revision 1.111 2003/06/24 14:35:01 vasilche* Fixed compilation in debug mode.** Revision 1.110 2003/06/24 14:25:18 vasilche* Removed obsolete CTSE_Guard class.* Used separate mutexes for bioseq and annot maps.** Revision 1.109 2003/06/19 18:23:45 vasilche* Added several CXxx_ScopeInfo classes for CScope related information.* CBioseq_Handle now uses reference to CBioseq_ScopeInfo.* Some fine tuning of locking in CScope.** Revision 1.104 2003/05/20 15:44:37 vasilche* Fixed interaction of CDataSource and CDataLoader in multithreaded app.* Fixed some warnings on WorkShop.* Added workaround for memory leak on WorkShop.** Revision 1.103 2003/05/14 18:39:28 grichenk* Simplified TSE caching and filtering in CScope, removed* some obsolete members and functions.** Revision 1.102 2003/05/12 19:18:29 vasilche* Fixed locking of object manager classes in multi-threaded application.** Revision 1.101 2003/05/06 18:54:09 grichenk* Moved TSE filtering from CDataSource to CScope, changed* some filtering rules (e.g. priority is now more important* than scope history). Added more caches to CScope.** Revision 1.100 2003/05/05 20:59:47 vasilche* Use one static mutex for all instances of CTSE_LockingSet.** Revision 1.99 2003/04/29 19:51:13 vasilche* Fixed interaction of Data Loader garbage collector and TSE locking mechanism.* Made some typedefs more consistent.** Revision 1.98 2003/04/24 16:12:38 vasilche* Object manager internal structures are splitted more straightforward.* Removed excessive header dependencies.** Revision 1.97 2003/04/14 21:32:18 grichenk* Avoid passing CScope as an argument to CDataSource methods** Revision 1.96 2003/03/24 21:26:45 grichenk* Added support for CTSE_CI** Revision 1.95 2003/03/21 21:08:53 grichenk* Fixed TTSE_Lock initialization** Revision 1.93 2003/03/21 19:22:51 grichenk* Redesigned TSE locking, replaced CTSE_Lock with CRef<CTSE_Info>.** Revision 1.92 2003/03/18 14:52:59 grichenk* Removed obsolete methods, replaced seq-id with seq-id handle* where possible. Added argument to limit annotations update to* a single seq-entry.** Revision 1.91 2003/03/12 20:09:34 grichenk* Redistributed members between CBioseq_Handle, CBioseq_Info and CTSE_Info** Revision 1.90 2003/03/11 15:51:06 kuznets* iterate -> ITERATE** Revision 1.89 2003/03/11 14:15:52 grichenk* +Data-source priority** Revision 1.88 2003/03/10 16:55:17 vasilche* Cleaned SAnnotSelector structure.* Added shortcut when features are limited to one TSE.** Revision 1.87 2003/03/05 20:56:43 vasilche* SAnnotSelector now holds all parameters of annotation iterators.** Revision 1.86 2003/03/03 20:31:08 vasilche* Removed obsolete method PopulateTSESet().** Revision 1.85 2003/02/27 14:35:31 vasilche* Splitted PopulateTSESet() by logically independent parts.** Revision 1.84 2003/02/25 20:10:40 grichenk* Reverted to single total-range index for annotations** Revision 1.83 2003/02/24 18:57:22 vasilche* Make feature gathering in one linear pass using CSeqMap iterator.* Do not use feture index by sub locations.* Sort features at the end of gathering in one vector.* Extracted some internal structures and classes in separate header.* Delay creation of mapped features.** Revision 1.82 2003/02/24 14:51:11 grichenk* Minor improvements in annot indexing** Revision 1.81 2003/02/13 14:34:34 grichenk* Renamed CAnnotObject -> CAnnotObject_Info* + CSeq_annot_Info and CAnnotObject_Ref* Moved some members of CAnnotObject to CSeq_annot_Info* and CAnnotObject_Ref.* Added feat/align/graph to CAnnotObject_Info map* to CDataSource.** Revision 1.80 2003/02/05 17:59:17 dicuccio* Moved formerly private headers into include/objects/objmgr/impl** Revision 1.79 2003/02/04 22:01:26 grichenk* Fixed annotations loading/indexing order** Revision 1.78 2003/02/04 21:46:32 grichenk* Added map of annotations by intervals (the old one was* by total ranges)** Revision 1.77 2003/01/29 22:03:46 grichenk* Use single static CSeq_id_Mapper instead of per-OM model.** Revision 1.76 2003/01/29 17:45:02 vasilche* Annotaions index is split by annotation/feature type.** Revision 1.75 2003/01/22 20:11:54 vasilche* Merged functionality of CSeqMapResolved_CI to CSeqMap_CI.* CSeqMap_CI now supports resolution and iteration over sequence range.* Added several caches to CScope.* Optimized CSeqVector().* Added serveral variants of CBioseqHandle::GetSeqVector().* Tried to optimize annotations iterator (not much success).* Rewritten CHandleRange and CHandleRangeMap classes to avoid sorting of list.** Revision 1.74 2002/12/26 16:39:24 vasilche* Object manager class CSeqMap rewritten.** Revision 1.73 2002/12/20 20:54:24 grichenk* Added optional location/product switch to CFeat_CI** Revision 1.72 2002/12/19 20:16:39 grichenk* Fixed locations on minus strand** Revision 1.71 2002/12/06 15:36:00 grichenk* Added overlap type for annot-iterators** Revision 1.70 2002/11/08 22:15:51 grichenk* Added methods for removing/replacing annotations** Revision 1.69 2002/11/08 21:03:30 ucko* CConstRef<> now requires an explicit constructor.** Revision 1.68 2002/11/04 21:29:12 grichenk* Fixed usage of const CRef<> and CRef<> constructor** Revision 1.67 2002/10/18 19:12:40 grichenk* Removed mutex pools, converted most static mutexes to non-static.* Protected CSeqMap::x_Resolve() with mutex. Modified code to prevent* dead-locks.** Revision 1.66 2002/10/16 20:44:16 ucko* MIPSpro: use #pragma instantiate rather than template<>, as the latter* ended up giving rld errors for CMutexPool_Base<*>::sm_Pool. (Sigh.)** Revision 1.65 2002/10/02 17:58:23 grichenk* Added sequence type filter to CBioseq_CI** Revision 1.64 2002/09/30 20:01:19 grichenk* Added methods to support CBioseq_CI** Revision 1.63 2002/09/16 19:59:36 grichenk* Fixed getting reference to a gap on minus strand** Revision 1.62 2002/09/10 19:55:49 grichenk* Throw exception when unable to create resolved seq-map** Revision 1.61 2002/08/09 14:58:50 ucko* Restrict template <> to MIPSpro for now, as it also leads to link* errors with Compaq's compiler. (Sigh.)** Revision 1.60 2002/08/08 19:51:16 ucko* Omit EMPTY_TEMPLATE for GCC and KCC, as it evidently leads to link errors(!)** Revision 1.59 2002/08/08 14:28:00 ucko* Add EMPTY_TEMPLATE to explicit instantiations.** Revision 1.58 2002/08/07 18:22:48 ucko* Explicitly instantiate CMutexPool_Base<{CDataSource,TTSESet}>::sm_Pool** Revision 1.57 2002/07/25 15:01:51 grichenk* Replaced non-const GetXXX() with SetXXX()** Revision 1.56 2002/07/08 20:51:01 grichenk* Moved log to the end of file* Replaced static mutex (in CScope, CDataSource) with the mutex* pool. Redesigned CDataSource data locking.** Revision 1.55 2002/07/01 15:44:51 grichenk* Fixed typos** Revision 1.54 2002/07/01 15:40:58 grichenk* Fixed 'tse_set' warning.* Removed duplicate call to tse_set.begin().* Fixed version resolving for annotation iterators.* Fixed strstream bug in KCC.** Revision 1.53 2002/06/28 17:30:42 grichenk* Duplicate seq-id: ERR_POST() -> THROW1_TRACE() with the seq-id* list.* Fixed x_CleanupUnusedEntries().* Fixed a bug with not found sequences.* Do not copy bioseq data in GetBioseqCore().** Revision 1.52 2002/06/21 15:12:15 grichenk* Added resolving seq-id to the best version** Revision 1.51 2002/06/12 14:39:53 grichenk* Performance improvements** Revision 1.50 2002/06/04 17:18:33 kimelman* memory cleanup : new/delete/Cref rearrangements** Revision 1.49 2002/05/31 17:53:00 grichenk* Optimized for better performance (CTSE_Info uses atomic counter,* delayed annotations indexing, no location convertions in* CAnnot_Types_CI if no references resolution is required etc.)** Revision 1.48 2002/05/29 21:21:13 gouriano* added debug dump** Revision 1.47 2002/05/28 18:00:43 gouriano* DebugDump added** Revision 1.46 2002/05/24 14:57:12 grichenk* SerialAssign<>() -> CSerialObject::Assign()** Revision 1.45 2002/05/21 18:57:25 grichenk* Fixed annotations dropping** Revision 1.44 2002/05/21 18:40:50 grichenk* Fixed annotations droppping** Revision 1.43 2002/05/14 20:06:25 grichenk* Improved CTSE_Info locking by CDataSource and CDataLoader** Revision 1.42 2002/05/13 15:28:27 grichenk* Fixed seqmap for virtual sequences** Revision 1.41 2002/05/09 14:18:15 grichenk* More TSE conflict resolving rules for annotations** Revision 1.40 2002/05/06 03:28:46 vakatov* OM/OM1 renaming** Revision 1.39 2002/05/03 21:28:09 ucko* Introduce T(Signed)SeqPos.** Revision 1.38 2002/05/02 20:42:37 grichenk* throw -> THROW1_TRACE** Revision 1.37 2002/04/22 20:05:08 grichenk* Fixed minor bug in GetSequence()** Revision 1.36 2002/04/19 18:02:47 kimelman* add verify to catch coredump** Revision 1.35 2002/04/17 21:09:14 grichenk* Fixed annotations loading* +IsSynonym()** Revision 1.34 2002/04/11 18:45:39 ucko* Pull in extra headers to make KCC happy.** Revision 1.33 2002/04/11 12:08:21 grichenk* Fixed GetResolvedSeqMap() implementation** Revision 1.32 2002/04/05 21:23:08 grichenk* More duplicate id warnings fixed** Revision 1.31 2002/04/05 20:27:52 grichenk* Fixed duplicate identifier warning** Revision 1.30 2002/04/04 21:33:13 grichenk* Fixed GetSequence() for sequences with unresolved segments** Revision 1.29 2002/04/03 18:06:47 grichenk* Fixed segmented sequence bugs (invalid positioning of literals* and gaps). Improved CSeqVector performance.** Revision 1.27 2002/03/28 14:02:31 grichenk* Added scope history checks to CDataSource::x_FindBestTSE()** Revision 1.26 2002/03/22 17:24:12 gouriano* loader-related fix in DropTSE()** Revision 1.25 2002/03/21 21:39:48 grichenk* garbage collector bugfix** Revision 1.24 2002/03/20 21:24:59 gouriano* *** empty log message ***** Revision 1.23 2002/03/15 18:10:08 grichenk* Removed CRef<CSeq_id> from CSeq_id_Handle, added* key to seq-id map th CSeq_id_Mapper** Revision 1.22 2002/03/11 21:10:13 grichenk* +CDataLoader::ResolveConflict()** Revision 1.21 2002/03/07 21:25:33 grichenk* +GetSeq_annot() in annotation iterators** Revision 1.20 2002/03/06 19:37:19 grichenk* Fixed minor bugs and comments** Revision 1.19 2002/03/05 18:44:55 grichenk* +x_UpdateTSEStatus()** Revision 1.18 2002/03/05 16:09:10 grichenk* Added x_CleanupUnusedEntries()** Revision 1.17 2002/03/04 15:09:27 grichenk* Improved MT-safety. Added live/dead flag to CDataSource methods.** Revision 1.16 2002/02/28 20:53:31 grichenk* Implemented attaching segmented sequence data. Fixed minor bugs.** Revision 1.15 2002/02/25 21:05:29 grichenk* Removed seq-data references caching. Increased MT-safety. Fixed typos.** Revision 1.14 2002/02/21 19:27:05 grichenk* Rearranged includes. Added scope history. Added searching for the* best seq-id match in data sources and scopes. Updated tests.** Revision 1.13 2002/02/20 20:23:27 gouriano* corrected FilterSeqid()** Revision 1.12 2002/02/15 20:35:38 gouriano* changed implementation of HandleRangeMap** Revision 1.11 2002/02/12 19:41:42 grichenk* Seq-id handles lock/unlock moved to CSeq_id_Handle 'ctors.** Revision 1.10 2002/02/07 21:27:35 grichenk* Redesigned CDataSource indexing: seq-id handle -> TSE -> seq/annot** Revision 1.9 2002/02/06 21:46:11 gouriano* *** empty log message ***** Revision 1.8 2002/02/05 21:46:28 gouriano* added FindSeqid function, minor tuneup in CSeq_id_mapper** Revision 1.7 2002/01/30 22:09:28 gouriano* changed CSeqMap interface** Revision 1.6 2002/01/29 17:45:00 grichenk* Added seq-id handles locking** Revision 1.5 2002/01/28 19:44:49 gouriano* changed the interface of BioseqHandle: two functions moved from Scope** Revision 1.4 2002/01/23 21:59:31 grichenk* Redesigned seq-id handles and mapper** Revision 1.3 2002/01/18 15:56:23 gouriano* changed TSeqMaps definition** Revision 1.2 2002/01/16 16:25:57 gouriano* restructured objmgr** Revision 1.1 2002/01/11 19:06:18 gouriano* restructured objmgr*** ===========================================================================*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?