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

Search Toolkit Book for CSeqMaskerIstatOBinary

Read counts information from a binary file in optimized format. More...

#include <algo/winmask/seq_masker_istat_obinary.hpp>

+ Inheritance diagram for CSeqMaskerIstatOBinary:
+ Collaboration diagram for CSeqMaskerIstatOBinary:

Classes

class  Exception
 Exceptions that CSeqMaskerIstatOBinary might throw. More...
 

Public Member Functions

 CSeqMaskerIstatOBinary (const string &name, Uint4 arg_threshold, Uint4 arg_textend, Uint4 arg_max_count, Uint4 arg_use_max_count, Uint4 arg_min_count, Uint4 arg_use_min_count, bool arg_use_ba, Uint4 skip=0)
 Object constructor. More...
 
virtual ~CSeqMaskerIstatOBinary ()
 Object destructor. More...
 
virtual Uint1 UnitSize () const
 Get the value of the unit size. More...
 
- Public Member Functions inherited from 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)
 Object constructor. More...
 
virtual ~CSeqMaskerIstat ()
 Object destructor. More...
 
Uint4 operator[] (Uint4 unit) const
 Look up the count value of a given unit. More...
 
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...
 
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...
 
void SetMaxCount (Uint4 mc)
 
Uint4 GetMaxCount () const
 
void SetCountMap (std::vector< double > const &cm)
 
std::vector< double > constGetCountMap () const
 
- 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
 

Protected Member Functions

virtual Uint4 at (Uint4 unit) const
 Get the count of the given unit. More...
 
virtual Uint4 trueat (Uint4 unit) const
 Get the true count for an n-mer. More...
 
- Protected Member Functions inherited from CSeqMaskerIstat
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

Uint4 readWord (CNcbiIstream &is) const
 

Private Attributes

CSeqMaskerUsetHash uset
 

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 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)
 
- Public Attributes inherited from CSeqMaskerIstat
Uint8 total_
 
- 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

Read counts information from a binary file in optimized format.

Definition at line 48 of file seq_masker_istat_obinary.hpp.

Constructor & Destructor Documentation

◆ CSeqMaskerIstatOBinary()

CSeqMaskerIstatOBinary::CSeqMaskerIstatOBinary ( const string name,
Uint4  arg_threshold,
Uint4  arg_textend,
Uint4  arg_max_count,
Uint4  arg_use_max_count,
Uint4  arg_min_count,
Uint4  arg_use_min_count,
bool  arg_use_ba,
Uint4  skip = 0 
)
explicit

Object constructor.

arg_threshold, arg_textend, arg_max_count, and arg_min_count, if non zero, override the values in the input file.

Parameters
namefile name
arg_thresholdT_threshold
arg_textendT_extend
arg_max_countT_high
arg_use_max_countvalue to use for units with count > T_high
arg_min_countT_low
arg_use_min_countvalue to use for units with count < T_low
arg_use_bause bit array optimization if available
skipskip this many bytes in the beginning

Definition at line 70 of file seq_masker_istat_obinary.cpp.

References CSeqMaskerUsetHash::add_ht_info(), CSeqMaskerUsetHash::add_vt_info(), data, ERR_POST, CSeqMaskerIstat::get_max_count(), CSeqMaskerIstat::get_min_count(), CSeqMaskerIstat::get_textend(), CSeqMaskerIstat::get_threshold(), CSeqMaskerIstat::get_use_max_count(), CSeqMaskerIstat::get_use_min_count(), NCBI_THROW, readWord(), CSeqMaskerIstat::set_max_count(), CSeqMaskerIstat::set_min_count(), CSeqMaskerIstat::set_optimization_data(), CSeqMaskerIstat::set_textend(), CSeqMaskerIstat::set_threshold(), CSeqMaskerIstat::set_use_max_count(), CSeqMaskerIstat::set_use_min_count(), CSeqMaskerUsetHash::setUnitSize(), CSeqMaskerIstat::unit_size, uset, and Warning().

◆ ~CSeqMaskerIstatOBinary()

virtual CSeqMaskerIstatOBinary::~CSeqMaskerIstatOBinary ( )
inlinevirtual

Object destructor.

Definition at line 107 of file seq_masker_istat_obinary.hpp.

Member Function Documentation

◆ at()

Uint4 CSeqMaskerIstatOBinary::at ( Uint4  unit) const
protectedvirtual

Get the count of the given unit.

Parameters
unitthe unit to look up
Returns
the count value for the unit

Implements CSeqMaskerIstat.

Definition at line 219 of file seq_masker_istat_obinary.cpp.

References CSeqMaskerUsetHash::get_info(), CSeqMaskerIstat::get_max_count(), CSeqMaskerIstat::get_min_count(), CSeqMaskerIstat::get_use_max_count(), CSeqMaskerIstat::get_use_min_count(), and uset.

◆ readWord()

Uint4 CSeqMaskerIstatOBinary::readWord ( CNcbiIstream is) const
private

Definition at line 58 of file seq_masker_istat_obinary.cpp.

References NCBI_THROW, and result.

Referenced by CSeqMaskerIstatOBinary().

◆ trueat()

Uint4 CSeqMaskerIstatOBinary::trueat ( Uint4  unit) const
protectedvirtual

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

Implements CSeqMaskerIstat.

Definition at line 215 of file seq_masker_istat_obinary.cpp.

References CSeqMaskerUsetHash::get_info(), and uset.

◆ UnitSize()

virtual Uint1 CSeqMaskerIstatOBinary::UnitSize ( ) const
inlinevirtual

Get the value of the unit size.

Returns
unit size

Implements CSeqMaskerIstat.

Definition at line 113 of file seq_masker_istat_obinary.hpp.

References CSeqMaskerUsetHash::UnitSize(), and uset.

Member Data Documentation

◆ uset

CSeqMaskerUsetHash CSeqMaskerIstatOBinary::uset
private

Definition at line 146 of file seq_masker_istat_obinary.hpp.

Referenced by at(), CSeqMaskerIstatOBinary(), trueat(), and UnitSize().


The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:08:30 2024 by modify_doxy.py rev. 669887