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 @@
/*
Constructor
*/
BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop, bool anyHit, bool noHit,
bool writeCount, bool strandWindows, bool matchOnStrand, bool bamInput, bool bamOutput) {
BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop,
bool anyHit, bool noHit, bool writeCount, bool strandWindows,
bool matchOnStrand, bool bamInput, bool bamOutput, bool isUncompressedBam) {
_bedAFile = bedAFile;
_bedBFile = bedBFile;
......@@ -25,14 +26,15 @@ BedWindow::BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSl
_leftSlop = leftSlop;
_rightSlop = rightSlop;
_anyHit = anyHit;
_noHit = noHit;
_writeCount = writeCount;
_strandWindows = strandWindows;
_matchOnStrand = matchOnStrand;
_bamInput = bamInput;
_bamOutput = bamOutput;
_anyHit = anyHit;
_noHit = noHit;
_writeCount = writeCount;
_strandWindows = strandWindows;
_matchOnStrand = matchOnStrand;
_bamInput = bamInput;
_bamOutput = bamOutput;
_isUncompressedBam = isUncompressedBam;
_bedA = new BedFile(bedAFile);
_bedB = new BedFile(bedBFile);
......@@ -169,7 +171,7 @@ void BedWindow::WindowIntersectBam(string bamFile) {
// open a BAM output to stdout if we are writing BAM
if (_bamOutput == true) {
// open our BAM writer
writer.Open("stdout", header, refs);
writer.Open("stdout", header, refs, _isUncompressedBam);
}
vector<BED> hits; // vector of potential hits
......
......@@ -32,8 +32,9 @@ class BedWindow {
public:
// constructor
BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop, bool anyHit, bool noHit,
bool writeCount, bool strandWindows, bool matchOnStrand, bool bamInput, bool bamOutput);
BedWindow(string bedAFile, string bedBFile, int leftSlop, int rightSlop,
bool anyHit, bool noHit, bool writeCount, bool strandWindows,
bool matchOnStrand, bool bamInput, bool bamOutput, bool isUncompressedBam);
// destructor
~BedWindow(void);
......@@ -51,6 +52,7 @@ private:
bool _matchOnStrand;
bool _bamInput;
bool _bamOutput;
bool _isUncompressedBam;
// instance of a bed file class.
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