NCBI C++ ToolKit
|
Search Toolkit Book for CInputGiList
Gi List for database construction. More...
#include <objtools/blast/seqdb_writer/multisource_util.hpp>
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 SGiOid & | GetGiOid (int index) const |
Access an element of the array. More... | |
const STiOid & | GetTiOid (int index) const |
Access an element of the array. More... | |
const SSiOid & | GetSiOid (int index) const |
Access an element of the array. More... | |
const SPigOid & | GetPigOid (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 SBlastSeqIdListInfo & | GetListInfo () |
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... | |
CObject & | operator= (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< Uint8 > | TCounter |
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< SGiOid > | m_GisOids |
Pairs of GIs and OIDs. More... | |
vector< STiOid > | m_TisOids |
Pairs of GIs and OIDs. More... | |
vector< SSiOid > | m_SisOids |
Pairs of Seq-ids and OIDs. More... | |
vector< SPigOid > | m_PigsOids |
STaxIdsOids | m_TaxIdsOids |
SBlastSeqIdListInfo | m_ListInfo |
Uint8 | m_MaskOpts |
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.
|
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.
Append a GI.
This method adds a GI to the list.
gi | A 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().
Append a Seq-id.
This method adds a Seq-id to the list.
seqid | A 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().
|
private |
Definition at line 137 of file multisource_util.hpp.
Referenced by AppendGi().