diff --git a/bin/pairToBed b/bin/pairToBed index c8c5b1b6c2608e59bc9bcd156a1456188443dea3..03ecc492fe6482163515691a6d154a2f7fb089f2 100755 Binary files a/bin/pairToBed and b/bin/pairToBed differ diff --git a/obj/pairToBed.o b/obj/pairToBed.o index 6f74692e22a1d1c67dfc0df2477c289eae570f36..190a90c024f40c5f1dda758cdbd85122454bd976 100644 Binary files a/obj/pairToBed.o and b/obj/pairToBed.o differ diff --git a/src/complementBed/complementBed.cpp b/src/complementBed/complementBed.cpp index 7c4194a83265af5f6537d0bcba59bd5bcb8ee44a..465bac607cf84f34999c6e08228ef03e470feffb 100755 --- a/src/complementBed/complementBed.cpp +++ b/src/complementBed/complementBed.cpp @@ -93,6 +93,7 @@ void BedComplement::ComplementBed() { while ((chromMasks[i] == 0) && (i < chromMasks.size())) { i++; } + if (start > 0) { cout << currChrom << "\t" << start << "\t" << i << endl; } diff --git a/src/intersectBed/intersectBed.cpp b/src/intersectBed/intersectBed.cpp index d5eaf4e05f4d093779a46f6baec3ab5b811ef266..5091596c4e8f8cb1a39b7bdac322791dd914d0e1 100755 --- a/src/intersectBed/intersectBed.cpp +++ b/src/intersectBed/intersectBed.cpp @@ -241,8 +241,12 @@ void BedIntersect::IntersectBam(string bamFile) { a.chrom = refs.at(bamAlignment.RefID).RefName; a.start = bamAlignment.Position; a.end = bamAlignment.Position + bamAlignment.Length; + a.name = bamAlignment.Name; - a.score = "1"; + if (bamAlignment.IsFirstMate()) a.name += "/1"; + if (bamAlignment.IsSecondMate()) a.name += "/2"; + + a.score = ToString(bamAlignment.MapQuality); a.strand = "+"; if (bamAlignment.IsReverseStrand()) a.strand = "-"; if (this->bamOutput == true) { diff --git a/src/intersectBed/test.bam b/src/intersectBed/test.bam new file mode 100644 index 0000000000000000000000000000000000000000..a31b09e338f7869fd2f9bd7dc3ce597f5c74a0f4 Binary files /dev/null and b/src/intersectBed/test.bam differ diff --git a/src/intersectBed/test.v.bam b/src/intersectBed/test.v.bam new file mode 100644 index 0000000000000000000000000000000000000000..1f3d1e727561f35868d53b88bd5d172a15fc930a Binary files /dev/null and b/src/intersectBed/test.v.bam differ diff --git a/src/pairToBed/pairToBed.h b/src/pairToBed/pairToBed.h index 582ea480969c6d9ca0c47ceb311c27e6f142d92e..9742574bff58c117aa0848dea9fe1133d4b95590 100755 --- a/src/pairToBed/pairToBed.h +++ b/src/pairToBed/pairToBed.h @@ -75,7 +75,7 @@ private: a.start2 = bam.MatePosition; a.end2 = bam.MatePosition + bam.Length; a.name = bam.Name; - a.score = "1"; + a.score = ToString(bam.MapQuality); a.strand1 = "+"; if (bam.IsReverseStrand()) a.strand1 = "-"; a.strand2 = "+"; if (bam.IsMateReverseStrand()) a.strand2 = "-"; };