diff BEDTools-Version-2.14.3/src/flankBed/flankBed.h @ 0:dfcd8b6c1bda

Uploaded
author aaronquinlan
date Thu, 03 Nov 2011 10:25:04 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BEDTools-Version-2.14.3/src/flankBed/flankBed.h	Thu Nov 03 10:25:04 2011 -0400
@@ -0,0 +1,63 @@
+/*****************************************************************************
+  flankBed.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 "bedFile.h"
+#include "genomeFile.h"
+
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <map>
+#include <cstdlib>
+#include <ctime>
+using namespace std;
+
+
+//************************************************
+// Class methods and elements
+//************************************************
+class BedFlank {
+
+public:
+
+    // constructor
+    BedFlank(string &bedFile, string &genomeFile, bool forceStrand, float leftSlop, float rightSlop, bool fractional);
+
+    // destructor
+    ~BedFlank(void);
+
+
+
+private:
+
+    string _bedFile;
+    string _genomeFile;
+
+    bool   _forceStrand;
+    float  _leftFlank;
+    float  _rightFlank;
+    bool   _fractional;
+
+    BedFile *_bed;
+    GenomeFile *_genome;
+
+    // methods
+
+    void FlankBed();
+
+    // method to grab requested flank w.r.t. a single BED entry
+    void AddFlank(BED &bed, int leftSlop, int rightSlop);
+    
+    // method to grab requested flank w.r.t. a single BED entry, 
+    // while choosing flanks based on strand
+    void AddStrandedFlank(BED &bed, int leftSlop, int rightSlop);
+};