-
Notifications
You must be signed in to change notification settings - Fork 0
/
bedStructure.h
54 lines (45 loc) · 1.4 KB
/
bedStructure.h
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
// ******************************************************
// vcfCTools (c) 2011 Alistair Ward
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ------------------------------------------------------
// Last modified: 18 February 2011
// ------------------------------------------------------
// Define the bedStructure class. This is essentially the
// equivalent of the variant class, but for bed files and
// as such is significantly simpler.
// ******************************************************
#ifndef BEDSTRUCTURE_H
#define BEDSTRUCTURE_H
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <map>
#include <vector>
#include "bed.h"
#include "structures.h"
using namespace std;
namespace vcfCTools {
class bedStructure {
public:
bedStructure(void);
~bedStructure(void);
void addIntervalToStructure(bedRecord&);
bool buildBedStructure(bed&);
void generateCommonInterval(bedRecord&, bedRecord&, int, int);
void initialiseBedMap(bed&, intFlags&);
void resolveOverlaps(bedRecord&);
void resolveOverlaps(bool);
public:
bool lastBedInterval;
unsigned int lastBedIntervalEnd;
unsigned int recordsInMemory;
map<int, bedRecord> bedMap;
map<int, bedRecord>::iterator bmIter;
map<int, bedRecord>::iterator bmNext;
};
} // namespace vcfCTools
#endif // BEDSTRUCTURE_H