From 23dbf95663e19316d1315f5a0319a3ed2dc97d9b Mon Sep 17 00:00:00 2001 From: "Marcus D. R. Klarqvist" Date: Sun, 18 Feb 2018 14:14:55 +0000 Subject: [PATCH] release 0.3.3 --- README.md | 2 +- RELEASE.md | 14 +++++++- src/support/MagicConstants.h | 2 +- src/tomahawk/two/TomahawkOutputReader.cpp | 39 +++++++++++++---------- 4 files changed, 38 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 75748cb..c08fc2b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Build Status](https://travis-ci.org/mklarqvist/tomahawk.svg?branch=master)](https://travis-ci.org/mklarqvist/tomahawk) -[![Release](https://img.shields.io/badge/Release-beta_0.3.2-blue.svg)](https://github.com/mklarqvist/tomahawk/releases) +[![Release](https://img.shields.io/badge/Release-beta_0.3.3-blue.svg)](https://github.com/mklarqvist/tomahawk/releases) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) ![screenshot](tomahawk.png) diff --git a/RELEASE.md b/RELEASE.md index 6372730..68d5b2a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,7 +1,16 @@ +# Release 0.3.3 + +## Major Features And Improvements +* None + +## Bug Fixes and Other Changes +* Bug fixes + * Viewing sorted two files fixed for edge cases + # Release 0.3.2 ## Breaking Changes -* Sorted files needs to be resorted. Using old sorted files does not break functionality +* Using old sorted files does not break functionality but have to be resorted ## Major Features And Improvements * Sorting `two` files not correctly produces two indices used for fast queries @@ -13,6 +22,9 @@ # Release 0.3.1 +## Major Features And Improvements +* None + ## Bug Fixes and Other Changes * Bug fixes * Sort merge (`tomahawk sort -M`) now produces the correct output diff --git a/src/support/MagicConstants.h b/src/support/MagicConstants.h index d7e697b..77a4869 100644 --- a/src/support/MagicConstants.h +++ b/src/support/MagicConstants.h @@ -15,7 +15,7 @@ extern std::string INTERPRETED_COMMAND; // Versioning const float PROGRAM_VERSION_MAJOR = 0.3; // major -const float PROGRAM_VERSION_MINOR = 2; +const float PROGRAM_VERSION_MINOR = 3; const double ALLOWED_ROUNDING_ERROR = 0.001; diff --git a/src/tomahawk/two/TomahawkOutputReader.cpp b/src/tomahawk/two/TomahawkOutputReader.cpp index dc23061..57ab4de 100644 --- a/src/tomahawk/two/TomahawkOutputReader.cpp +++ b/src/tomahawk/two/TomahawkOutputReader.cpp @@ -553,25 +553,32 @@ bool TomahawkOutputReader::__viewRegion(void){ if(this->interval_tree == nullptr) return false; - for(U32 i = 0; i < this->interval_tree_entries->size(); ++i){ - // Find this overlap - std::pair ret = this->getIndex().getContainer().findOverlap(this->interval_tree_entries->at(i).contigID, this->interval_tree_entries->at(i).start, this->interval_tree_entries->at(i).stop); - const U32 n_blocks_hits = ret.second - ret.first; - if(n_blocks_hits == 0) - return false; - - for(U32 j = 0; j < n_blocks_hits; ++j){ - if(!this->seekBlock(ret.first + j)){ - std::cerr << "failed to seek block" << std::endl; + std::cerr << "meta: " << this->getIndex().getMetaContainer().size() << std::endl; + for(U32 i = 0; i < this->getIndex().getMetaContainer().size(); ++i){ + std::cerr << this->interval_tree_entries[i].size() << std::endl; + for(U32 j = 0; j < this->interval_tree_entries[i].size(); ++j){ + std::cerr << "here: " << this->interval_tree_entries[i].at(j) << std::endl; + + // Find this overlap + std::pair ret = this->getIndex().getContainer().findOverlap(this->interval_tree_entries[i].at(j).contigID, this->interval_tree_entries[i].at(j).start, this->interval_tree_entries[i].at(j).stop); + std::cerr << "ret: " << ret.first << "->" << ret.second << std::endl; + const U32 n_blocks_hits = ret.second - ret.first; + if(n_blocks_hits == 0) return false; - } - if(!this->parseBlock()) - return false; + for(U32 k = 0; k < n_blocks_hits; ++k){ + if(!this->seekBlock(ret.first + k)){ + std::cerr << "failed to seek block" << std::endl; + return false; + } - output_container_reference_type o(this->data_); - for(U32 i = 0; i < o.size(); ++i) - this->__checkRegionNoIndex(o[i]); + if(!this->parseBlock()) + return false; + + output_container_reference_type o(this->data_); + for(U32 l = 0; l < o.size(); ++l) + this->__checkRegionNoIndex(o[l]); + } } } }