0
|
1 /*****************************************************************************
|
|
2 sortBed.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 #include "bedFile.h"
|
|
13 #include <vector>
|
|
14 #include <algorithm>
|
|
15 #include <iostream>
|
|
16 #include <fstream>
|
|
17
|
|
18 using namespace std;
|
|
19
|
|
20
|
|
21 //************************************************
|
|
22 // Class methods and elements
|
|
23 //************************************************
|
|
24 class BedSort {
|
|
25
|
|
26 public:
|
|
27
|
|
28 // constructor
|
|
29 BedSort(string &);
|
|
30
|
|
31 // destructor
|
|
32 ~BedSort(void);
|
|
33
|
|
34 void SortBed(); // the default. sorts by chrom (asc.) then by start (asc.)
|
|
35 void SortBedBySizeAsc();
|
|
36 void SortBedBySizeDesc();
|
|
37 void SortBedByChromThenSizeAsc();
|
|
38 void SortBedByChromThenSizeDesc();
|
|
39 void SortBedByChromThenScoreAsc();
|
|
40 void SortBedByChromThenScoreDesc();
|
|
41
|
|
42 private:
|
|
43 string _bedFile;
|
|
44
|
|
45 // instance of a bed file class.
|
|
46 BedFile *_bed;
|
|
47
|
|
48 // methods
|
|
49
|
|
50 };
|