NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
CSRSearch Class Referenceabstract

Search Toolkit Book for CSRSearch

#include <algo/blast/dbindex_search/sr_search.hpp>

+ Inheritance diagram for CSRSearch:
+ Collaboration diagram for CSRSearch:

Classes

class  CMismatchResultsInfo
 
class  CResCache
 
class  InternalException
 
struct  SHKData
 
struct  SMismatchInfo
 
struct  SMismatchResultsEntry
 
struct  SResultData
 
struct  SResults
 
struct  SSearchData
 
struct  SSRResult
 

Public Types

enum  ELevel {
  PE , PM , SE , SM ,
  EM
}
 
typedef CDbIndex::TSeqNum TSeqNum
 
typedef SResults TResults
 
typedef vector< SSRResultTSRResults
 
typedef pair< SSRResult, SSRResultTSRPairedResult
 
typedef vector< TSRPairedResultTSRPairedResults
 
typedef vector< SMismatchResultsEntryTMismatchResults
 
- 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 void search (const SSearchData &sdata, TResults &results)=0
 
- 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
 

Static Public Member Functions

static CRef< CSRSearchMakeSRSearch (CRef< CDbIndex > index, TSeqPos d=0, TSeqPos dfuzz=0)
 
- 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

static const Uint4 TSRRESULTS_INISIZE = 1000000UL
 
static const Uint4 TSRPAIRS_INISIZE = 10000UL
 
- 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

 CSRSearch (CRef< CDbIndex > index, TSeqPos d, TSeqPos dfuzz)
 
vector< TSeqPosGetQNmerPositions (TSeqPos sz) const
 
Uint4 getNMer (const CSeqVector &seq, TSeqPos pos, bool fw, bool &ambig) const
 
Uint4 getNMer (const CSeqVector &seq, TSeqPos pos, bool fw, bool &ambig, TSeqPos sub_pos, Uint1 sub_letter) const
 
pair< TSeqPos, TSeqPosPos2Index (TSeqPos pos, TSeqPos sz, SMismatchInfo &mismatch_info) const
 
void mergeResults (TSRResults &results, const TSRResults &src, Int4 step)
 
void combine (const TSRResults &results_1, const TSRResults &results_2, TSRPairedResults &results, Int4 adjust=0)
 
pair< TSeqNum, TSeqPosMapSOff (TSeqNum lid, TSeqPos loff, TSeqPos sz, bool &overlap) const
 
bool reportResults (TResults &r, Uint4 nr, TSeqPos qsz1, TSeqPos qsz2, const TSRPairedResults &results, bool fw1, bool fw2, bool mismatch1=false, bool mismatch2=false, TSeqPos mismatch_pos1=0, TSeqPos mismatch_pos2=0, Uint1 mismatch_letter1=(Uint1)'-', Uint1 mismatch_letter2=(Uint1)'-', Uint4 adjustment1=0, Uint4 adjustment2=0)
 
bool reportResults (TResults &r, Uint4 nr, TSeqPos qsz, const TSRResults &results, bool fw, bool mismatch=false, TSeqPos mismatch_pos=0, Uint1 mismatch_letter=(Uint1)'-', Uint4 adjustment=0, Uint4 pos_in_pair=0)
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Protected Attributes

unsigned long hkey_width_
 
SHKData hk_data_
 

Private Attributes

CRef< CDbIndexindex_
 
TSeqPos dmax_
 
TSeqPos dmin_
 

Detailed Description

Definition at line 46 of file sr_search.hpp.

Member Typedef Documentation

◆ TMismatchResults

Definition at line 268 of file sr_search.hpp.

◆ TResults

Definition at line 152 of file sr_search.hpp.

◆ TSeqNum

Definition at line 52 of file sr_search.hpp.

◆ TSRPairedResult

Definition at line 176 of file sr_search.hpp.

◆ TSRPairedResults

Definition at line 177 of file sr_search.hpp.

◆ TSRResults

typedef vector< SSRResult > CSRSearch::TSRResults

Definition at line 175 of file sr_search.hpp.

Member Enumeration Documentation

◆ ELevel

Enumerator
PE 
PM 
SE 
SM 
EM 

Definition at line 50 of file sr_search.hpp.

Constructor & Destructor Documentation

◆ CSRSearch()

CSRSearch::CSRSearch ( CRef< CDbIndex index,
TSeqPos  d,
TSeqPos  dfuzz 
)
inlineprotected

Definition at line 370 of file sr_search.hpp.

References ASSERT.

Member Function Documentation

◆ combine()

void CSRSearch::combine ( const TSRResults results_1,
const TSRResults results_2,
TSRPairedResults results,
Int4  adjust = 0 
)
protected

◆ getNMer() [1/2]

Uint4 CSRSearch::getNMer ( const CSeqVector seq,
TSeqPos  pos,
bool  fw,
bool ambig 
) const
protected

Definition at line 82 of file sr_search.cpp.

References ambig(), hkey_width_, letter(), result, and CSeqVector::size().

◆ getNMer() [2/2]

Uint4 CSRSearch::getNMer ( const CSeqVector seq,
TSeqPos  pos,
bool  fw,
bool ambig,
TSeqPos  sub_pos,
Uint1  sub_letter 
) const
protected

Definition at line 128 of file sr_search.cpp.

References ambig(), hkey_width_, letter(), result, and CSeqVector::size().

◆ GetQNmerPositions()

vector< TSeqPos > CSRSearch::GetQNmerPositions ( TSeqPos  sz) const
protected

Definition at line 62 of file sr_search.cpp.

References hkey_width_, and result.

◆ MakeSRSearch()

CRef< CSRSearch > CSRSearch::MakeSRSearch ( CRef< CDbIndex index,
TSeqPos  d = 0,
TSeqPos  dfuzz = 0 
)
static

Definition at line 46 of file sr_search.cpp.

Referenced by CSRSearchApplication::Run().

◆ MapSOff()

pair< TSeqNum, TSeqPos > CSRSearch::MapSOff ( TSeqNum  lid,
TSeqPos  loff,
TSeqPos  sz,
bool overlap 
) const
protected

◆ mergeResults()

void CSRSearch::mergeResults ( TSRResults results,
const TSRResults src,
Int4  step 
)
protected

Definition at line 238 of file sr_search.cpp.

References test().

◆ Pos2Index()

pair< TSeqPos, TSeqPos > CSRSearch::Pos2Index ( TSeqPos  pos,
TSeqPos  sz,
SMismatchInfo mismatch_info 
) const
protected

◆ reportResults() [1/2]

bool CSRSearch::reportResults ( TResults r,
Uint4  nr,
TSeqPos  qsz,
const TSRResults results,
bool  fw,
bool  mismatch = false,
TSeqPos  mismatch_pos = 0,
Uint1  mismatch_letter = (Uint1)'-',
Uint4  adjustment = 0,
Uint4  pos_in_pair = 0 
)
protected

Definition at line 400 of file sr_search.cpp.

References hkey_width_, MapSOff(), r(), and CSRSearch::SResults::res.

◆ reportResults() [2/2]

bool CSRSearch::reportResults ( TResults r,
Uint4  nr,
TSeqPos  qsz1,
TSeqPos  qsz2,
const TSRPairedResults results,
bool  fw1,
bool  fw2,
bool  mismatch1 = false,
bool  mismatch2 = false,
TSeqPos  mismatch_pos1 = 0,
TSeqPos  mismatch_pos2 = 0,
Uint1  mismatch_letter1 = (Uint1)'-',
Uint1  mismatch_letter2 = (Uint1)'-',
Uint4  adjustment1 = 0,
Uint4  adjustment2 = 0 
)
protected

◆ search()

virtual void CSRSearch::search ( const SSearchData sdata,
TResults results 
)
pure virtual

Implemented in CSRSearch_Impl< index_t >.

Member Data Documentation

◆ dmax_

TSeqPos CSRSearch::dmax_
private

Definition at line 425 of file sr_search.hpp.

Referenced by combine().

◆ dmin_

TSeqPos CSRSearch::dmin_
private

Definition at line 425 of file sr_search.hpp.

Referenced by combine().

◆ hk_data_

SHKData CSRSearch::hk_data_
protected

Definition at line 420 of file sr_search.hpp.

◆ hkey_width_

unsigned long CSRSearch::hkey_width_
protected

Definition at line 419 of file sr_search.hpp.

Referenced by getNMer(), GetQNmerPositions(), Pos2Index(), and reportResults().

◆ index_

CRef< CDbIndex > CSRSearch::index_
private

Definition at line 424 of file sr_search.hpp.

Referenced by combine(), and MapSOff().

◆ TSRPAIRS_INISIZE

const Uint4 CSRSearch::TSRPAIRS_INISIZE = 10000UL
static

Definition at line 163 of file sr_search.hpp.

◆ TSRRESULTS_INISIZE

const Uint4 CSRSearch::TSRRESULTS_INISIZE = 1000000UL
static

Definition at line 162 of file sr_search.hpp.


The documentation for this class was generated from the following files:
Modified on Wed Nov 29 02:19:36 2023 by modify_doxy.py rev. 669887