multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
probopts.hh
1 /* <LICENSE>
2 License for the MULTOVL multiple genomic overlap tools
3 
4 Copyright (c) 2007-2012, Dr Andras Aszodi,
5 Campus Science Support Facilities GmbH (CSF),
6 Dr-Bohr-Gasse 3, A-1030 Vienna, Austria, Europe.
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions are
11 met:
12 
13  * Redistributions of source code must retain the above copyright notice,
14  this list of conditions and the following disclaimer.
15  * Redistributions in binary form must reproduce the above copyright notice,
16  this list of conditions and the following disclaimer in the documentation
17  and/or other materials provided with the distribution.
18  * Neither the name of the Campus Science Support Facilities GmbH
19  nor the names of its contributors may be used to endorse
20  or promote products derived from this software without specific prior
21  written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
24 AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
25 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
27 THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
30 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
31 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 </LICENSE> */
35 #ifndef PROBOPTS_HEADER
36 #define PROBOPTS_HEADER
37 
38 // == HEADER probopts.hh ==
39 
47 // -- Base class header --
48 
49 #include "multovlopts.hh"
50 
51 // == Classes ==
52 
53 namespace multovl {
54 namespace prob {
55 
57 class ProbOpts : public MultovlOptbase
58 {
59  public:
60 
61  typedef std::vector<std::string> filenames_t;
62 
64  ProbOpts();
65 
67  const std::string& free_file() const { return _freefile; }
68 
70  const filenames_t& fixed_files() const { return _fixedfiles; }
71 
74  unsigned int fixed_filecnt() const { return _fixedfiles.size(); }
75 
77  bool file_is_fixed(const std::string& filename) const;
78 
80  filenames_t shuffle_files() const { return pos_opts(); }
81 
83  unsigned int reshufflings() const { return _reshufflings; }
84 
86  unsigned int random_seed() const { return _randomseed; }
87 
89  bool progress() const { return _progress; }
90 
91  virtual
92  std::string param_str() const;
93 
94  virtual
95  std::ostream& print_help(std::ostream& out) const;
96 
97  protected:
98 
99  virtual
100  bool check_variables();
101 
102  private:
103 
104  static const unsigned int DEFAULT_RESHUFFLINGS, DEFAULT_RANDOMSEED;
105 
106  std::string _freefile;
107  filenames_t _fixedfiles;
108  unsigned int _reshufflings, _randomseed;
109  bool _progress;
110 };
111 
112 } // namespace prob
113 } // namespace multovl
114 
115 #endif // PROBOPTS_HEADER
116 
bool progress() const
Definition: probopts.hh:89
virtual bool check_variables()
Base class for option handling in the multovl family of tools.
Definition: multovlopts.hh:56
ProbOpts()
Initialize.
unsigned int random_seed() const
Definition: probopts.hh:86
filenames_t shuffle_files() const
Definition: probopts.hh:80
const std::string & free_file() const
Definition: probopts.hh:67
const filenames_t & fixed_files() const
Definition: probopts.hh:70
std::vector< std::string > pos_opts() const
Option handling for the file-based multovl tools.
Definition: probopts.hh:57
virtual std::ostream & print_help(std::ostream &out) const
unsigned int reshufflings() const
Definition: probopts.hh:83
unsigned int fixed_filecnt() const
Definition: probopts.hh:74
bool file_is_fixed(const std::string &filename) const