From 0084ef4355e3b9fa2e5b3e96633b37288cfb7be5 Mon Sep 17 00:00:00 2001 From: Daniel Olson Date: Mon, 6 Oct 2025 07:34:16 -0600 Subject: [PATCH 1/4] Now adding debug symbols when building with debug --- CMakeLists.txt | 2 ++ src/ultra.hpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f493aa6..9d4113d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,8 @@ project( HOMEPAGE_URL https://github.com/TravisWheelerLab/ULTRA ) +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") + # By default we do NOT build the standalone ULTRA library option(BUILD_ULTRA_LIB "Also build ULTRA as a standalone library" OFF) diff --git a/src/ultra.hpp b/src/ultra.hpp index fa924c2..0f4a26c 100644 --- a/src/ultra.hpp +++ b/src/ultra.hpp @@ -74,8 +74,7 @@ class Ultra { bool storeTraceAndSequence = false; - std::unordered_map *> - masks_for_seq{}; + std::unordered_map *> masks_for_seq{}; std::vector outRepeats{}; std::vector models{}; From ce09da75096ff18600ec2adc99768cc3e8432461 Mon Sep 17 00:00:00 2001 From: Daniel Olson Date: Mon, 6 Oct 2025 07:34:43 -0600 Subject: [PATCH 2/4] Changing the version number --- src/cli.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.hpp b/src/cli.hpp index 44ebbec..46a5b4b 100644 --- a/src/cli.hpp +++ b/src/cli.hpp @@ -5,7 +5,7 @@ #ifndef ULTRA_CLI_HPP #define ULTRA_CLI_HPP -#define ULTRA_VERSION_STRING "1.2.0" +#define ULTRA_VERSION_STRING "1.2.1" #define DEBUG_STRING "" #ifdef DEBUG_PRAGMA #undef DEBUG_STRING From 1ef2d4d572a0fa483b8d32634475b4fe28fcf320 Mon Sep 17 00:00:00 2001 From: Daniel Olson Date: Mon, 6 Oct 2025 09:57:10 -0600 Subject: [PATCH 3/4] Changing logic of logo creation --- src/SequenceWindow.cpp | 6 ------ src/repeat.cpp | 4 +++- src/ultra.cpp | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/SequenceWindow.cpp b/src/SequenceWindow.cpp index 5002fb0..2f31144 100644 --- a/src/SequenceWindow.cpp +++ b/src/SequenceWindow.cpp @@ -102,12 +102,6 @@ void SequenceWindow::CalculateSymbolFrequencies() { } } -/* -bool SequenceWindow::operator<(const SequenceWindow& rhs) { - if (this->seqID != rhs.seqID) - return this->seqID < rhs.readID; - return (this->readID < rhs.readID); -}*/ SequenceWindow::SequenceWindow(unsigned long ml, unsigned long mo) { diff --git a/src/repeat.cpp b/src/repeat.cpp index e1338c0..c57d291 100644 --- a/src/repeat.cpp +++ b/src/repeat.cpp @@ -54,7 +54,6 @@ void RepeatRegion::CreateLogo(SequenceWindow *window, UMatrix *matrix) { }*/ } - else if (fdesc.type == CT_DELETION) { deletions += fdesc.indelNumber; bplace += fdesc.indelNumber; @@ -77,6 +76,9 @@ void RepeatRegion::CreateLogo(SequenceWindow *window, UMatrix *matrix) { i += bdesc.indelNumber; } + if (fplace > windowStart+repeatLength) + break; + symbol s = window->seq[fplace]; symbol sb = window->seq[bplace]; diff --git a/src/ultra.cpp b/src/ultra.cpp index 335083b..10474d8 100644 --- a/src/ultra.cpp +++ b/src/ultra.cpp @@ -69,7 +69,6 @@ SequenceWindow *Ultra::GetSequenceWindow(SequenceWindow *seq, uthread *uth) { pthread_mutex_lock(&outerLock); // Check to see if we need to read more sequence first - if (!reader->DoneReadingFile()) { if (!reader->IsReading()) { if (reader->ReadyWindowsSize() == 0) { From 16b5afe522e1dccbd41af6bfb93222e67f320c64 Mon Sep 17 00:00:00 2001 From: Daniel Olson Date: Mon, 6 Oct 2025 10:06:18 -0600 Subject: [PATCH 4/4] Changing logic of logo creation --- src/repeat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repeat.cpp b/src/repeat.cpp index c57d291..a5013d7 100644 --- a/src/repeat.cpp +++ b/src/repeat.cpp @@ -76,7 +76,7 @@ void RepeatRegion::CreateLogo(SequenceWindow *window, UMatrix *matrix) { i += bdesc.indelNumber; } - if (fplace > windowStart+repeatLength) + if (fplace >= windowStart+repeatLength) break; symbol s = window->seq[fplace];