File: coveragePlot.h

package info (click to toggle)
reapr 1.0.18%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,092 kB
  • ctags: 733
  • sloc: cpp: 4,816; perl: 1,467; sh: 160; makefile: 116
file content (38 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef COVERAGEPLOT_H
#define COVERAGEPLOT_H

#include <deque>


using namespace std;


class CoveragePlot
{
public:
    // construct a coverage plot, with max read length n and position pos
    CoveragePlot();
    CoveragePlot(unsigned long n, unsigned long pos);

    // move the coord of the plot 1 base to the right
    void increment();

    // returns the coverage at the current base
    unsigned long depth();

    // return the zero element depth
    unsigned long front();

    // add a read that ends at position n
    void add(unsigned long n);

    // returns the position of the plot
    unsigned long position();

private:
    unsigned long coord_;
    unsigned long depth_;
    deque<unsigned long> depthDiff_;
};

#endif // COVERAGEPLOT