| 
0
 | 
     1 /*****************************************************************************
 | 
| 
 | 
     2   linksBed.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 // Class methods and elements
 | 
| 
 | 
    22 //************************************************
 | 
| 
 | 
    23 class BedLinks {
 | 
| 
 | 
    24 
 | 
| 
 | 
    25 public:
 | 
| 
 | 
    26 
 | 
| 
 | 
    27     // constructor
 | 
| 
 | 
    28     BedLinks(string &bedFile, string &base, string &org, string &db);
 | 
| 
 | 
    29 
 | 
| 
 | 
    30     // destructor
 | 
| 
 | 
    31     ~BedLinks(void);
 | 
| 
 | 
    32 
 | 
| 
 | 
    33 private:
 | 
| 
 | 
    34     string _bedFile;
 | 
| 
 | 
    35     string _base;
 | 
| 
 | 
    36     string _org;
 | 
| 
 | 
    37     string _db;
 | 
| 
 | 
    38 
 | 
| 
 | 
    39     // instance of a bed file class.
 | 
| 
 | 
    40     BedFile *_bed;
 | 
| 
 | 
    41 
 | 
| 
 | 
    42     void WriteURL(BED &bed, string &base);
 | 
| 
 | 
    43     void CreateLinks();             // the default.  sorts by chrom (asc.) then by start (asc.)
 | 
| 
 | 
    44 };
 |