NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
CBlastDbDataLoader Class Reference

Search Toolkit Book for CBlastDbDataLoader

#include <objtools/data_loaders/blastdb/bdbloader.hpp>

+ Inheritance diagram for CBlastDbDataLoader:
+ Collaboration diagram for CBlastDbDataLoader:

Classes

struct  SBlastDbParam
 

Public Types

enum  EDbType { eNucleotide = 0 , eProtein = 1 , eUnknown = 2 }
 Describes the type of blast database to use. More...
 
typedef SRegisterLoaderInfo< CBlastDbDataLoaderTRegisterLoaderInfo
 
typedef limited_size_map< CSeq_id_Handle, intTIdMap
 A mapping from sequence identifier to blob ids. More...
 
- Public Types inherited from CDataLoader
enum  EChoice {
  eBlob , eBioseq , eCore , eBioseqCore ,
  eSequence , eFeatures , eGraph , eAlign ,
  eAnnot , eExtFeatures , eExtGraph , eExtAlign ,
  eExtAnnot , eOrphanAnnot , eAll
}
 main blob is blob with sequence all other blobs are external and contain external annotations More...
 
typedef CTSE_Lock TTSE_Lock
 
typedef set< TTSE_LockTTSE_LockSet
 
typedef CRef< CTSE_Chunk_InfoTChunk
 
typedef vector< TChunkTChunkSet
 
typedef set< stringTProcessedNAs
 
typedef set< CSeq_id_HandleTSeq_idSet
 
typedef vector< CSeq_id_HandleTIds
 
typedef vector< boolTLoaded
 Bulk loading interface for a small pieces of information per id. More...
 
typedef vector< TIdsTBulkIds
 
typedef vector< TGiTGis
 
typedef vector< stringTLabels
 
typedef vector< TTaxIdTTaxIds
 
typedef vector< TSeqPosTSequenceLengths
 
typedef vector< CSeq_inst::TMolTSequenceTypes
 
typedef vector< intTSequenceStates
 
typedef vector< intTSequenceHashes
 
typedef vector< boolTHashKnown
 
typedef map< CSeq_id_Handle, TTSE_LockSetTTSE_LockSets
 
typedef vector< vector< CSeq_id_Handle > > TSeqIdSets
 
typedef vector< CTSE_LockTCDD_Locks
 
typedef CBlobIdKey TBlobId
 
typedef int TBlobVersion
 
typedef CRef< IEditSaverTEditSaver
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

virtual ~CBlastDbDataLoader ()
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
virtual TTSE_LockSet GetRecords (const CSeq_id_Handle &idh, EChoice choice)
 Load TSE. More...
 
virtual void GetChunk (TChunk chunk)
 Load a description or data chunk. More...
 
virtual TTaxId GetTaxId (const CSeq_id_Handle &idh)
 Request for a taxonomy id of a sequence. More...
 
virtual void GetTaxIds (const TIds &ids, TLoaded &loaded, TTaxIds &ret)
 
virtual TSeqPos GetSequenceLength (const CSeq_id_Handle &idh)
 Request for a length of a sequence. More...
 
virtual void GetSequenceLengths (const TIds &ids, TLoaded &loaded, TSequenceLengths &ret)
 
virtual CSeq_inst::TMol GetSequenceType (const CSeq_id_Handle &idh)
 Request for a type of a sequence Returns CSeq_inst::eMol_not_set if sequence is not known. More...
 
virtual void GetSequenceTypes (const TIds &ids, TLoaded &loaded, TSequenceTypes &ret)
 
virtual TBlobId GetBlobId (const CSeq_id_Handle &idh)
 Gets the blob id for a given sequence. More...
 
virtual bool CanGetBlobById () const
 Test method for GetBlobById feature. More...
 
virtual TTSE_Lock GetBlobById (const TBlobId &blob_id)
 For a given TBlobId, get the TTSE_Lock. More...
 
- Public Member Functions inherited from CDataLoader
virtual ~CDataLoader (void)
 
TTSE_LockSet GetRecordsNoBlobState (const CSeq_id_Handle &idh, EChoice choice)
 The same as GetRecords() but always returns empty TSE lock set instead of throwing CBlobStateException. More...
 
virtual TTSE_LockSet GetDetailedRecords (const CSeq_id_Handle &idh, const SRequestDetails &details)
 Request from a datasource using handles and ranges instead of seq-loc The TSEs loaded in this call will be added to the tse_set. More...
 
virtual TTSE_LockSet GetExternalRecords (const CBioseq_Info &bioseq)
 Request from a datasource set of blobs with external annotations. More...
 
virtual TTSE_LockSet GetOrphanAnnotRecords (const CSeq_id_Handle &idh, const SAnnotSelector *sel)
 old Get*AnnotRecords() methods More...
 
virtual TTSE_LockSet GetExternalAnnotRecords (const CSeq_id_Handle &idh, const SAnnotSelector *sel)
 
virtual TTSE_LockSet GetExternalAnnotRecords (const CBioseq_Info &bioseq, const SAnnotSelector *sel)
 
virtual TTSE_LockSet GetOrphanAnnotRecordsNA (const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 new Get*AnnotRecords() methods More...
 
virtual TTSE_LockSet GetOrphanAnnotRecordsNA (const TSeq_idSet &ids, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 
virtual TTSE_LockSet GetExternalAnnotRecordsNA (const CSeq_id_Handle &idh, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 
virtual TTSE_LockSet GetExternalAnnotRecordsNA (const CBioseq_Info &bioseq, const SAnnotSelector *sel, TProcessedNAs *processed_nas)
 
virtual void GetIds (const CSeq_id_Handle &idh, TIds &ids)
 Request for a list of all Seq-ids of a sequence. More...
 
bool SequenceExists (const CSeq_id_Handle &idh)
 helper function to check if sequence exists, uses GetIds() More...
 
virtual CSeq_id_Handle GetAccVer (const CSeq_id_Handle &idh)
 Request for a accession.version Seq-id of a sequence. More...
 
virtual SAccVerFound GetAccVerFound (const CSeq_id_Handle &idh)
 
virtual TGi GetGi (const CSeq_id_Handle &idh)
 Request for a gi of a sequence. More...
 
virtual SGiFound GetGiFound (const CSeq_id_Handle &idh)
 
virtual string GetLabel (const CSeq_id_Handle &idh)
 Request for a label string of a sequence. More...
 
virtual STypeFound GetSequenceTypeFound (const CSeq_id_Handle &idh)
 
virtual int GetSequenceState (const CSeq_id_Handle &idh)
 Request for a state of a sequence. More...
 
virtual int GetSequenceHash (const CSeq_id_Handle &idh)
 Request for a sequence hash. More...
 
virtual SHashFound GetSequenceHashFound (const CSeq_id_Handle &idh)
 
virtual void GetBulkIds (const TIds &ids, TLoaded &loaded, TBulkIds &ret)
 Bulk request for all Seq-ids of a set of sequences. More...
 
virtual void GetAccVers (const TIds &ids, TLoaded &loaded, TIds &ret)
 Bulk request for accession.version Seq-ids of a set of sequences. More...
 
virtual void GetGis (const TIds &ids, TLoaded &loaded, TGis &ret)
 Bulk request for gis of a set of sequences. More...
 
virtual void GetLabels (const TIds &ids, TLoaded &loaded, TLabels &ret)
 Bulk request for label strings of a set of sequences. More...
 
virtual void GetTaxIds (const TIds &ids, TLoaded &loaded, TTaxIds &ret)
 Bulk request for taxonomy ids of a set of sequences. More...
 
virtual void GetSequenceLengths (const TIds &ids, TLoaded &loaded, TSequenceLengths &ret)
 Bulk request for lengths of a set of sequences. More...
 
virtual void GetSequenceTypes (const TIds &ids, TLoaded &loaded, TSequenceTypes &ret)
 Bulk request for types of a set of sequences. More...
 
virtual void GetSequenceStates (const TIds &ids, TLoaded &loaded, TSequenceStates &ret)
 Bulk request for states of a set of sequences. More...
 
virtual void GetSequenceHashes (const TIds &ids, TLoaded &loaded, TSequenceHashes &ret, THashKnown &known)
 Bulk request for hashes of a set of sequences. More...
 
virtual void GetCDDAnnots (const TSeqIdSets &id_sets, TLoaded &loaded, TCDD_Locks &ret)
 
virtual void GetBlobs (TTSE_LockSets &tse_sets)
 
virtual TBlobId GetBlobIdFromString (const string &str) const
 
virtual TBlobVersion GetBlobVersion (const TBlobId &id)
 
virtual SRequestDetails ChoiceToDetails (EChoice choice) const
 
virtual EChoice DetailsToChoice (const SRequestDetails::TAnnotSet &annots) const
 
virtual EChoice DetailsToChoice (const SRequestDetails &details) const
 
virtual void GetChunks (const TChunkSet &chunks)
 
virtual void DropTSE (CRef< CTSE_Info > tse_info)
 
void SetTargetDataSource (CDataSource &data_source)
 Specify datasource to send loaded data to. More...
 
string GetName (void) const
 
virtual TTSE_Lock ResolveConflict (const CSeq_id_Handle &id, const TTSE_LockSet &tse_set)
 Resolve TSE conflict *select the best TSE from the set of dead TSEs. More...
 
virtual void GC (void)
 
virtual TEditSaver GetEditSaver () const
 
virtual CObjectManager::TPriority GetDefaultPriority (void) const
 
virtual Uint4 EstimateLoadBytes (const CTSE_Chunk_Info &chunk) const
 
virtual double EstimateLoadSeconds (const CTSE_Chunk_Info &chunk, Uint4 bytes) const
 
virtual unsigned GetDefaultBlobCacheSizeLimit () const
 
virtual bool GetTrackSplitSeq () const
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Static Public Member Functions

static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, const string &dbname="nr", const EDbType dbtype=eUnknown, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
 
static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, CRef< CSeqDB > db_handle, bool use_fixed_size_slices=true, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
 
static string GetLoaderNameFromArgs (CConstRef< CSeqDB > db_handle)
 
static string GetLoaderNameFromArgs (const SBlastDbParam &param)
 
static string GetLoaderNameFromArgs (const string &dbname="nr", const EDbType dbtype=eUnknown)
 
static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, const string &dbname, const EDbType dbtype, CObjectManager::EIsDefault is_default, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
 
static TRegisterLoaderInfo RegisterInObjectManager (CObjectManager &om, CRef< CSeqDB > db_handle, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
 
- Static Public Member Functions inherited from CDataLoader
static bool IsRequestedAnyNA (const SAnnotSelector *sel)
 
static bool IsRequestedNA (const string &na, const SAnnotSelector *sel)
 
static bool IsProcessedNA (const string &na, const TProcessedNAs *processed_nas)
 
static void SetProcessedNA (const string &na, TProcessedNAs *processed_nas)
 
- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 

Protected Types

typedef int TBioseq_setId
 TPlace is a Seq-id or an integer id, this data loader uses the former. More...
 
typedef CSeq_id_Handle TBioseqId
 
typedef pair< TBioseqId, TBioseq_setIdTPlace
 
typedef CParamLoaderMaker< CBlastDbDataLoader, SBlastDbParamTMaker
 

Protected Member Functions

 CBlastDbDataLoader ()
 Default (no-op) constructor. More...
 
 CBlastDbDataLoader (const string &loader_name, const SBlastDbParam &param)
 Parametrized constructor. More...
 
 CBlastDbDataLoader (const CBlastDbDataLoader &)
 Prevent automatic copy constructor generation. More...
 
CBlastDbDataLoaderoperator= (const CBlastDbDataLoader &)
 Prevent automatic assignment operator generation. More...
 
int x_GetOid (const CSeq_id_Handle &idh)
 Gets the OID from m_Ids cache or the BLAST databases. More...
 
int x_GetOid (const TBlobId &blob_id) const
 Gets the OID from a TBlobId (see typedef in bdbloader.cpp) More...
 
void x_LoadData (const CSeq_id_Handle &idh, int oid, CTSE_LoadLock &lock, int slice_size)
 Load sequence data from cache or from the database. More...
 
- Protected Member Functions inherited from CDataLoader
 CDataLoader (void)
 
 CDataLoader (const string &loader_name)
 
void SetName (const string &loader_name)
 
CDataSourceGetDataSource (void) const
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

string m_DBName
 Blast database name. More...
 
EDbType m_DBType
 Is this database protein or nucleotide? More...
 
CRef< IBlastDbAdapterm_BlastDb
 The sequence database. More...
 
TIdMap m_Ids
 ID to OID translation. More...
 
bool m_UseFixedSizeSlices
 Configuration value specified to the CCachedSequence. More...
 

Friends

class CParamLoaderMaker< CBlastDbDataLoader, SBlastDbParam >
 

Additional Inherited Members

- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Static Protected Member Functions inherited from CDataLoader
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. More...
 

Detailed Description

Definition at line 53 of file bdbloader.hpp.

Member Typedef Documentation

◆ TBioseq_setId

TPlace is a Seq-id or an integer id, this data loader uses the former.

Definition at line 176 of file bdbloader.hpp.

◆ TBioseqId

Definition at line 177 of file bdbloader.hpp.

◆ TIdMap

A mapping from sequence identifier to blob ids.

Definition at line 155 of file bdbloader.hpp.

◆ TMaker

Definition at line 180 of file bdbloader.hpp.

◆ TPlace

Definition at line 178 of file bdbloader.hpp.

◆ TRegisterLoaderInfo

Definition at line 78 of file bdbloader.hpp.

Member Enumeration Documentation

◆ EDbType

Describes the type of blast database to use.

Enumerator
eNucleotide 

nucleotide database

eProtein 

protein database

eUnknown 

protein is attempted first, then nucleotide

Definition at line 57 of file bdbloader.hpp.

Constructor & Destructor Documentation

◆ ~CBlastDbDataLoader()

CBlastDbDataLoader::~CBlastDbDataLoader ( void  )
virtual

Definition at line 203 of file bdbloader.cpp.

◆ CBlastDbDataLoader() [1/3]

CBlastDbDataLoader::CBlastDbDataLoader ( )
inlineprotected

Default (no-op) constructor.

Definition at line 184 of file bdbloader.hpp.

◆ CBlastDbDataLoader() [2/3]

CBlastDbDataLoader::CBlastDbDataLoader ( const string loader_name,
const SBlastDbParam param 
)
protected

Parametrized constructor.

Parameters
loader_namename of this data loader [in]
paramparameters to initialize this data loader [in]

Definition at line 180 of file bdbloader.cpp.

References _ASSERT, _TRACE, DbTypeToSeqType(), CRef< C, Locker >::Empty(), GetLoaderNameFromArgs(), m_BlastDb, CBlastDbDataLoader::SBlastDbParam::m_BlastDbHandle, m_DBName, m_DBType, NCBI_THROW, CRef< C, Locker >::NotEmpty(), and CRef< C, Locker >::Reset().

◆ CBlastDbDataLoader() [3/3]

CBlastDbDataLoader::CBlastDbDataLoader ( const CBlastDbDataLoader )
protected

Prevent automatic copy constructor generation.

Member Function Documentation

◆ CanGetBlobById()

bool CBlastDbDataLoader::CanGetBlobById ( void  ) const
virtual

Test method for GetBlobById feature.

The caller will use this method to determine whether this data loader allows blobs to be managed by ID.

Returns
Returns true to indicate that GetBlobById() is available.

Reimplemented from CDataLoader.

Definition at line 434 of file bdbloader.cpp.

◆ DebugDump()

void CBlastDbDataLoader::DebugDump ( CDebugDumpContext  ddc,
unsigned int  depth 
) const
virtual

Define method for dumping debug information.

Reimplemented from CObject.

Reimplemented in CRemoteBlastDbDataLoader.

Definition at line 466 of file bdbloader.cpp.

References DebugDumpValue(), m_DBName, m_DBType, m_UseFixedSizeSlices, and CDebugDumpContext::SetFrame().

◆ GetBlobById()

CBlastDbDataLoader::TTSE_Lock CBlastDbDataLoader::GetBlobById ( const TBlobId blob_id)
virtual

For a given TBlobId, get the TTSE_Lock.

If the provided TBlobId is known to this code, the corresponding TTSE_Lock data will be fetched and returned. Otherwise, an empty valued TTSE_Lock is returned.

Parameters
blob_idIndicates which data to get.
Returns
The returned data.

Reimplemented from CDataLoader.

Reimplemented in CRemoteBlastDbDataLoader.

Definition at line 453 of file bdbloader.cpp.

References first(), CDataLoader::GetDataSource(), CDataSource::GetTSE_LoadLock(), CBlobIdFor< Value, Converter >::GetValue(), CTSE_LoadLock::IsLoaded(), kSequenceSliceSize, and x_LoadData().

Referenced by GetRecords().

◆ GetBlobId()

CBlastDbDataLoader::TBlobId CBlastDbDataLoader::GetBlobId ( const CSeq_id_Handle idh)
virtual

Gets the blob id for a given sequence.

Given a Seq_id_Handle, this method finds the corresponding top level Seq-entry (TSE) and returns a blob corresponding to it. The BlobId is initialized with a pointer to that CSeq_entry if the sequence is known to this data loader, which will be true if GetRecords() was called for this sequence.

Parameters
idhIndicates the sequence for which to get a blob id.
Returns
A TBlobId corresponding to the provided Seq_id_Handle.

Reimplemented from CDataLoader.

Definition at line 441 of file bdbloader.cpp.

References x_GetOid().

Referenced by GetRecords().

◆ GetChunk()

void CBlastDbDataLoader::GetChunk ( TChunk  chunk)
virtual

◆ GetLoaderNameFromArgs() [1/3]

string CBlastDbDataLoader::GetLoaderNameFromArgs ( CConstRef< CSeqDB db_handle)
static

◆ GetLoaderNameFromArgs() [2/3]

string CBlastDbDataLoader::GetLoaderNameFromArgs ( const SBlastDbParam param)
static

◆ GetLoaderNameFromArgs() [3/3]

static string CBlastDbDataLoader::GetLoaderNameFromArgs ( const string dbname = "nr",
const EDbType  dbtype = eUnknown 
)
inlinestatic

Definition at line 94 of file bdbloader.hpp.

References dbname().

◆ GetRecords()

CBlastDbDataLoader::TTSE_LockSet CBlastDbDataLoader::GetRecords ( const CSeq_id_Handle idh,
EChoice  choice 
)
virtual

◆ GetSequenceLength()

TSeqPos CBlastDbDataLoader::GetSequenceLength ( const CSeq_id_Handle idh)
virtual

Request for a length of a sequence.

Returns kInvalidSeqPos if sequence with requested id is not known. The result must not be kInvalidSeqPos for existing sequences

Reimplemented from CDataLoader.

Definition at line 312 of file bdbloader.cpp.

References CSeq_id_Handle::GetSeqId(), IBlastDbAdapter::GetSeqLength(), kInvalidSeqPos, m_BlastDb, and IBlastDbAdapter::SeqidToOid().

Referenced by GetSequenceLengths().

◆ GetSequenceLengths()

void CBlastDbDataLoader::GetSequenceLengths ( const TIds ids,
TLoaded loaded,
TSequenceLengths ret 
)
virtual

Definition at line 321 of file bdbloader.cpp.

References _ASSERT, GetSequenceLength(), and i.

◆ GetSequenceType()

CSeq_inst::TMol CBlastDbDataLoader::GetSequenceType ( const CSeq_id_Handle idh)
virtual

Request for a type of a sequence Returns CSeq_inst::eMol_not_set if sequence is not known.

See also
GetSequenceTypeFound()

Reimplemented from CDataLoader.

Definition at line 336 of file bdbloader.cpp.

References CSeq_inst_Base::eMol_aa, CSeq_inst_Base::eMol_na, CSeq_inst_Base::eMol_not_set, eNucleotide, eProtein, and m_DBType.

◆ GetSequenceTypes()

void CBlastDbDataLoader::GetSequenceTypes ( const TIds ids,
TLoaded loaded,
TSequenceTypes ret 
)
virtual

◆ GetTaxId()

TTaxId CBlastDbDataLoader::GetTaxId ( const CSeq_id_Handle idh)
virtual

Request for a taxonomy id of a sequence.

Returns -1 if sequence with requested id is not known. Returns 0 if existing sequence doesn't have TaxID

Reimplemented from CDataLoader.

Definition at line 292 of file bdbloader.cpp.

References IBlastDbAdapter::GetTaxId(), and m_BlastDb.

Referenced by GetTaxIds().

◆ GetTaxIds()

void CBlastDbDataLoader::GetTaxIds ( const TIds ids,
TLoaded loaded,
TTaxIds ret 
)
virtual

Definition at line 297 of file bdbloader.cpp.

References _ASSERT, GetTaxId(), and i.

◆ operator=()

CBlastDbDataLoader& CBlastDbDataLoader::operator= ( const CBlastDbDataLoader )
protected

Prevent automatic assignment operator generation.

◆ RegisterInObjectManager() [1/4]

CBlastDbDataLoader::TRegisterLoaderInfo CBlastDbDataLoader::RegisterInObjectManager ( CObjectManager om,
const string dbname,
const EDbType  dbtype,
CObjectManager::EIsDefault  is_default,
CObjectManager::TPriority  priority = CObjectManager::kPriority_NotSet 
)
static
Note
this is added to temporarily comply with the toolkit's stable components rule of having backwards compatible APIs

Definition at line 81 of file bdbloader.cpp.

References dbname(), om, and RegisterInObjectManager().

◆ RegisterInObjectManager() [2/4]

CBlastDbDataLoader::TRegisterLoaderInfo CBlastDbDataLoader::RegisterInObjectManager ( CObjectManager om,
const string dbname = "nr",
const EDbType  dbtype = eUnknown,
bool  use_fixed_size_slices = true,
CObjectManager::EIsDefault  is_default = CObjectManager::eNonDefault,
CObjectManager::TPriority  priority = CObjectManager::kPriority_NotSet 
)
static

◆ RegisterInObjectManager() [3/4]

CBlastDbDataLoader::TRegisterLoaderInfo CBlastDbDataLoader::RegisterInObjectManager ( CObjectManager om,
CRef< CSeqDB db_handle,
bool  use_fixed_size_slices = true,
CObjectManager::EIsDefault  is_default = CObjectManager::eNonDefault,
CObjectManager::TPriority  priority = CObjectManager::kPriority_NotSet 
)
static

◆ RegisterInObjectManager() [4/4]

CBlastDbDataLoader::TRegisterLoaderInfo CBlastDbDataLoader::RegisterInObjectManager ( CObjectManager om,
CRef< CSeqDB db_handle,
CObjectManager::EIsDefault  is_default = CObjectManager::eNonDefault,
CObjectManager::TPriority  priority = CObjectManager::kPriority_NotSet 
)
static
Note
this is added to temporarily comply with the toolkit's stable components rule of having backwards compatible APIs

Definition at line 93 of file bdbloader.cpp.

References om, and RegisterInObjectManager().

◆ x_GetOid() [1/2]

int CBlastDbDataLoader::x_GetOid ( const CSeq_id_Handle idh)
protected

◆ x_GetOid() [2/2]

int CBlastDbDataLoader::x_GetOid ( const TBlobId blob_id) const
protected

Gets the OID from a TBlobId (see typedef in bdbloader.cpp)

Definition at line 427 of file bdbloader.cpp.

References CBlobIdFor< Value, Converter >::GetValue().

◆ x_LoadData()

void CBlastDbDataLoader::x_LoadData ( const CSeq_id_Handle idh,
int  oid,
CTSE_LoadLock lock,
int  slice_size 
)
protected

Load sequence data from cache or from the database.

This checks the OID cache and loads the sequence data from there or if not found, from the CSeqDB database. When new data is built, the sequence is also split into chunks. A description of what data is available will be returned in the "lock" parameter.

Parameters
idhA handle to the sequence identifier.
oidObject id in BLAST DB
lockInformation about the sequence data is returned here.

Definition at line 257 of file bdbloader.cpp.

References _ASSERT, CTSE_Split_Info::AddChunk(), CTSE_Info::GetSplitInfo(), CTSE_LoadLock::IsLoaded(), m_BlastDb, m_Ids, m_UseFixedSizeSlices, NON_CONST_ITERATE, CTSE_LoadLock::SetLoaded(), and CTSE_Info::SetSeq_entry().

Referenced by GetBlobById(), and CRemoteBlastDbDataLoader::GetBlobById().

Friends And Related Function Documentation

◆ CParamLoaderMaker< CBlastDbDataLoader, SBlastDbParam >

Definition at line 180 of file bdbloader.hpp.

Member Data Documentation

◆ m_BlastDb

CRef<IBlastDbAdapter> CBlastDbDataLoader::m_BlastDb
protected

◆ m_DBName

string CBlastDbDataLoader::m_DBName
protected

◆ m_DBType

EDbType CBlastDbDataLoader::m_DBType
protected

◆ m_Ids

TIdMap CBlastDbDataLoader::m_Ids
protected

ID to OID translation.

Definition at line 222 of file bdbloader.hpp.

Referenced by x_GetOid(), and x_LoadData().

◆ m_UseFixedSizeSlices

bool CBlastDbDataLoader::m_UseFixedSizeSlices
protected

The documentation for this class was generated from the following files:
Modified on Tue Apr 23 07:37:10 2024 by modify_doxy.py rev. 669887