Skip to content
Snippets Groups Projects
Commit bd91cd68 authored by Aaron's avatar Aaron
Browse files

windowBed supports -ubam.

parent 1cfd5315
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
/* /*
Constructor Constructor
*/ */
BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop, bool anyHit, bool noHit, BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop,
bool writeCount, bool strandWindows, bool matchOnStrand, bool bamInput, bool bamOutput) { bool anyHit, bool noHit, bool writeCount, bool strandWindows,
bool matchOnStrand, bool bamInput, bool bamOutput, bool isUncompressedBam) {
_bedAFile = bedAFile; _bedAFile = bedAFile;
_bedBFile = bedBFile; _bedBFile = bedBFile;
...@@ -25,14 +26,15 @@ BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSl ...@@ -25,14 +26,15 @@ BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSl
_leftSlop = leftSlop; _leftSlop = leftSlop;
_rightSlop = rightSlop; _rightSlop = rightSlop;
_anyHit = anyHit; _anyHit = anyHit;
_noHit = noHit; _noHit = noHit;
_writeCount = writeCount; _writeCount = writeCount;
_strandWindows = strandWindows; _strandWindows = strandWindows;
_matchOnStrand = matchOnStrand; _matchOnStrand = matchOnStrand;
_bamInput = bamInput; _bamInput = bamInput;
_bamOutput = bamOutput; _bamOutput = bamOutput;
_isUncompressedBam = isUncompressedBam;
_bedA = new BedFile(bedAFile); _bedA = new BedFile(bedAFile);
_bedB = new BedFile(bedBFile); _bedB = new BedFile(bedBFile);
...@@ -169,7 +171,7 @@ void BedWindow::WindowIntersectBam(string bamFile) { ...@@ -169,7 +171,7 @@ void BedWindow::WindowIntersectBam(string bamFile) {
// open a BAM output to stdout if we are writing BAM // open a BAM output to stdout if we are writing BAM
if (_bamOutput == true) { if (_bamOutput == true) {
// open our BAM writer // open our BAM writer
writer.Open("stdout", header, refs); writer.Open("stdout", header, refs, _isUncompressedBam);
} }
vector<BED> hits; // vector of potential hits vector<BED> hits; // vector of potential hits
......
...@@ -32,8 +32,9 @@ class BedWindow { ...@@ -32,8 +32,9 @@ class BedWindow {
public: public:
// constructor // constructor
BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop, bool anyHit, bool noHit, BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop,
bool writeCount, bool strandWindows, bool matchOnStrand, bool bamInput, bool bamOutput); bool anyHit, bool noHit, bool writeCount, bool strandWindows,
bool matchOnStrand, bool bamInput, bool bamOutput, bool isUncompressedBam);
// destructor // destructor
~BedWindow(void); ~BedWindow(void);
...@@ -51,6 +52,7 @@ private: ...@@ -51,6 +52,7 @@ private:
bool _matchOnStrand; bool _matchOnStrand;
bool _bamInput; bool _bamInput;
bool _bamOutput; bool _bamOutput;
bool _isUncompressedBam;
// instance of a bed file class. // instance of a bed file class.
BedFile *_bedA, *_bedB; BedFile *_bedA, *_bedB;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment