From e3c0da642aecf900180ee47b0fee11e69a402b52 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Mon, 22 Dec 2025 15:39:09 -0800 Subject: [PATCH 1/2] src/analysis/nanopore.cpp: allowing for no modifications within a read when checking if modifications are valid --- src/analysis/nanopore.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/analysis/nanopore.cpp b/src/analysis/nanopore.cpp index 0027e74a..e44b5ee5 100644 --- a/src/analysis/nanopore.cpp +++ b/src/analysis/nanopore.cpp @@ -942,14 +942,16 @@ valid_modification_types(const std::string &infile, // ADS: or bam_parse_basemod2(aln.b, m, HTS_MOD_REPORT_UNCHECKED) int n_types{}; const auto types = bam_mods_recorded(m.get(), &n_types); - valid_types = (n_types == 1 && types[0] == 'C') || - (n_types >= 2 && types[0] == 'h' && types[1] == 'm'); + // clang-format off + valid_types = ((n_types == 0) || + (n_types == 1 && types[0] == 'C') || + (n_types >= 2 && types[0] == 'h' && types[1] == 'm')); + // clang-format on if (!valid_types) { message = "n_types: " + std::to_string(n_types) + "\n"; - for (auto i = 0; i < n_types; ++i) { + for (auto i = 0; i < n_types; ++i) message += "type[" + std::to_string(i) + "]=" + std::to_string(static_cast(types[i])) + "\n"; - } } } return std::make_pair(valid_types, message); From 531ff8c71e9e683c6b5c8b4f5860ae756d81bf38 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Tue, 23 Dec 2025 14:39:38 -0800 Subject: [PATCH 2/2] release workflows: enabling htslib mods --- .github/workflows/dnmtools_release_linux.yml | 2 +- .github/workflows/dnmtools_release_macos.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dnmtools_release_linux.yml b/.github/workflows/dnmtools_release_linux.yml index d4f12f78..23bce442 100644 --- a/.github/workflows/dnmtools_release_linux.yml +++ b/.github/workflows/dnmtools_release_linux.yml @@ -59,7 +59,7 @@ jobs: cd /workspace && \ autoreconf -i && \ mkdir build && cd build && \ - ../configure --with-libdeflate && \ + ../configure --with-libdeflate --with-htsmods && \ ../data/make_full_license_info_header.sh ../data/LICENSE > license.h && \ echo "#define INCLUDE_FULL_LICENSE_INFO 1" >> config.h && \ make -j4 LDFLAGS="-static-libgcc -static-libstdc++ -s" && \ diff --git a/.github/workflows/dnmtools_release_macos.yml b/.github/workflows/dnmtools_release_macos.yml index 54f48513..eeca2b16 100644 --- a/.github/workflows/dnmtools_release_macos.yml +++ b/.github/workflows/dnmtools_release_macos.yml @@ -54,7 +54,7 @@ jobs: run: | ./autogen.sh mkdir build && cd build - ../configure --with-libdeflate \ + ../configure --with-libdeflate --with-htsmods \ CXX=g++-14 \ LDFLAGS="-L/opt/dnmtools/lib -static-libgcc -static-libstdc++ -Wl,-dead_strip" \ CPPFLAGS="-I/opt/dnmtools/include"