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

Fixed bug in sortBed that caused the output to be written twice.

parent f760aae1
No related branches found
No related tags found
No related merge requests found
......@@ -18,8 +18,6 @@
BedSort::BedSort(string &bedFile) {
_bedFile = bedFile;
_bed = new BedFile(bedFile);
SortBed();
}
//
......
......@@ -702,6 +702,12 @@ void BedFile::loadBedFileIntoMapNoBin() {
bedStatus = this->GetNextBed(bedEntry, lineNum);
}
Close();
// sort the BED entries for each chromosome
// in ascending order of start position
for (masterBedMapNoBin::iterator m = this->bedMapNoBin.begin(); m != this->bedMapNoBin.end(); ++m) {
sort(m->second.begin(), m->second.end(), sortByStart);
}
}
......
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