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

Search Toolkit Book for CSeqMaskerIstat

Defines an interface for accessing the unit counts information. More...

#include <algo/winmask/seq_masker_istat.hpp>

+ Inheritance diagram for CSeqMaskerIstat:
+ Collaboration diagram for CSeqMaskerIstat:

Classes

struct  optimization_data
 Structure containing information about optimization parameters used. More...
 

Public Member Functions

 CSeqMaskerIstat (Uint4 arg_threshold, Uint4 arg_textend, Uint4 arg_max_count, Uint4 arg_use_max_count, Uint4 arg_min_count, Uint4 arg_use_min_count)
 Object constructor. More...
 
virtual ~CSeqMaskerIstat ()
 Object destructor. More...
 
Uint4 operator[] (Uint4 unit) const
 Look up the count value of a given unit. More...
 
virtual Uint1 UnitSize () const =0
 Get the unit size. More...
 
const CSeqMaskerWindow::TUnit AmbigUnit () const
 Get the value of the unit used to represent an ambuguity. More...
 
Uint4 get_threshold () const
 Get the value of T_threshold. More...
 
Uint4 get_textend () const
 Get the value of T_extend. More...
 
const optimization_dataget_optimization_data () const
 Get the data structure optimization parameters. More...
 
CSeqMaskerVersion constGetStatAlgoVersion () const
 Return the version of the algorithm used to generate counts. More...
 
void SetStatAlgoVersion (CSeqMaskerVersion const &v)
 Set the version of the algorithm used to generate counts. More...
 
virtual Uint4 trueat (Uint4 unit) const =0
 Get the true count for an n-mer. More...
 
Uint4 get_max_count () const
 Get the current value of T_high. More...
 
Uint4 get_use_max_count () const
 Get the count value for units with actual counts above T_high. More...
 
Uint4 get_min_count () const
 Get the value of T_low. More...
 
Uint4 get_use_min_count () const
 Get the count value for units with actual counts below T_low. More...
 
string constGetMetaData () const
 Return the metadata string. More...
 
string constGetFmtEncoding () const
 Return the encoding of the source statistics file. More...
 
CComponentVersionInfo constGetFmtVersion () const
 Return the format version of the source statistics file. More...
 
void SetMetaData (string const &md)
 Set metadata string. 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
 

Public Attributes

Uint8 total_
 

Protected Member Functions

virtual Uint4 at (Uint4 unit) const =0
 Get the unit count of a given unit. More...
 
void set_threshold (Uint4 arg_threshold)
 Set the value of T_threshold. More...
 
void set_textend (Uint4 arg_textend)
 Set the value of T_extend. More...
 
void set_max_count (Uint4 arg_max_count)
 Set the value of T_high. More...
 
void set_use_max_count (Uint4 arg_use_max_count)
 Set the count value for units with actual counts above T_high. More...
 
void set_min_count (Uint4 arg_min_count)
 Set the value of T_low. More...
 
void set_use_min_count (Uint4 arg_use_min_count)
 Set the count value for units with actual counts below T_low. More...
 
void set_unit_size (Uint1 arg_unit_size)
 Set the unit size. More...
 
void set_ambig_unit (const CSeqMaskerWindow::TUnit &arg_ambig_unit)
 Set the ambiguity unit value. More...
 
void set_optimization_data (const optimization_data &opt_data)
 Set optimization parameters. More...
 
void SetFmtEncoding (string const &e)
 Set the statistics file format encoding. More...
 
void SetFmtVersion (string const &name, int major, int minor, int patch)
 Set the statistics file format version. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Private Member Functions

Provide reference semantics for CSeqMaskerOstat.
 CSeqMaskerIstat (const CSeqMaskerIstat &)
 
CSeqMaskerIstatoperator= (const CSeqMaskerIstat &)
 

Private Attributes

Uint4 threshold
 
Uint4 textend
 
Uint4 max_count
 
Uint4 use_max_count
 
Uint4 min_count
 
Uint4 use_min_count
 
Uint1 unit_size
 
string metadata
 
string fmt_encoding
 
std::auto_ptr< CComponentVersionInfofmt_version
 Format version of the statistics file from which the data was read. More...
 
CSeqMaskerWindow::TUnit ambig_unit
 
optimization_data opt_data_
 
CSeqMaskerVersion fmt_gen_algo_ver
 version of the algorithm used to generate counts More...
 

Additional Inherited Members

- 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 CAtomicCounter TCounter
 Counter type is CAtomiCounter. More...
 
typedef TCounter::TValue TCount
 Alias for value type of counter. More...
 
- Static Public Member Functions inherited from CObject
static NCBI_NORETURN void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_NORETURN 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...
 

Detailed Description

Defines an interface for accessing the unit counts information.

Definition at line 52 of file seq_masker_istat.hpp.

Constructor & Destructor Documentation

CSeqMaskerIstat::CSeqMaskerIstat ( Uint4  arg_threshold,
Uint4  arg_textend,
Uint4  arg_max_count,
Uint4  arg_use_max_count,
Uint4  arg_min_count,
Uint4  arg_use_min_count 
)
inlineexplicit

Object constructor.

Parameters
arg_thresholdthe value of t_threshold to use instead of the one supplied in the unit counts file
arg_textendthe value of t_textend to use instead of the one supplied in the unit counts file
arg_max_countthe value of t_high to use instead of the one supplied in the unit counts file
arg_use_max_countthe count to use if the unit count is greater than t_high
arg_min_countthe value of t_low to use instead of the one supplied in the unit counts file
arg_use_min_countthe count to use if the unit count is less than t_low

Definition at line 92 of file seq_masker_istat.hpp.

References total_.

virtual CSeqMaskerIstat::~CSeqMaskerIstat ( )
inlinevirtual

Object destructor.

Definition at line 112 of file seq_masker_istat.hpp.

References CSeqMaskerIstat::optimization_data::cba_, and opt_data_.

CSeqMaskerIstat::CSeqMaskerIstat ( const CSeqMaskerIstat )
private

Member Function Documentation

const CSeqMaskerWindow::TUnit CSeqMaskerIstat::AmbigUnit ( ) const
inline

Get the value of the unit used to represent an ambuguity.

Returns
ambiguity unit value

Definition at line 135 of file seq_masker_istat.hpp.

References ambig_unit.

Referenced by CSeqMasker::mitem::mitem().

virtual Uint4 CSeqMaskerIstat::at ( Uint4  unit) const
protectedpure virtual

Get the unit count of a given unit.

Derived classes should override this function to provide access to the unit counts.

Parameters
unitthe unit value being looked up
Returns
count corrseponding to unit

Implemented in CSeqMaskerIstatOBinary, CSeqMaskerIstatOAscii, CSeqMaskerIstatAscii, and CSeqMaskerIstatBin.

Referenced by operator[]().

Uint4 CSeqMaskerIstat::get_max_count ( ) const
inline
Uint4 CSeqMaskerIstat::get_min_count ( ) const
inline
const optimization_data* CSeqMaskerIstat::get_optimization_data ( ) const
inline

Get the data structure optimization parameters.

Returns
pointer to optimization structure, if it is initialized, NULL otherwise

Definition at line 155 of file seq_masker_istat.hpp.

References CSeqMaskerIstat::optimization_data::cba_, and opt_data_.

Referenced by CSeqMasker::DoMask().

Uint4 CSeqMaskerIstat::get_textend ( ) const
inline
Uint4 CSeqMaskerIstat::get_threshold ( ) const
inline
Uint4 CSeqMaskerIstat::get_use_max_count ( ) const
inline
Uint4 CSeqMaskerIstat::get_use_min_count ( ) const
inline
string const& CSeqMaskerIstat::GetFmtEncoding ( ) const
inline

Return the encoding of the source statistics file.

Definition at line 288 of file seq_masker_istat.hpp.

References fmt_encoding.

CComponentVersionInfo const* CSeqMaskerIstat::GetFmtVersion ( ) const
inline

Return the format version of the source statistics file.

Definition at line 291 of file seq_masker_istat.hpp.

References fmt_version.

string const& CSeqMaskerIstat::GetMetaData ( ) const
inline

Return the metadata string.

Definition at line 285 of file seq_masker_istat.hpp.

References metadata.

Referenced by CWinMaskCountsConverter::operator()().

CSeqMaskerVersion const& CSeqMaskerIstat::GetStatAlgoVersion ( ) const
inline

Return the version of the algorithm used to generate counts.

Definition at line 159 of file seq_masker_istat.hpp.

References fmt_gen_algo_ver.

Referenced by CWinMaskCountsConverter::operator()().

CSeqMaskerIstat& CSeqMaskerIstat::operator= ( const CSeqMaskerIstat )
private
Uint4 CSeqMaskerIstat::operator[] ( Uint4  unit) const
inline

Look up the count value of a given unit.

Parameters
unitthe target unit
Returns
the count of the unit

Definition at line 119 of file seq_masker_istat.hpp.

References at(), and total_.

void CSeqMaskerIstat::set_ambig_unit ( const CSeqMaskerWindow::TUnit arg_ambig_unit)
inlineprotected

Set the ambiguity unit value.

Parameters
arg_ambig_unitnew ambiguity unit

Definition at line 316 of file seq_masker_istat.hpp.

References ambig_unit.

Referenced by CSeqMaskerIstatAscii::CSeqMaskerIstatAscii().

void CSeqMaskerIstat::set_max_count ( Uint4  arg_max_count)
inlineprotected
void CSeqMaskerIstat::set_min_count ( Uint4  arg_min_count)
inlineprotected
void CSeqMaskerIstat::set_optimization_data ( const optimization_data opt_data)
inlineprotected

Set optimization parameters.

Constructor of the derived class is responsible for this.

Parameters
opt_datanew optimization parameters

Definition at line 327 of file seq_masker_istat.hpp.

References opt_data_.

Referenced by CSeqMaskerIstatOBinary::CSeqMaskerIstatOBinary().

void CSeqMaskerIstat::set_textend ( Uint4  arg_textend)
inlineprotected
void CSeqMaskerIstat::set_threshold ( Uint4  arg_threshold)
inlineprotected

Set the value of T_threshold.

Parameters
arg_thresholdnew T_threshold value

Definition at line 201 of file seq_masker_istat.hpp.

References threshold.

Referenced by CSeqMaskerIstatAscii::CSeqMaskerIstatAscii(), CSeqMaskerIstatBin::CSeqMaskerIstatBin(), CSeqMaskerIstatOAscii::CSeqMaskerIstatOAscii(), and CSeqMaskerIstatOBinary::CSeqMaskerIstatOBinary().

void CSeqMaskerIstat::set_unit_size ( Uint1  arg_unit_size)
inlineprotected

Set the unit size.

Parameters
arg_unit_sizenew unit size value

Definition at line 309 of file seq_masker_istat.hpp.

References unit_size.

void CSeqMaskerIstat::set_use_max_count ( Uint4  arg_use_max_count)
inlineprotected

Set the count value for units with actual counts above T_high.

Parameters
arg_use_max_countnew value to use for units with counts > T_high

Definition at line 243 of file seq_masker_istat.hpp.

References use_max_count.

Referenced by CSeqMaskerIstatAscii::CSeqMaskerIstatAscii(), CSeqMaskerIstatBin::CSeqMaskerIstatBin(), CSeqMaskerIstatOAscii::CSeqMaskerIstatOAscii(), and CSeqMaskerIstatOBinary::CSeqMaskerIstatOBinary().

void CSeqMaskerIstat::set_use_min_count ( Uint4  arg_use_min_count)
inlineprotected

Set the count value for units with actual counts below T_low.

Parameters
arg_use_min_countnew value to use for units with counts < T_low

Definition at line 302 of file seq_masker_istat.hpp.

References use_min_count.

Referenced by CSeqMaskerIstatAscii::CSeqMaskerIstatAscii(), CSeqMaskerIstatBin::CSeqMaskerIstatBin(), CSeqMaskerIstatOAscii::CSeqMaskerIstatOAscii(), and CSeqMaskerIstatOBinary::CSeqMaskerIstatOBinary().

void CSeqMaskerIstat::SetFmtEncoding ( string const e)
inlineprotected

Set the statistics file format encoding.

Definition at line 338 of file seq_masker_istat.hpp.

References fmt_encoding.

void CSeqMaskerIstat::SetFmtVersion ( string const name,
int  major,
int  minor,
int  patch 
)
inlineprotected

Set the statistics file format version.

Definition at line 341 of file seq_masker_istat.hpp.

References fmt_version.

void CSeqMaskerIstat::SetMetaData ( string const md)
inline

Set metadata string.

Definition at line 333 of file seq_masker_istat.hpp.

References metadata.

Referenced by CSeqMaskerIstatFactory::create().

void CSeqMaskerIstat::SetStatAlgoVersion ( CSeqMaskerVersion const v)
inline

Set the version of the algorithm used to generate counts.

Definition at line 164 of file seq_masker_istat.hpp.

References fmt_gen_algo_ver.

Referenced by CSeqMaskerIstatFactory::create().

virtual Uint4 CSeqMaskerIstat::trueat ( Uint4  unit) const
pure virtual

Get the true count for an n-mer.

Parameters
unitthe n-mer value
Returns
n-mer count not corrected for t_low and t_high values

Implemented in CSeqMaskerIstatOBinary, CSeqMaskerIstatOAscii, CSeqMaskerIstatAscii, and CSeqMaskerIstatBin.

Referenced by CWinMaskCountsConverter::operator()().

virtual Uint1 CSeqMaskerIstat::UnitSize ( ) const
pure virtual

Member Data Documentation

CSeqMaskerWindow::TUnit CSeqMaskerIstat::ambig_unit
private

Definition at line 369 of file seq_masker_istat.hpp.

Referenced by AmbigUnit(), and set_ambig_unit().

string CSeqMaskerIstat::fmt_encoding
private

Definition at line 364 of file seq_masker_istat.hpp.

Referenced by GetFmtEncoding(), and SetFmtEncoding().

CSeqMaskerVersion CSeqMaskerIstat::fmt_gen_algo_ver
private

version of the algorithm used to generate counts

Definition at line 374 of file seq_masker_istat.hpp.

Referenced by GetStatAlgoVersion(), and SetStatAlgoVersion().

std::auto_ptr< CComponentVersionInfo > CSeqMaskerIstat::fmt_version
private

Format version of the statistics file from which the data was read.

Definition at line 367 of file seq_masker_istat.hpp.

Referenced by GetFmtVersion(), and SetFmtVersion().

Uint4 CSeqMaskerIstat::max_count
private

Definition at line 357 of file seq_masker_istat.hpp.

Referenced by get_max_count(), and set_max_count().

string CSeqMaskerIstat::metadata
private

Definition at line 363 of file seq_masker_istat.hpp.

Referenced by GetMetaData(), and SetMetaData().

Uint4 CSeqMaskerIstat::min_count
private

Definition at line 359 of file seq_masker_istat.hpp.

Referenced by get_min_count(), and set_min_count().

optimization_data CSeqMaskerIstat::opt_data_
private
Uint4 CSeqMaskerIstat::textend
private

Definition at line 356 of file seq_masker_istat.hpp.

Referenced by get_textend(), and set_textend().

Uint4 CSeqMaskerIstat::threshold
private

Definition at line 355 of file seq_masker_istat.hpp.

Referenced by get_threshold(), and set_threshold().

Uint8 CSeqMaskerIstat::total_
mutable

Definition at line 168 of file seq_masker_istat.hpp.

Referenced by CSeqMaskerIstat(), CSeqMasker::DoMask(), and operator[]().

Uint1 CSeqMaskerIstat::unit_size
private
Uint4 CSeqMaskerIstat::use_max_count
private

Definition at line 358 of file seq_masker_istat.hpp.

Referenced by get_use_max_count(), and set_use_max_count().

Uint4 CSeqMaskerIstat::use_min_count
private

Definition at line 360 of file seq_masker_istat.hpp.

Referenced by get_use_min_count(), and set_use_min_count().


The documentation for this class was generated from the following file:
Modified on Mon Sep 26 17:42:21 2016 by modify_doxy.py rev. 506947