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

Search Toolkit Book for CSymDustMasker

Looks for low complexity parts of sequences according to the symmetric version of DUST algorithm. More...

#include <algo/dustmask/symdust.hpp>

+ Collaboration diagram for CSymDustMasker:

Classes

struct  CIupac2Ncbi2na_converter
 
struct  perfect
 
class  triplets
 

Public Types

typedef seq_t sequence_type
 Public sequence type. More...
 
typedef sequence_type::size_type size_type
 Integer size type corresponding to sequence_type. More...
 
typedef std::pair< size_type, size_typeTMaskedInterval
 Type respresenting an interval selected for masking. More...
 
typedef std::vector< TMaskedIntervalTMaskList
 Type representing a list of masked intervals. More...
 
typedef std::list< perfectperfect_list_type
 Type representing a list of perfect intervals. More...
 
typedef std::vector< Uint4thres_table_type
 Table type to store score sum thresholds for each window length. More...
 
typedef Uint1 triplet_type
 Type representing a triplet value. More...
 

Public Member Functions

 CSymDustMasker (Uint4 level=DEFAULT_LEVEL, size_type window=static_cast< size_type >(DEFAULT_WINDOW), size_type linker=static_cast< size_type >(DEFAULT_LINKER))
 Object constructor. More...
 
std::unique_ptr< TMaskListoperator() (const sequence_type &seq)
 Mask a sequence. More...
 
std::unique_ptr< TMaskListoperator() (const sequence_type &seq, size_type start, size_type stop)
 Mask a part of the sequence. More...
 
void GetMaskedLocs (objects::CSeq_id &seq_id, const sequence_type &seq, std::vector< CConstRef< objects::CSeq_loc > > &locs)
 Mask a sequence and return result as a sequence of CSeq_loc objects. More...
 
CRef< objects::CPacked_seqint > GetMaskedInts (objects::CSeq_id &seq_id, const sequence_type &seq)
 Mask a sequence and return result as a CPacked_seqint instance. More...
 

Static Public Attributes

static const Uint4 DEFAULT_LEVEL = 20
 Default value of score threshold. More...
 
static const Uint4 DEFAULT_WINDOW = 64
 Default window size. More...
 
static const Uint4 DEFAULT_LINKER = 1
 Default value of the longest distance between consequtive masked intervals at which they should be merged. More...
 
static const triplet_type TRIPLET_MASK = 0x3F
 Selects the significant bits in triplet_type. More...
 

Private Types

typedef objects::CSeqVector seq_t
 
typedef CIupac2Ncbi2na_converter convert_t
 
typedef sequence_type::const_iterator seq_citer_type
 

Private Member Functions

void save_masked_regions (TMaskList &res, size_type w, size_type start)
 

Private Attributes

Uint4 level_
 
size_type window_
 
size_type linker_
 
Uint1 low_k_
 
perfect_list_type P
 
thres_table_type thresholds_
 
convert_t converter_
 

Detailed Description

Looks for low complexity parts of sequences according to the symmetric version of DUST algorithm.

Definition at line 60 of file symdust.hpp.

Member Typedef Documentation

◆ convert_t

Definition at line 90 of file symdust.hpp.

◆ perfect_list_type

Type representing a list of perfect intervals.

Definition at line 133 of file symdust.hpp.

◆ seq_citer_type

typedef sequence_type::const_iterator CSymDustMasker::seq_citer_type
private

Definition at line 194 of file symdust.hpp.

◆ seq_t

typedef objects::CSeqVector CSymDustMasker::seq_t
private

Definition at line 89 of file symdust.hpp.

◆ sequence_type

Public sequence type.

Definition at line 95 of file symdust.hpp.

◆ size_type

typedef sequence_type::size_type CSymDustMasker::size_type

Integer size type corresponding to sequence_type.

Definition at line 97 of file symdust.hpp.

◆ thres_table_type

typedef std::vector< Uint4 > CSymDustMasker::thres_table_type

Table type to store score sum thresholds for each window length.

Definition at line 135 of file symdust.hpp.

◆ TMaskedInterval

Type respresenting an interval selected for masking.

Definition at line 99 of file symdust.hpp.

◆ TMaskList

Type representing a list of masked intervals.

Definition at line 101 of file symdust.hpp.

◆ triplet_type

Type representing a triplet value.

Definition at line 137 of file symdust.hpp.

Constructor & Destructor Documentation

◆ CSymDustMasker()

CSymDustMasker::CSymDustMasker ( Uint4  level = DEFAULT_LEVEL,
size_type  window = static_cast< size_type >( DEFAULT_WINDOW ),
size_type  linker = static_cast< size_type >( DEFAULT_LINKER ) 
)

Object constructor.

Parameters
levelscore threshold
windowmax window size
linkermax distance at which to merge consequtive masked intervals

Definition at line 170 of file symdust.cpp.

References i, level_, thresholds_, and window_.

Member Function Documentation

◆ GetMaskedInts()

CRef< objects::CPacked_seqint > CSymDustMasker::GetMaskedInts ( objects::CSeq_id &  seq_id,
const sequence_type seq 
)

Mask a sequence and return result as a CPacked_seqint instance.

Parameters
seq_idsequence id
seqthe sequence

Definition at line 309 of file symdust.cpp.

References result.

Referenced by s_CombineDustMasksWithUserProvidedMasks().

◆ GetMaskedLocs()

void CSymDustMasker::GetMaskedLocs ( objects::CSeq_id &  seq_id,
const sequence_type seq,
std::vector< CConstRef< objects::CSeq_loc > > &  locs 
)

Mask a sequence and return result as a sequence of CSeq_loc objects.

Parameters
seq_idsequence id
seqthe sequence
[out]vectorof const (smart) references to CSeq_loc

Definition at line 293 of file symdust.cpp.

◆ operator()() [1/2]

std::unique_ptr< CSymDustMasker::TMaskList > CSymDustMasker::operator() ( const sequence_type seq)

Mask a sequence.

Parameters
seqa sequence to mask
Returns
list of masked intervals

Definition at line 289 of file symdust.cpp.

◆ operator()() [2/2]

std::unique_ptr< CSymDustMasker::TMaskList > CSymDustMasker::operator() ( const sequence_type seq,
size_type  start,
size_type  stop 
)

Mask a part of the sequence.

Parameters
seqthe sequence to mask
startbeginning position of the subsequence to mask
stopending position of the subsequence to mask
Returns
list of masked intervals

Definition at line 215 of file symdust.cpp.

References converter_, done, CSymDustMasker::triplets::find_perfect(), low_k_, CSymDustMasker::triplets::needs_processing(), P, save_masked_regions(), CSymDustMasker::triplets::shift_window(), CSymDustMasker::triplets::start(), CSymDustMasker::triplets::stop(), t, thresholds_, TRIPLET_MASK, and window_.

◆ save_masked_regions()

void CSymDustMasker::save_masked_regions ( TMaskList res,
size_type  w,
size_type  start 
)
inlineprivate

Definition at line 185 of file symdust.cpp.

References b, linker_, max(), and P.

Referenced by operator()().

Member Data Documentation

◆ converter_

convert_t CSymDustMasker::converter_
private

Definition at line 331 of file symdust.hpp.

Referenced by operator()().

◆ DEFAULT_LEVEL

const Uint4 CSymDustMasker::DEFAULT_LEVEL = 20
static

Default value of score threshold.

Definition at line 103 of file symdust.hpp.

◆ DEFAULT_LINKER

const Uint4 CSymDustMasker::DEFAULT_LINKER = 1
static

Default value of the longest distance between consequtive masked intervals at which they should be merged.

Definition at line 105 of file symdust.hpp.

◆ DEFAULT_WINDOW

const Uint4 CSymDustMasker::DEFAULT_WINDOW = 64
static

Default window size.

Definition at line 104 of file symdust.hpp.

◆ level_

Uint4 CSymDustMasker::level_
private

Definition at line 322 of file symdust.hpp.

Referenced by CSymDustMasker().

◆ linker_

size_type CSymDustMasker::linker_
private

Definition at line 324 of file symdust.hpp.

Referenced by save_masked_regions().

◆ low_k_

Uint1 CSymDustMasker::low_k_
private

Definition at line 326 of file symdust.hpp.

Referenced by operator()(), and CSymDustMasker::triplets::shift_window().

◆ P

perfect_list_type CSymDustMasker::P
private

◆ thresholds_

thres_table_type CSymDustMasker::thresholds_
private

Definition at line 329 of file symdust.hpp.

Referenced by CSymDustMasker(), CSymDustMasker::triplets::find_perfect(), and operator()().

◆ TRIPLET_MASK

const triplet_type CSymDustMasker::TRIPLET_MASK = 0x3F
static

Selects the significant bits in triplet_type.

Definition at line 140 of file symdust.hpp.

Referenced by operator()().

◆ window_

size_type CSymDustMasker::window_
private

Definition at line 323 of file symdust.hpp.

Referenced by CSymDustMasker(), and operator()().


The documentation for this class was generated from the following files:
Modified on Sat Mar 02 10:54:55 2024 by modify_doxy.py rev. 669887