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

Fixed string references for strand (i.e. '+' to "+") in windowBed and pairToBed.

parent 9fe56c08
No related branches found
No related tags found
No related merge requests found
......@@ -95,8 +95,8 @@ private:
a.chrom1 = refs.at(bam1.RefID).RefName;
a.start1 = bam1.Position;
a.end1 = bam1.GetEndPosition();
a.strand1 = '+';
if (bam1.IsReverseStrand()) a.strand1 = '-';
a.strand1 = "+";
if (bam1.IsReverseStrand()) a.strand1 = "-";
// extract the edit distance from the NM tag
// if possible. otherwise, complain.
......@@ -113,8 +113,8 @@ private:
a.chrom2 = refs.at(bam2.RefID).RefName;
a.start2 = bam2.Position;
a.end2 = bam2.GetEndPosition();
a.strand2 = '+';
if (bam2.IsReverseStrand()) a.strand2 = '-';
a.strand2 = "+";
if (bam2.IsReverseStrand()) a.strand2 = "-";
// extract the edit distance from the NM tag
// if possible. otherwise, complain.
......
......@@ -422,6 +422,8 @@ void BedFile::countSplitHits(const vector<BED> &bedBlocks, bool forceStrand) {
set< vector<BEDCOV>::iterator >::iterator validHitsItr = validHits.begin();
set< vector<BEDCOV>::iterator >::iterator validHitsEnd = validHits.end();
for (; validHitsItr != validHitsEnd; ++validHitsItr)
// the validHitsItr points to another itr, hence the (*itr)-> dereferencing.
// ugly, but that's C++.
(*validHitsItr)->count++;
}
......
......@@ -194,7 +194,7 @@ void BedWindow::WindowIntersectBam(string bamFile) {
if (bam.IsSecondMate()) a.name += "/2";
a.score = ToString(bam.MapQuality);
a.strand = '+'; if (bam.IsReverseStrand()) a.strand = '-';
a.strand = "+"; if (bam.IsReverseStrand()) a.strand = "-";
if (_bamOutput == true) {
overlapsFound = FindOneOrMoreWindowOverlaps(a);
......
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