0
|
1 /*****************************************************************************
|
|
2 slopBed.h
|
|
3
|
|
4 (c) 2009 - Aaron Quinlan
|
|
5 Hall Laboratory
|
|
6 Department of Biochemistry and Molecular Genetics
|
|
7 University of Virginia
|
|
8 aaronquinlan@gmail.com
|
|
9
|
|
10 Licenced under the GNU General Public License 2.0 license.
|
|
11 ******************************************************************************/
|
|
12
|
|
13 #include "bedFile.h"
|
|
14 #include "genomeFile.h"
|
|
15
|
|
16 #include <vector>
|
|
17 #include <iostream>
|
|
18 #include <fstream>
|
|
19 #include <map>
|
|
20 #include <cstdlib>
|
|
21 #include <ctime>
|
|
22 using namespace std;
|
|
23
|
|
24
|
|
25 //************************************************
|
|
26 // Class methods and elements
|
|
27 //************************************************
|
|
28 class BedSlop {
|
|
29
|
|
30 public:
|
|
31
|
|
32 // constructor
|
|
33 BedSlop(string &bedFile, string &genomeFile, bool forceStrand, float leftSlop, float rightSlop, bool fractional);
|
|
34
|
|
35 // destructor
|
|
36 ~BedSlop(void);
|
|
37
|
|
38
|
|
39
|
|
40 private:
|
|
41
|
|
42 string _bedFile;
|
|
43 string _genomeFile;
|
|
44
|
|
45 bool _forceStrand;
|
|
46 float _leftSlop;
|
|
47 float _rightSlop;
|
|
48 bool _fractional;
|
|
49
|
|
50 BedFile *_bed;
|
|
51 GenomeFile *_genome;
|
|
52
|
|
53 // methods
|
|
54
|
|
55 void SlopBed();
|
|
56
|
|
57 // method to add requested "slop" to a single BED entry
|
|
58 void AddSlop(BED &bed, int leftSlop, int rightSlop);
|
|
59 };
|