diff --git a/src/map/include/base_types.hpp b/src/map/include/base_types.hpp index f0b65d87..605b7560 100644 --- a/src/map/include/base_types.hpp +++ b/src/map/include/base_types.hpp @@ -157,10 +157,6 @@ namespace skch seqno_t refSeqId; //internal sequence id of the reference contig seqno_t querySeqId; //internal sequence id of the query sequence offset_t blockLength; //the block length of the mapping - offset_t blockRefStartPos; - offset_t blockRefEndPos; - offset_t blockQueryStartPos; - offset_t blockQueryEndPos; float blockNucIdentity; float nucIdentity; //calculated identity diff --git a/src/map/include/computeMap.hpp b/src/map/include/computeMap.hpp index 27c526c3..669422f2 100644 --- a/src/map/include/computeMap.hpp +++ b/src/map/include/computeMap.hpp @@ -462,17 +462,6 @@ namespace skch readMappings.end()); } - void setBlockCoordsToMappingCoords(MappingResultsVector_t &readMappings) { - for (auto& m : readMappings) { - m.blockRefStartPos = m.refStartPos; - m.blockRefEndPos = m.refEndPos; - m.blockQueryStartPos = m.queryStartPos; - m.blockQueryEndPos = m.queryEndPos; - m.blockLength = std::max(m.blockRefEndPos - m.blockRefStartPos, m.blockQueryEndPos - m.blockQueryStartPos); - m.blockNucIdentity = m.nucIdentity; - } - } - /** * @brief helper to main mapping function * @details filters mappings whose identity and query/ref length don't agree @@ -485,8 +474,8 @@ namespace skch std::remove_if(readMappings.begin(), readMappings.end(), [&](MappingResult &e){ - int64_t q_l = (int64_t)e.blockQueryEndPos - (int64_t)e.blockQueryStartPos; - int64_t r_l = (int64_t)e.blockRefEndPos - (int64_t)e.blockRefStartPos; + int64_t q_l = (int64_t)e.queryEndPos - (int64_t)e.queryStartPos; + int64_t r_l = (int64_t)e.refEndPos - (int64_t)e.refStartPos; uint64_t delta = std::abs(r_l - q_l); double len_id_bound = (1.0 - (double)delta/(((double)q_l+r_l)/2)); return len_id_bound < std::min(0.7, std::pow(param.percentageIdentity,3)); @@ -770,8 +759,6 @@ namespace skch */ void filterNonMergedMappings(MappingResultsVector_t &readMappings, const Parameters& param) { - setBlockCoordsToMappingCoords(readMappings); - if (param.filterMode == filter::MAP || param.filterMode == filter::ONETOONE) { MappingResultsVector_t filteredMappings; filterByGroup(readMappings, filteredMappings, param.numMappingsForSegment - 1, false); @@ -1800,10 +1787,6 @@ namespace skch for (auto it = begin; it != end; ++it) { it->n_merged = n_in_full_chain; it->blockLength = block_length; - it->blockQueryStartPos = chain_start_query; - it->blockQueryEndPos = chain_end_query; - it->blockRefStartPos = chain_start_ref; - it->blockRefEndPos = chain_end_ref; it->blockNucIdentity = chain_nuc_identity; } } diff --git a/src/map/include/filter.hpp b/src/map/include/filter.hpp index fa18b132..eeaa7470 100644 --- a/src/map/include/filter.hpp +++ b/src/map/include/filter.hpp @@ -70,11 +70,11 @@ namespace skch // compute the overlap of the two mappings double get_overlap(const int x, const int y) const { - offset_t overlap_start = std::max(vec[x].blockQueryStartPos, vec[y].blockQueryStartPos); - offset_t overlap_end = std::min(vec[x].blockQueryEndPos, vec[y].blockQueryEndPos); + offset_t overlap_start = std::max(vec[x].queryStartPos, vec[y].queryStartPos); + offset_t overlap_end = std::min(vec[x].queryEndPos, vec[y].queryEndPos); offset_t overlap_length = std::max(0, static_cast(overlap_end - overlap_start)); - offset_t x_length = vec[x].blockQueryEndPos - vec[x].blockQueryStartPos; - offset_t y_length = vec[y].blockQueryEndPos - vec[y].blockQueryStartPos; + offset_t x_length = vec[x].queryEndPos - vec[x].queryStartPos; + offset_t y_length = vec[y].queryEndPos - vec[y].queryStartPos; return static_cast(overlap_length) / std::min(x_length, y_length); } @@ -343,11 +343,11 @@ namespace skch // compute the overlap of the two mappings double get_overlap(const int x, const int y) const { - offset_t overlap_start = std::max(vec[x].blockRefStartPos, vec[y].blockRefStartPos); - offset_t overlap_end = std::min(vec[x].blockRefEndPos, vec[y].blockRefEndPos); + offset_t overlap_start = std::max(vec[x].refStartPos, vec[y].refStartPos); + offset_t overlap_end = std::min(vec[x].refEndPos, vec[y].refEndPos); offset_t overlap_length = std::max(0, static_cast(overlap_end - overlap_start)); - offset_t x_length = vec[x].blockRefEndPos - vec[x].blockRefStartPos; - offset_t y_length = vec[y].blockRefEndPos - vec[y].blockRefStartPos; + offset_t x_length = vec[x].refEndPos - vec[x].refStartPos; + offset_t y_length = vec[y].refEndPos - vec[y].refStartPos; return static_cast(overlap_length) / std::min(x_length, y_length); }