multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
parprobpipeline.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 MULTOVL_PROB_PARPIPELINE_HEADER
36 #define MULTOVL_PROB_PARPIPELINE_HEADER
37 
38 // == Header parprobpipeline.hh ==
39 
40 // -- Own headers --
41 
42 #include "probpipeline.hh"
43 #include "parprobopts.hh"
44 
45 // -- Boost headers --
46 
47 #include "boost/thread.hpp"
48 #include "boost/progress.hpp"
49 
50 
51 namespace multovl {
52 namespace prob {
53 
54 // -- Classes --
55 
62 {
63 public:
64 
68  ParProbPipeline(int argc, char* argv[]);
69 
70  ~ParProbPipeline();
71 
72 protected:
73 
80  virtual
81  unsigned int detect_overlaps();
82 
84  virtual
85  ParProbOpts* opt_ptr() { return dynamic_cast<ParProbOpts*>(opt_pimpl()); }
86 
88  virtual
90  {
91  boost::lock_guard<boost::mutex> lock(_stat_mutex); // 1 thread only
92  return ProbPipeline::stat();
93  }
94 
95 private:
96 
97  void shuffle(
98  unsigned int rndseed,
99  boost::progress_display* progressptr
100  );
101 
108  unsigned int check_update_shufflecounter(boost::progress_display* progressptr=NULL);
109 
110  unsigned int _shufflecounter;
111  boost::mutex _shufflecounter_mutex, _stat_mutex;
112 
113 };
114 
115 } // namespace prob
116 } // namespace multovl
117 
118 #endif // MULTOVL_PROB_PARPIPELINE_HEADER
virtual unsigned int detect_overlaps()
virtual ParProbOpts * opt_ptr()
Definition: parprobpipeline.hh:85
MultovlOptbase * opt_pimpl()
Definition: basepipeline.hh:132
virtual Stat & stat()
Definition: parprobpipeline.hh:89
Definition: parprobpipeline.hh:61
Definition: stat.hh:67
ParProbPipeline(int argc, char *argv[])
Definition: probpipeline.hh:57
Option handling for the file-based parallel overlap probability tool.
Definition: parprobopts.hh:57
const Stat & stat() const
Definition: probpipeline.hh:141