Skip to content

Commit

Permalink
release 0.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mklarqvist committed Feb 18, 2018
1 parent 6ca779f commit 23dbf95
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
14 changes: 13 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/support/MagicConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
39 changes: 23 additions & 16 deletions src/tomahawk/two/TomahawkOutputReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<U32, U32> 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<U32, U32> 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]);
}
}
}
}
Expand Down

0 comments on commit 23dbf95

Please sign in to comment.