NCBI C++ ToolKit
seq_masker_window_pattern.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: seq_masker_window_pattern.hpp 33815 2007-05-04 17:18:18Z kazimird $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Aleksandr Morgulis
27  *
28  * File Description:
29  * Header file for CSeqMaskerWindowPattern class.
30  *
31  */
32 
33 #ifndef C_SEQ_MASKER_WINDOW_PATTERN_H
34 #define C_SEQ_MASKER_WINDOW_PATTERN_H
35 
37 
39 
40 
41 /**
42  **\brief Window iterator used for discontiguous units.
43  **
44  **/
46 {
47 public:
48 
49  /**
50  **\brief Object constructor.
51  **
52  **\param arg_data the base sequence
53  **\param arg_unit_size the value of the unit size to use
54  **\param arg_window_size the value of the window size to use
55  **\param window_step the number of bases by which the window
56  ** advances when operator++() is applied
57  **\param arg_pattern pattern to construct discontiguous units
58  **\param arg_unit_step the distance between consequtive units
59  ** in a window
60  **
61  **/
62  CSeqMaskerWindowPattern( const objects::CSeqVector & arg_data,
63  Uint1 arg_unit_size, Uint1 arg_window_size,
64  Uint4 window_step, Uint4 arg_pattern,
65  Uint1 arg_unit_step = 1,
66  TSeqPos start = 0, TSeqPos stop = 0 );
67 
68  /**
69  **\brief Object destructor.
70  **
71  **/
73 
74 protected:
75 
76  /**
77  **\brief Slide the window by the given number of bases.
78  **
79  **\param step the number of bases by which the window should
80  ** slide
81  **
82  **/
83  virtual void Advance( Uint4 step );
84 
85  /**
86  **\brief Return the compressed value of discontiguous unit
87  ** starting at the given position.
88  **
89  **\param ustart starting position of the unit
90  **\param result the value of the discontiguous unit
91  **\return true, if result is valid, i.e. the unit does not
92  ** contain ambiguities at unmasked positions; false
93  ** otherwise
94  **
95  **/
96  bool MakeUnit( Uint4 ustart, TUnit & result ) const;
97 
98  /**\internal
99  **\brief Fill the array of units for a window that starts
100  ** at the given position.
101  **
102  **\param winstart the start of the window
103  **
104  **/
105  void FillWindow( Uint4 winstart );
106 
107 private:
108 
109  /**\internal
110  **\brief Pattern to construct discontiguous units.
111  **/
113 };
114 
116 
117 #endif
Window iterator used for discontiguous units.
virtual ~CSeqMaskerWindowPattern()
Object destructor.
Sliding window skipping over the ambiguities.
virtual void Advance(Uint4 step)
Slide the window by the given number of bases.
void FillWindow(Uint4 winstart)
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
uint8_t Uint1
1-byte (8-bit) unsigned integer
Definition: ncbitype.h:99
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_XALGOWINMASK_EXPORT
Definition: ncbi_export.h:1033
else result
Definition: token2.c:20
Modified on Tue May 28 05:52:40 2024 by modify_doxy.py rev. 669887