-
Notifications
You must be signed in to change notification settings - Fork 296
Expand file tree
/
Copy pathrandomBed.h
More file actions
57 lines (44 loc) · 1.22 KB
/
randomBed.h
File metadata and controls
57 lines (44 loc) · 1.22 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*****************************************************************************
randomBed.h
(c) 2009 - Aaron Quinlan
Hall Laboratory
Department of Biochemistry and Molecular Genetics
University of Virginia
aaronquinlan@gmail.com
Licenced under the GNU General Public License 2.0 license.
******************************************************************************/
#include "BedtoolsTypes.h"
#include "GenomeFile.h"
#include <vector>
#include <iostream>
#include <fstream>
#include <map>
#include <cstdlib>
#include <ctime>
#include <sys/time.h>
#include <unistd.h>
#include <sys/types.h>
#include <algorithm> // for binary search
#include <stdint.h>
using namespace std;
const int MAX_TRIES = 1000000;
//************************************************
// Class methods and elements
//************************************************
class BedRandom {
public:
// constructor
BedRandom(string &genomeFile, uint32_t numToGenerate, int seed,
bool haveSeed, CHRPOS length);
// destructor
~BedRandom(void);
private:
string _genomeFile;
int _seed;
bool _haveSeed;
GenomeFile *_genome;
CHRPOS _length;
uint32_t _numToGenerate;
// methods
void Generate();
};