NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CInputGiList Class Reference

Search Toolkit Book for CInputGiList

Gi List for database construction. More...

#include <objtools/blast/seqdb_writer/multisource_util.hpp>

+ Inheritance diagram for CInputGiList:
+ Collaboration diagram for CInputGiList:

Public Member Functions

 CInputGiList (int capacity=1024)
 Construct an empty GI list. More...
 
void AppendGi (TGi gi, int oid=-1)
 Append a GI. More...
 
void AppendSi (const string &si, int oid=-1)
 Append a Seq-id. More...
 
- Public Member Functions inherited from CSeqDBGiList
 CSeqDBGiList ()
 Constructor. More...
 
virtual ~CSeqDBGiList ()
 Destructor. More...
 
void InsureOrder (ESortOrder order)
 Sort if necessary to insure order of elements. More...
 
bool FindGi (TGi gi) const
 Test for existence of a GI. More...
 
bool GiToOid (TGi gi, int &oid)
 Try to find a GI and return the associated OID. More...
 
bool GiToOid (TGi gi, int &oid, int &index)
 Find a GI, returning the index and the associated OID. More...
 
bool FindTi (TTi ti) const
 Test for existence of a TI. More...
 
bool TiToOid (TTi ti, int &oid)
 Try to find a TI and return the associated OID. More...
 
bool TiToOid (TTi ti, int &oid, int &index)
 Find a TI, returning the index and the associated OID. More...
 
bool FindSi (const string &si) const
 
bool SiToOid (const string &si, int &oid)
 
bool SiToOid (const string &si, int &oid, int &index)
 
bool FindPig (TPig pig) const
 
bool PigToOid (TPig pig, int &oid)
 
bool PigToOid (TPig pig, int &oid, int &index)
 
bool FindId (const CSeq_id &id)
 Test for existence of a Seq-id by type. More...
 
const SGiOidGetGiOid (int index) const
 Access an element of the array. More...
 
const STiOidGetTiOid (int index) const
 Access an element of the array. More...
 
const SSiOidGetSiOid (int index) const
 Access an element of the array. More...
 
const SPigOidGetPigOid (int index) const
 
int GetNumGis () const
 Get the number of GIs in the array. More...
 
int GetNumTis () const
 Get the number of TIs in the array. More...
 
int GetNumSis () const
 Get the number of Seq-ids in the array. More...
 
int GetNumTaxIds () const
 
int GetNumOidsForTaxIdList () const
 
int GetNumPigs () const
 
Uint8 GetMaskOpts () const
 
bool Empty () const
 Return false if there are elements present. More...
 
bool NotEmpty () const
 Return true if there are elements present. More...
 
bool HasIdFilters () const
 
void SetGiTranslation (int index, int oid)
 Specify the correct OID for a GI. More...
 
void SetTiTranslation (int index, int oid)
 Specify the correct OID for a TI. More...
 
void SetSiTranslation (int index, int oid)
 Specify the correct OID for a Seq-id. More...
 
void SetPigTranslation (int index, int oid)
 
int Size () const
 
template<class T >
int GetSize () const
 
template<class T >
T GetKey (int index) const
 
template<class T >
bool IsValueSet (int index) const
 
template<class T >
void SetValue (int index, int oid)
 
void GetGiList (vector< TGi > &gis) const
 Get the gi list. More...
 
void GetTiList (vector< TTi > &tis) const
 Get the ti list. More...
 
void GetSiList (vector< string > &sis) const
 TODO Get the seqid list? More...
 
void GetPigList (vector< TPig > &pigs) const
 
set< TTaxId > & GetTaxIdsList ()
 
const vector< blastdb::TOid > & GetOidsForTaxIdsList ()
 
vector< blastdb::TOid > & SetOidsForTaxIdsList ()
 
void AddGi (TGi gi)
 Add a new GI to the list. More...
 
void AddTi (TTi ti)
 Add a new TI to the list. More...
 
void AddSi (const string &si)
 Add a new SeqId to the list. More...
 
void AddTaxIds (const set< TTaxId > &tax_ids)
 
void SetPigList (const vector< TPig > &list)
 
void AddPig (TPig pig)
 
void ReserveGis (size_t n)
 Reserve space for GIs. More...
 
void ReserveTis (size_t n)
 Reserve space for TIs. More...
 
void ReserveSis (size_t n)
 
void ReservePigs (size_t n)
 
void PreprocessIdsForISAMSiLookup ()
 Preprocess ids for ISAM string id lookup. More...
 
void SetListInfo (const SBlastSeqIdListInfo &list_info)
 TODO Reserve space for seqids? More...
 
const SBlastSeqIdListInfoGetListInfo ()
 
void SetSiList (const vector< string > &new_list)
 
void SetMaskOpts (EOidMaskType mask_opts)
 
template<>
int GetSize () const
 
template<>
TTi GetKey (int index) const
 
template<>
bool IsValueSet (int index) const
 
template<>
void SetValue (int index, int oid)
 
template<>
int GetSize () const
 
template<>
string GetKey (int index) const
 
template<>
bool IsValueSet (int index) const
 
template<>
void SetValue (int index, int oid)
 
template<>
int GetSize () const
 
template<>
TPig GetKey (int index) const
 
template<>
bool IsValueSet (int index) const
 
template<>
void SetValue (int index, int oid)
 
- 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...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. 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
 

Private Attributes

TGi m_Last
 

Additional Inherited Members

- Public Types inherited from CSeqDBGiList
enum  ESortOrder { eNone , eGi }
 Possible sorting states. More...
 
- 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...
 
- 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)
 
- 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...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 
- Protected Attributes inherited from CSeqDBGiList
ESortOrder m_CurrentOrder
 Indicates the current sort order, if any, of this container. More...
 
vector< SGiOidm_GisOids
 Pairs of GIs and OIDs. More...
 
vector< STiOidm_TisOids
 Pairs of GIs and OIDs. More...
 
vector< SSiOidm_SisOids
 Pairs of Seq-ids and OIDs. More...
 
vector< SPigOidm_PigsOids
 
STaxIdsOids m_TaxIdsOids
 
SBlastSeqIdListInfo m_ListInfo
 
Uint8 m_MaskOpts
 

Detailed Description

Gi List for database construction.

This GI list is built from the set of identifiers the user has specified for inclusion in the resulting database. By using a SeqDB GI list, database filtering can be done using SeqDB's internal processing machinery.

Definition at line 85 of file multisource_util.hpp.

Constructor & Destructor Documentation

◆ CInputGiList()

CInputGiList::CInputGiList ( int  capacity = 1024)
inline

Construct an empty GI list.

Definition at line 88 of file multisource_util.hpp.

References CSeqDBGiList::eGi, CSeqDBGiList::m_CurrentOrder, and CSeqDBGiList::m_GisOids.

Member Function Documentation

◆ AppendGi()

void CInputGiList::AppendGi ( TGi  gi,
int  oid = -1 
)
inline

Append a GI.

This method adds a GI to the list.

Parameters
giA sequence identifier.

Definition at line 104 of file multisource_util.hpp.

References CSeqDBGiList::eGi, CSeqDBGiList::eNone, CSeqDBGiList::m_CurrentOrder, CSeqDBGiList::m_GisOids, and m_Last.

Referenced by CBlastDbSet::SetNegativeGiList(), CBlastDbSet::SetPositiveGiList(), and CBuildDatabase::x_ResolveGis().

◆ AppendSi()

void CInputGiList::AppendSi ( const string si,
int  oid = -1 
)
inline

Append a Seq-id.

This method adds a Seq-id to the list.

Parameters
seqidA sequence identifier.

Definition at line 123 of file multisource_util.hpp.

References CSeqDBGiList::eNone, CSeqDBGiList::m_CurrentOrder, CSeqDBGiList::m_SisOids, SeqDB_SimplifyAccession(), and si.

Referenced by CBuildDatabase::x_ResolveGis().

Member Data Documentation

◆ m_Last

TGi CInputGiList::m_Last
private

Definition at line 137 of file multisource_util.hpp.

Referenced by AppendGi().


The documentation for this class was generated from the following file:
Modified on Fri Sep 20 14:58:18 2024 by modify_doxy.py rev. 669887