示例#1
0
/*
	Constructor
*/
BedIntersect::BedIntersect(string bedAFile, string bedBFile, bool anyHit, 
						   bool writeA, bool writeB, bool writeOverlap, bool writeAllOverlap,
						   float overlapFraction, bool noHit, bool writeCount, bool forceStrand, 
						   bool reciprocal, bool obeySplits, bool bamInput, bool bamOutput, bool isUncompressedBam) {

	_bedAFile            = bedAFile;
	_bedBFile            = bedBFile;
	_anyHit              = anyHit;
	_noHit               = noHit;
	_writeA              = writeA;	
	_writeB              = writeB;
	_writeOverlap        = writeOverlap;
	_writeAllOverlap     = writeAllOverlap;		
	_writeCount          = writeCount;
	_overlapFraction     = overlapFraction;
	_forceStrand         = forceStrand;
	_reciprocal          = reciprocal;
    _obeySplits          = obeySplits;
	_bamInput            = bamInput;
	_bamOutput           = bamOutput;
    _isUncompressedBam   = isUncompressedBam;
	
	// create new BED file objects for A and B
	_bedA = new BedFile(bedAFile);
	_bedB = new BedFile(bedBFile);
	  
	if (_bamInput == false)
		IntersectBed();
	else
		IntersectBam(bedAFile);			
}
示例#2
0
/*
    Constructor
*/
BedIntersect::BedIntersect(string bedAFile, string bedBFile, bool anyHit,
                           bool writeA, bool writeB, bool writeOverlap, bool writeAllOverlap,
                           float overlapFraction, bool noHit, bool leftJoin, bool writeCount, bool sameStrand, bool diffStrand,
                           bool reciprocal, bool obeySplits, bool bamInput, bool bamOutput, bool isUncompressedBam,
                           bool sortedInput, bool printHeader) {

    _bedAFile            = bedAFile;
    _bedBFile            = bedBFile;
    _anyHit              = anyHit;
    _noHit               = noHit;
    _leftJoin            = leftJoin;
    _writeA              = writeA;
    _writeB              = writeB;
    _writeOverlap        = writeOverlap;
    _writeAllOverlap     = writeAllOverlap;
    _writeCount          = writeCount;
    _overlapFraction     = overlapFraction;
    _sameStrand          = sameStrand;
    _diffStrand          = diffStrand;
    _reciprocal          = reciprocal;
    _obeySplits          = obeySplits;
    _bamInput            = bamInput;
    _bamOutput           = bamOutput;
    _isUncompressedBam   = isUncompressedBam;
    _sortedInput         = sortedInput;
    _printHeader         = printHeader;

    // should we print each overlap, or does the user want summary information?
    _printable = true;
    if (_anyHit || _noHit || _writeCount)
        _printable = false;
        
    if (_bamInput == false)
        IntersectBed();
    else
        IntersectBam(bedAFile);
}