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

Search Toolkit Book for CBlastQueryVector

Query Vector. More...

#include <algo/blast/api/sseqloc.hpp>

+ Inheritance diagram for CBlastQueryVector:
+ Collaboration diagram for CBlastQueryVector:

Public Types

typedef CRef< CBlastSearchQueryvalue_type
 
typedef vector< value_type >::size_type size_type
 size_type type definition More...
 
typedef vector< value_type >::const_iterator const_iterator
 const_iterator type definition 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...
 

Public Member Functions

void AddQuery (CRef< CBlastSearchQuery > q)
 Add a query to the set. More...
 
bool Empty () const
 Returns true if this query vector is empty. More...
 
size_type Size () const
 Returns the number of queries found in this query vector. More...
 
CConstRef< objects::CSeq_loc > GetQuerySeqLoc (size_type i) const
 Get the query Seq-loc for a query by index. More...
 
CRef< objects::CScope > GetScope (size_type i) const
 Get the scope containing a query by index. More...
 
TMaskedQueryRegions GetMaskedRegions (size_type i) const
 Get the masked regions for a query by number. More...
 
CRef< objects::CSeq_loc > GetMasks (size_type i) const
 Convenience method to get a CSeq_loc representing the masking locations. More...
 
void SetMaskedRegions (size_type i, TMaskedQueryRegions mqr)
 Assign a list of masked regions to one query. More...
 
void AddMask (size_type i, CRef< CSeqLocInfo > sli)
 Add a masked region to the set for a query. More...
 
CRef< CBlastSearchQueryGetBlastSearchQuery (size_type i) const
 Get the CBlastSearchQuery object at index i. More...
 
CRef< CBlastSearchQueryoperator[] (size_type i) const
 Get the CBlastSearchQuery object at index i. More...
 
size_type size () const
 Identical to Size, provided to facilitate STL-style iteration. More...
 
const_iterator begin () const
 Returns const_iterator to beginning of container, provided to facilitate STL-style iteration. More...
 
const_iterator end () const
 Returns const_iterator to end of container, provided to facilitate STL-style iteration. More...
 
void clear ()
 Clears the contents of this object. More...
 
void push_back (const value_type &element)
 Add a value to the back of this container. More...
 
- 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

vector< CRef< CBlastSearchQuery > > m_Queries
 The set of queries used for a search. More...
 

Additional Inherited Members

- 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...
 

Detailed Description

Query Vector.

This class represents the data relevant to all queries in a blast search. The queries are represented as CBlastSearchQuery objects. Each contains a Seq-loc, scope, and a list of filtered regions.

Definition at line 276 of file sseqloc.hpp.

Member Typedef Documentation

◆ const_iterator

const_iterator type definition

Definition at line 285 of file sseqloc.hpp.

◆ size_type

size_type type definition

Definition at line 282 of file sseqloc.hpp.

◆ value_type

Definition at line 279 of file sseqloc.hpp.

Member Function Documentation

◆ AddMask()

void CBlastQueryVector::AddMask ( size_type  i,
CRef< CSeqLocInfo sli 
)
inline

Add a masked region to the set for a query.

Parameters
iThe index of the query.
sliThe masked region to add.

Definition at line 359 of file sseqloc.hpp.

References i, and m_Queries.

Referenced by CIgBlast::x_SetupDJSearch(), and CIgBlast::x_SetupNoOverlapDSearch().

◆ AddQuery()

void CBlastQueryVector::AddQuery ( CRef< CBlastSearchQuery q)
inline

◆ begin()

const_iterator CBlastQueryVector::begin ( ) const
inline

Returns const_iterator to beginning of container, provided to facilitate STL-style iteration.

Definition at line 386 of file sseqloc.hpp.

References m_Queries.

◆ clear()

void CBlastQueryVector::clear ( )
inline

Clears the contents of this object.

Definition at line 393 of file sseqloc.hpp.

References m_Queries.

◆ Empty()

bool CBlastQueryVector::Empty ( ) const
inline

Returns true if this query vector is empty.

Definition at line 299 of file sseqloc.hpp.

References m_Queries.

Referenced by CheckForEmptySequences(), and CObjMgr_QueryFactory::CObjMgr_QueryFactory().

◆ end()

const_iterator CBlastQueryVector::end ( ) const
inline

Returns const_iterator to end of container, provided to facilitate STL-style iteration.

Definition at line 390 of file sseqloc.hpp.

References m_Queries.

◆ GetBlastSearchQuery()

CRef<CBlastSearchQuery> CBlastQueryVector::GetBlastSearchQuery ( size_type  i) const
inline

◆ GetMaskedRegions()

TMaskedQueryRegions CBlastQueryVector::GetMaskedRegions ( size_type  i) const
inline

Get the masked regions for a query by number.

Parameters
iThe index of a query.
Returns
The masked (filtered) regions of that query.

Definition at line 331 of file sseqloc.hpp.

References _ASSERT, i, and m_Queries.

Referenced by BOOST_AUTO_TEST_CASE(), CObjMgr_QueryFactory::ExtractUserSpecifiedMasks(), CBlastQuerySourceOM::GetMask(), CBlastQuerySourceOM::GetMaskedRegions(), GetMasks(), and CObjMgr_QueryFactory::GetTSeqLocVector().

◆ GetMasks()

CRef<objects::CSeq_loc> CBlastQueryVector::GetMasks ( size_type  i) const
inline

Convenience method to get a CSeq_loc representing the masking locations.

Parameters
iThe index of a query.
Returns
The masked (filtered) regions of that query.
Exceptions
CBlastExceptionin case of errors in conversion

Definition at line 341 of file sseqloc.hpp.

References GetMaskedRegions(), i, and MaskedQueryRegionsToPackedSeqLoc().

Referenced by Blast_FindDustFilterLoc(), and BOOST_AUTO_TEST_CASE().

◆ GetQuerySeqLoc()

CConstRef<objects::CSeq_loc> CBlastQueryVector::GetQuerySeqLoc ( size_type  i) const
inline

◆ GetScope()

CRef<objects::CScope> CBlastQueryVector::GetScope ( size_type  i) const
inline

◆ operator[]()

CRef<CBlastSearchQuery> CBlastQueryVector::operator[] ( size_type  i) const
inline

Get the CBlastSearchQuery object at index i.

Parameters
iThe index of a query.

Definition at line 376 of file sseqloc.hpp.

References GetBlastSearchQuery(), and i.

◆ push_back()

void CBlastQueryVector::push_back ( const value_type element)
inline

Add a value to the back of this container.

Parameters
elementelement to add [in]

Definition at line 397 of file sseqloc.hpp.

References m_Queries.

Referenced by BOOST_AUTO_TEST_CASE(), and s_CloneBlastQueryVector().

◆ SetMaskedRegions()

void CBlastQueryVector::SetMaskedRegions ( size_type  i,
TMaskedQueryRegions  mqr 
)
inline

Assign a list of masked regions to one query.

Parameters
iThe index of the query.
mqrThe masked regions for this query.

Definition at line 350 of file sseqloc.hpp.

References _ASSERT, i, and m_Queries.

Referenced by Blast_FindDustFilterLoc(), CIgBlast::x_SetupCRegionSearch(), CIgBlast::x_SetupDbSearch(), CIgBlast::x_SetupDJSearch(), and CIgBlast::x_SetupNoOverlapDSearch().

◆ Size()

size_type CBlastQueryVector::Size ( ) const
inline

◆ size()

size_type CBlastQueryVector::size ( ) const
inline

Identical to Size, provided to facilitate STL-style iteration.

Definition at line 382 of file sseqloc.hpp.

References Size().

Referenced by CSequenceInputStats::AddQueryBatch(), CBlastFormatterApp::x_ExtractQueries(), and CBlastFormatterVdbApp::x_ExtractQueries().

Member Data Documentation

◆ m_Queries

vector< CRef<CBlastSearchQuery> > CBlastQueryVector::m_Queries
private

The set of queries used for a search.

Definition at line 401 of file sseqloc.hpp.

Referenced by AddMask(), AddQuery(), begin(), clear(), Empty(), end(), GetBlastSearchQuery(), GetMaskedRegions(), GetQuerySeqLoc(), GetScope(), push_back(), SetMaskedRegions(), and Size().


The documentation for this class was generated from the following file:
Modified on Sat May 04 13:17:34 2024 by modify_doxy.py rev. 669887