NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CSeqMasker Class Reference

Search Toolkit Book for CSeqMasker

Main interface to window based masker functionality. More...

#include <algo/winmask/seq_masker.hpp>

+ Collaboration diagram for CSeqMasker:

Classes

class  CSeqMaskerException
 Represents different error situations that can occur in the masking process. More...
 
struct  mitem
 

Public Types

typedef pair< TSeqPos, TSeqPosTMaskedInterval
 Type representing a masked interval within a sequence. More...
 
typedef vector< TMaskedIntervalTMaskList
 A type representing the total of masking information about a sequence. More...
 

Public Member Functions

 CSeqMasker (const string &lstat_name, Uint1 arg_window_size, Uint4 arg_window_step, Uint1 arg_unit_step, Uint4 arg_textend, Uint4 arg_cutoff_score, Uint4 arg_max_score, Uint4 arg_min_score, Uint4 arg_set_max_score, Uint4 arg_set_min_score, bool arg_merge_pass, Uint4 arg_merge_cutoff_score, Uint4 arg_abs_merge_cutoff_dist, Uint4 arg_mean_merge_cutoff_dist, Uint1 arg_merge_unit_step, const string &arg_trigger, Uint1 tmin_count, bool arg_discontig, Uint4 arg_pattern, bool arg_use_ba, double min_pct=-1.0, double extend_pct=-1.0, double thres_pct=-1.0, double max_pct=-1.0)
 Object constructor. More...
 
 ~CSeqMasker ()
 Object destructor. More...
 
TMaskListoperator() (const objects::CSeqVector &data) const
 Sequence masking operator. More...
 

Static Public Member Functions

static void MergeMaskInfo (TMaskList *dest, const TMaskList *src)
 Merge together two result lists. More...
 

Static Public Attributes

static CSeqMaskerVersion AlgoVersion
 Version of window masking algorithm. More...
 

Private Types

enum  { eTrigger_Mean = 0 , eTrigger_Min }
 
typedef list< mitemTMList
 

Private Member Functions

TMaskListDoMask (const objects::CSeqVector &data, TSeqPos start, TSeqPos end) const
 
double MergeAvg (TMList::iterator mi, const TMList::iterator &umi, Uint4 unit_size) const
 
void Merge (TMList &m, TMList::iterator mi, TMList &um, TMList::iterator &umi) const
 

Private Attributes

CRef< CSeqMaskerIstatustat
 
CSeqMaskerScorescore
 
CSeqMaskerScorescore_p3
 
CSeqMaskerScoretrigger_score
 
Uint1 window_size
 
Uint4 window_step
 
Uint1 unit_step
 
bool merge_pass
 
Uint4 merge_cutoff_score
 
Uint4 abs_merge_cutoff_dist
 
Uint4 mean_merge_cutoff_dist
 
Uint1 merge_unit_step
 
enum CSeqMasker:: { ... }  trigger
 
bool discontig
 
Uint4 pattern
 

Friends

struct CSeqMasker::mitem
 

Detailed Description

Main interface to window based masker functionality.

Definition at line 52 of file seq_masker.hpp.

Member Typedef Documentation

◆ TMaskedInterval

Type representing a masked interval within a sequence.

If A is an object of type TMaskedInterval, then A.first is the offset (starting from 0) of the beginning of the interval; A.second is the offset of the end of the interval.

Definition at line 67 of file seq_masker.hpp.

◆ TMaskList

A type representing the total of masking information about a sequence.

Definition at line 74 of file seq_masker.hpp.

◆ TMList

typedef list< mitem > CSeqMasker::TMList
private

Definition at line 234 of file seq_masker.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
eTrigger_Mean 

Using mean of unit scores in the window.

eTrigger_Min 

Using min score of k unit in the window.

Definition at line 354 of file seq_masker.hpp.

Constructor & Destructor Documentation

◆ CSeqMasker()

CSeqMasker::CSeqMasker ( const string lstat_name,
Uint1  arg_window_size,
Uint4  arg_window_step,
Uint1  arg_unit_step,
Uint4  arg_textend,
Uint4  arg_cutoff_score,
Uint4  arg_max_score,
Uint4  arg_min_score,
Uint4  arg_set_max_score,
Uint4  arg_set_min_score,
bool  arg_merge_pass,
Uint4  arg_merge_cutoff_score,
Uint4  arg_abs_merge_cutoff_dist,
Uint4  arg_mean_merge_cutoff_dist,
Uint1  arg_merge_unit_step,
const string arg_trigger,
Uint1  tmin_count,
bool  arg_discontig,
Uint4  arg_pattern,
bool  arg_use_ba,
double  min_pct = -1.0,
double  extend_pct = -1.0,
double  thres_pct = -1.0,
double  max_pct = -1.0 
)

Object constructor.

Parameters to the constructor determine the behaviour of the window based masking procedure.

Parameters
lstat_namethe name of the file containing length statistics
arg_window_sizethe window size in bps
arg_window_stepthe window step
arg_unit_stepthe unit step
arg_textendthe score above which it is allowed to keep masking
arg_cutoff_scorethe unit score triggering the masking
arg_max_scoremaximum allowed unit score
arg_min_scoreminimum allowed unit score
arg_set_max_scorescore to use for units exceeding max_score
arg_set_min_scorescore to use for units below min_score
arg_merge_passwhether or not to perform an interval merging pass
arg_merge_cutoff_scorecombined average score at which intervals should be merged
arg_abs_merge_cutoff_distmaximum distance between intervals at which they can be merged unconditionally
arg_mean_merge_cutoff_distmaximum distance between intervals at which they can be merged if they satisfy arg_merge_cutoff_score threshold
arg_merge_unit_stepunit step to use for interval merging
arg_triggerdetermines which method to use to trigger masking
tmin_countif arg_trigger is "min" then determines how many of the units in a window should be above the score threshold in order to trigger masking
arg_discontigwhether or not to use discontiguous units
arg_patternbase pattern to form discontiguous units
arg_use_bause bit array optimization, if available

Definition at line 71 of file seq_masker.cpp.

References eTrigger_Min, int, NCBI_THROW, score, score_p3, trigger, trigger_score, CSeqMaskerIstat::UnitSize(), ustat, and window_size.

◆ ~CSeqMasker()

CSeqMasker::~CSeqMasker ( )

Object destructor.

Definition at line 155 of file seq_masker.cpp.

References score, score_p3, and trigger_score.

Member Function Documentation

◆ DoMask()

CSeqMasker::TMaskList * CSeqMasker::DoMask ( const objects::CSeqVector &  data,
TSeqPos  start,
TSeqPos  end 
) const
private

◆ Merge()

void CSeqMasker::Merge ( TMList m,
TMList::iterator  mi,
TMList um,
TMList::iterator &  umi 
) const
private

Definition at line 426 of file seq_masker.cpp.

References tmp.

Referenced by DoMask().

◆ MergeAvg()

double CSeqMasker::MergeAvg ( TMList::iterator  mi,
const TMList::iterator &  umi,
Uint4  unit_size 
) const
private

Definition at line 412 of file seq_masker.cpp.

References merge_unit_step, N, and tmp.

Referenced by DoMask().

◆ MergeMaskInfo()

void CSeqMasker::MergeMaskInfo ( TMaskList dest,
const TMaskList src 
)
static

Merge together two result lists.

Used to merge results lists obtained from winmask and dust algorithms.

Parameters
destthis list will contain the merged data
srcthe other results list

Definition at line 508 of file seq_masker.cpp.

References si.

Referenced by CWinMaskDemoApplication::Run(), and CWinMaskApplication::Run().

◆ operator()()

CSeqMasker::TMaskList * CSeqMasker::operator() ( const objects::CSeqVector &  data) const

Sequence masking operator.

seq_masker objects are function objects with. Main processing is done by () operator.

Parameters
datathe original sequence data in iupacna format
Returns
pointer to the list of masked intervals

Definition at line 165 of file seq_masker.cpp.

References data, and DoMask().

Friends And Related Function Documentation

◆ CSeqMasker::mitem

friend struct CSeqMasker::mitem
friend

Definition at line 229 of file seq_masker.hpp.

Member Data Documentation

◆ abs_merge_cutoff_dist

Uint4 CSeqMasker::abs_merge_cutoff_dist
private

Definition at line 333 of file seq_masker.hpp.

Referenced by DoMask().

◆ AlgoVersion

CSeqMaskerVersion CSeqMasker::AlgoVersion
static

Version of window masking algorithm.

Definition at line 57 of file seq_masker.hpp.

Referenced by CWinMaskApplication::CWinMaskApplication().

◆ discontig

bool CSeqMasker::discontig
private

Definition at line 363 of file seq_masker.hpp.

Referenced by DoMask(), and CSeqMasker::mitem::mitem().

◆ mean_merge_cutoff_dist

Uint4 CSeqMasker::mean_merge_cutoff_dist
private

Definition at line 339 of file seq_masker.hpp.

Referenced by DoMask().

◆ merge_cutoff_score

Uint4 CSeqMasker::merge_cutoff_score
private

Definition at line 327 of file seq_masker.hpp.

Referenced by DoMask().

◆ merge_pass

bool CSeqMasker::merge_pass
private

Definition at line 321 of file seq_masker.hpp.

Referenced by DoMask().

◆ merge_unit_step

Uint1 CSeqMasker::merge_unit_step
private

Definition at line 349 of file seq_masker.hpp.

Referenced by MergeAvg(), and CSeqMasker::mitem::mitem().

◆ pattern

Uint4 CSeqMasker::pattern
private

Definition at line 368 of file seq_masker.hpp.

Referenced by DoMask(), and CSeqMasker::mitem::mitem().

◆ score

CSeqMaskerScore* CSeqMasker::score
private

Definition at line 285 of file seq_masker.hpp.

Referenced by CSeqMasker(), DoMask(), CSeqMasker::mitem::mitem(), and ~CSeqMasker().

◆ score_p3

CSeqMaskerScore* CSeqMasker::score_p3
private

Definition at line 290 of file seq_masker.hpp.

Referenced by CSeqMasker(), CSeqMasker::mitem::mitem(), and ~CSeqMasker().

◆ 

enum { ... } CSeqMasker::trigger

Referenced by CSeqMasker(), and DoMask().

◆ trigger_score

CSeqMaskerScore* CSeqMasker::trigger_score
private

Definition at line 295 of file seq_masker.hpp.

Referenced by CSeqMasker(), DoMask(), and ~CSeqMasker().

◆ unit_step

Uint1 CSeqMasker::unit_step
private

Definition at line 316 of file seq_masker.hpp.

Referenced by DoMask().

◆ ustat

CRef< CSeqMaskerIstat > CSeqMasker::ustat
private

Definition at line 280 of file seq_masker.hpp.

Referenced by CSeqMasker(), DoMask(), and CSeqMasker::mitem::mitem().

◆ window_size

Uint1 CSeqMasker::window_size
private

Definition at line 300 of file seq_masker.hpp.

Referenced by CSeqMasker(), DoMask(), and CSeqMasker::mitem::mitem().

◆ window_step

Uint4 CSeqMasker::window_step
private

Definition at line 308 of file seq_masker.hpp.

Referenced by DoMask().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:43 2024 by modify_doxy.py rev. 669887