From 492af26026285ac86fa873ad00e59643cf45efe7 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Mon, 24 Jun 2024 09:40:24 +0200 Subject: [PATCH 1/2] do not add suffixes to the query names when it is split in SAM format --- src/align/include/computeAlignments.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/align/include/computeAlignments.hpp b/src/align/include/computeAlignments.hpp index 2cb11a65..51bed386 100644 --- a/src/align/include/computeAlignments.hpp +++ b/src/align/include/computeAlignments.hpp @@ -482,7 +482,7 @@ typedef atomic_queue::AtomicQueuecurrentRecord.rankMapping) : ""; + //const std::string query_name_suffix = param.split && param.sam_format ? "_" + std::to_string(rec->currentRecord.rankMapping) : ""; wflign::wavefront::WFlign* wflign = new wflign::wavefront::WFlign( param.wflambda_segment_length, @@ -523,7 +523,7 @@ typedef atomic_queue::AtomicQueuewflign_affine_wavefront( - rec->currentRecord.qId + query_name_suffix, + rec->currentRecord.qId,// + query_name_suffix, queryRegionStrand, rec->queryTotalLength, rec->queryStartPos, From 7ccbb40ff1272df8ab79b95251d0f4114feddb21 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Mon, 24 Jun 2024 10:34:54 +0200 Subject: [PATCH 2/2] manage HARD clipping properly --- src/common/wflign/src/wflign_patch.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/common/wflign/src/wflign_patch.cpp b/src/common/wflign/src/wflign_patch.cpp index 0754856f..25544fe0 100644 --- a/src/common/wflign/src/wflign_patch.cpp +++ b/src/common/wflign/src/wflign_patch.cpp @@ -1715,24 +1715,12 @@ query_start : query_end) query_offset + (query_is_rev ? query_length - query_start : query_end); - if (query_is_rev) { - if (query_length > query_end_pos) { - out << (query_length - query_end_pos) << "H"; - } - } else { - if (query_start_pos > 0) { - out << query_start_pos << "H"; - } + if (query_start_pos > 0) { + out << query_start_pos << "H"; } out << cigarv; - if (query_is_rev) { - if (query_start_pos > 0) { - out << query_start_pos << "H"; - } - } else { - if (query_length > query_end_pos) { - out << (query_length - query_end_pos) << "H"; - } + if (query_total_length > query_end_pos) { + out << (query_total_length - query_end_pos) << "H"; } out << "\t"