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

Added mate to name and mapqual as score in intersectBed.

	- also added map quality as score in pairToBed
parent dc45a9ab
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
......@@ -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;
}
......
......@@ -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) {
......
File added
File added
......@@ -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 = "-";
};
......
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